- Issue created by @mimpro
- πΊπΈUnited States ultimike Florida, USA
Why is this "Closed (won't fix)"? This is a real issue with PHP 8.3 and there appears to be a patch to fix it. What am I missing?
Without support for PHP 8.3, this module isn't really compatible with Drupal 11.
-mike
- π¬π§United Kingdom joachim
I don't think it's a PHP 8.3 problem, as that's what I have locally.
There's an overload of information in this issue summary. Was it generated with AI?
- πΊπΈUnited States ultimike Florida, USA
I get this error when running Drupal 11.2 locally with PHP 8.3 (via DDEV) and the most recent version release version of this module. I can't speak to the original poster or the issue summary.
-mike
- π¬π§United Kingdom joachim
Which version of nikic/php-parser do you have installed?
- πΊπΈUnited States ultimike Florida, USA
$ ddev composer show nikic/php-parser name : nikic/php-parser descrip. : A PHP parser written in PHP keywords : parser, php versions : * v5.6.0 released : 2025-07-27, this week type : library license : BSD 3-Clause "New" or "Revised" License (BSD-3-Clause) (OSI approved) https://spdx.org/licenses/BSD-3-Clause.html#licenseText homepage : source : [git] https://github.com/nikic/PHP-Parser.git 221b0d0fdf1369c71047ad1d18bb5880017bbc56 dist : [zip] https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56 221b0d0fdf1369c71047ad1d18bb5880017bbc56 path : /var/www/html/vendor/nikic/php-parser names : nikic/php-parser
- π¬π§United Kingdom joachim
Ok so the problem is this:
$constant_node->getDocComment()->getReformattedText();
It looks like an event constant is missing a doc comment.
Could you debug to see which one it is?
This is looking more and more like AI garbage:
This error occurs because the `EventNamesCollector` class attempts to call `getReformattedText()` on a potentially null `DocComment` object, and this method may not exist in newer versions of the nikic/php-parser library (^4.18 || ^5.0) when used with PHP 8.3.
@mimpro do not use AI in any of my issue queues again.
- π¬π§United Kingdom joachim
This was nothing to do with PHP 8.3, or with the version of nikic/php-parser.
It's because there's an event with no docblock.
@ultimike could you find which one it is and file a bug report for it on Drupal core (or whichever module) please?
The AI-generated summary is total garbage, and led us down the wrong path.
> 5. OR run any Module Builder drush command like `drush dcb:fixtures`
This is garbage. The dcb:fixtures command is for development use only for updating test fixtures. It probably won't show the bug as it uses a small subset of code to analyse.
> 6. OR try to use Module Builder's code generation functionality
I repeat -- do NOT use AI in my issue queues.
This is garbage. You can't use code generation until you've run analysis!
- πΊπΈUnited States ultimike Florida, USA
Thanks, @joachim!
In case anyone stumbles upon this issue in the future, the fix was in the drupal-code-builder/drupal-code-builder dependency. Here's the fix: https://github.com/drupal-code-builder/drupal-code-builder/commit/fe307b...
-mike
Automatically closed - issue fixed for 2 weeks with no activity.
- π²πΎMalaysia mimpro
Thanks joachim. I was desperately try to get help, i afraid that my words will messing more on the problem and that is why i asked ai to do the formatting after i tried to get around. After posting, i changed my my mind so i want to delete this. But i couldnt find delete button and that is why i changed it to won't fix. Anyway you guys did seriously get into the solution and my respect for you guys. Thanks