Got an error when run any drush command:
`[warning] Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on https://github.com/php/php-src/issues ProjectCollector.php:224`

Drupal core 10.2.0
Upgrade Status 4.0.0

```
drush --version
Drush Commandline Tool 12.4.3.0
```

```
php -v
PHP 8.2.13 (cli) (built: Nov 24 2023 08:46:50) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.13, Copyright (c) Zend Technologies
with Zend OPcache v8.2.13, Copyright (c), by Zend Technologies
```

Comments

APolitsin created an issue. See original summary.

gorkagr’s picture

Hi

Also on the UI the following error (I also have the drush one too)

Warning: Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on https://github.com/php/php-src/issues in include() (line 576 of /var/www/html/vendor/composer/ClassLoader.php).

include('/var/www/html/web/core/includes/bootstrap.inc') (Line: 576)
Composer\Autoload\{closure}('/var/www/html/web/modules/contrib/upgrade_status/src/ProjectCollector.php') (Line: 427)
Composer\Autoload\ClassLoader->loadClass('Drupal\upgrade_status\ProjectCollector') (Line: 259)
Drupal\Component\DependencyInjection\Container->createService(Array, 'upgrade_status.project_collector') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('upgrade_status.project_collector') (Line: 127)
Drupal\upgrade_status\Form\UpgradeStatusForm::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\upgrade_status\Form\UpgradeStatusForm') (Line: 48)
Drupal\Core\Controller\HtmlFormController->getFormObject(Object, '\Drupal\upgrade_status\Form\UpgradeStatusForm') (Line: 58)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
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: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Same versions of everything as the OP

gábor hojtsy’s picture

Status: Active » Postponed

Users on 8.2.13 seem to experience this also outside of Upgrade Status. See https://github.com/php/php-src/issues/8251#issuecomment-1838517201 That issue has fixes to PHP itself that will be released in 8.2.14 or 8.2.15 as per the issue. Unless there is something we can fix in Upgrade Status, the only way to solve this is to wait for a corrected PHP version.

gorkagr’s picture

8.2.14 landed a few days ago :)

I dont know if DDEV updates php.automatically or a new release is needed, but smth for next week :)

Best

nick hope’s picture

I just upgraded my site from D9 to D10.2 then upgraded my DDEV PHP from 8.1 to 8.3.0. Now, when I run ddev drush updb, I am seeing this:

[warning] Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on https://github.com/php/php-src/issues ProjectCollector.php:224

I'm also seeing the similar error on /admin/reports/upgrade-status.

As I understand this comment, this should be fixed by PHP 8.3.1. Unfortunately my DDEV is still giving me 8.3.0 so I can't test.

steveoriol’s picture

Same here : D10.2.2 and php8.2
ddev drush st
[warning] Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on https://github.com/php/php-src/issues ProjectCollector.php:224

gorkagr’s picture

Status: Postponed » Needs review

Just updated DDEV to latest version and it comes with php8.2.15 (and it seems with 8.3.2 too based on the changelog)

The error on the CLI is gone, and i assume any other error.

I am moving this to "needs review" but I'd say that we can change it to "Fixed" and close the issue if more ppl have the msg gone

nick hope’s picture

Same here. I updated DDEV and it gave me PHP 8.3.2 and now the warning has gone.

gábor hojtsy’s picture

Status: Needs review » Fixed

Indeed, this is not something we can do anything about. Thanks for confirming!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.