-
-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Description
Version: nette/di master, PHP 8
Bug Description
There is an issue with ReflectionUnionType in PHP 8. When a function uses union type for return && the function is used in config file => it doesn't work as expected because nette counts with ReflectionNamedType, but ReflectionUnionType is returned. Unfortunately ReflectionUnionType doesn't have getName() method
See screenshot with error and call stack:
Steps To Reproduce
Just create simple TestClass and put these lines to neon config
parameters:
test: ::getenv("TEST") # reflection for getenv returns ReflectionUnionType
services:
router: App\Router\RouterFactory::createRouter
- App\Model\TestClass(%test%)
Possible Solution
- Check for reflection type. BC break? ¯_(ツ)_/¯
- Maybe it's PHP bug. But I couldn't find any bug report.
Metadata
Metadata
Assignees
Labels
No labels
