Skip to content

BUGFIX: Enums throw ::__construct() does not exist on compilation #3458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 8.3
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

flow flow:core:compile

Exception [0] in line 666 ReflectionService.php: Method Neos\Demo\Components\Headline\HeadlineType::__construct() does not exist

22 ReflectionMethod::__construct("Neos\Demo\Components\Headline\HeadlineType", "__construct")
21 Neos\Flow\Reflection\ReflectionService::getMethodAnnotations("Neos\Demo\Components\Headline\HeadlineType", "__construct", "Neos\Flow\Annotations\Autowiring")
20 Neos\Flow\Reflection\ReflectionService::getMethodAnnotation("Neos\Demo\Components\Headline\HeadlineType", "__construct", "Neos\Flow\Annotations\Autowiring")
19 Neos\Flow\ObjectManagement\Configuration\ConfigurationBuilder::autowireArguments(array|1681|)
18 Neos\Flow\ObjectManagement\Configuration\ConfigurationBuilder::buildObjectConfigurations(array|28|, array|32|)
17 Neos\Flow\ObjectManagement\CompileTimeObjectManager::initialize(array|165|)
16 Neos\Flow\Core\Booting\Scripts::initializeObjectManagerCompileTimeFinalize(Neos\Flow\Core\Bootstrap)
15 call_user_func(array|2|, Neos\Flow\Core\Bootstrap)

Adding the enum check works.

if (enum_exists($classOrInterfaceName)) {
    continue;
}

The question is why does it only cause an error in my project? Because of the odd class path Components instead of Classes?
Anyways enum support was introduced via #2702 and should not be a problem ...

@kitsunet
Copy link
Member

What, where is this failing file?

@mhsdesign
Copy link
Member Author

its an presentational enum that i placed in Neos.Demo/Components ...

i suspect this happens because the point-cut class(.*\\....) attempts to build a proxy class for every class in the system as long as that is still true: #2553 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants