- Issue created by @codebymikey
- @codebymikey opened merge request.
The ProxyBuilder doesn't work on newer PHP versions, in particular union types.
When trying to run the following:
php core/scripts/generate-proxy-class.php 'Drupal\book\BookManager' "core/modules/book/src"
or more accurately in my case:
php core/scripts/generate-proxy-class.php 'Drupal\book\BookManager' "modules/contrib/book/src/"
The following exception is thrown:
Error: Call to undefined method ReflectionUnionType::isBuiltin() in /var/www/html/web/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php on line 272
This is due to certain API changes in PHP.
Update the code to better support newer PHP 8.0+ type notation.
Provide issue fork.
Active
11.0 🔥
base system