You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespace Some\Package;
use FancyTrait;
class SomeClass {
use FancyTrait;
}
Uncaught Exception: TYPO3\Flow\Core\Booting\Exception\SubProcessException
Message
Uncaught Exception: TYPO3\Flow\Object\Exception\UnknownObjectException
Message
The object "PackageManagerInterface" which was specified as a property
in
the object configuration of object
"Some\Package\SomeClass"
(automatically registered class) does not exist. Check for spelling
mistakes and if that dependency is correctly configured.
More Information
Exception code 1265213849
File
Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Object/DependencyInjection/ProxyClassBuilder.php
line 538
Reference code 20141231173308a299ca
More Information
Exception code 1355480641
File Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Booting/Scripts.php line 528
Reference code 201412311733073dade3
To get around the issue, I have to use anything used in the trait in the class that uses the trait. That means that the following does not trigger the same error:
namespace Some\Package;
use FancyTrait;
use TYPO3\Flow\Package\PackageManagerInterface;
class SomeClass {
use FancyTrait;
}
So, Flow needs to be able to look in traits while compiling. It is really ugly to import things that the file is not using, and PhpStorm helpfully offers to remove those unused references, so it's easy to end up with a broken system since Flow is not taking traits into account.
Jira issue originally created by user cognifloyd:
Given the following trait (as a random example of a trait that includes an imported property):
The following does not work:
To get around the issue, I have to
use
anythinguse
d in the trait in the class that uses the trait. That means that the following does not trigger the same error:So, Flow needs to be able to look in traits while compiling. It is really ugly to import things that the file is not using, and PhpStorm helpfully offers to remove those unused references, so it's easy to end up with a broken system since Flow is not taking traits into account.
Jira-URL: https://jira.neos.io/browse/FLOW-170
The text was updated successfully, but these errors were encountered: