PHPStan temporary config file not found due to incorrect temporary directory on Windows with XAMPP

Created on 17 June 2021, over 3 years ago
Updated 6 November 2023, about 1 year ago

Our site is running Drupal 8.9.9 and we want to move to Drupal 9. I've installed the Upgrade Status module version 3.4. When I scan a module, like Admin Toolbar, it reports an error like:
PHPSTAN COMMAND FAILED:
C:\xampp\htdocs\d-master/vendor/bin/phpstan analyse --error-format=json -c \xampp\tmp/upgrade_status/deprecation_testing.neon C:\xampp\htdocs\d-master\web/modules/contrib/admin_toolbar 2> \xampp\tmp/upgrade_status/phpstan_error_output

COMMAND OUTPUT:
Empty.

COMMAND ERROR:
Project config file at path C:\Users\eghgk\xampp\tmp/upgrade_status/deprecation_testing.neon does not exist.

Many other modules have same problem. Is there any issue related with the installation of Upgrade Status module?
I installed Upgrade Status module using ' composer require drupal/upgrade_status:^3.4 ' command. Could you please help me to solve this issue??

💬 Support request
Status

Fixed

Version

3.6

Component

Upgrade Assist

Created by

🇮🇳India Toby_toby

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada paintingguy

    Hi all,
    I have this , any help fixing this would be appreciated!!

    Warning: file_put_contents(/tmp/upgrade_status/deprecation_testing.neon): Failed to open stream: Permission denied in Drupal\upgrade_status\DeprecationAnalyzer->createModifiedNeonFile() (line 557 of modules/contrib/upgrade_status/src/DeprecationAnalyzer.php).

    Drupal\upgrade_status\DeprecationAnalyzer->createModifiedNeonFile() (Line: 250)
    Drupal\upgrade_status\DeprecationAnalyzer->initEnvironment() (Line: 222)
    Drupal\upgrade_status\Form\UpgradeStatusForm->buildForm(Array, Object)
    call_user_func_array(Array, Array) (Line: 536)
    Drupal\Core\Form\FormBuilder->retrieveForm('drupal_upgrade_status_summary_form', Object) (Line: 283)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
    Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 49)
    Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    Unable to write configuration for PHPStan to /tmp/upgrade_status/deprecation_testing.neon. Scanning is not possible until this is resolved.

  • 🇵🇰Pakistan dewancodes

    I am also facing same problem. I have installed upgrade status module version 4.3.1 to upgrade Drupal 10 to Drupal 11, but I found this warning :

    Unable to write configuration for PHPStan to /tmp/upgrade_status/deprecation_testing.neon. Scanning is not possible until this is resolved.

    Any help will be highly appreciated!

Production build 0.71.5 2024