Ilia Yatsenko
Ilia Yatsenko
@mnapoli, could we merge the patch proposed by @Chi-teck? Because the problem is actual.
@Firehed, @mnapoli, I solved this problem by implementing following logic (pseudocode). In 'di_compile.php' command: ```php @unlink($compiledContainerFile . $appEnv); $builder->addDefinitions(...$definitions); $builder->useAutowiring(true); // enable autowiring during compilation, i.e. can use autowire() in...
@alexandrmazur96, I do not see any difference between vendor and not-vendor classes in this regard. My approach implies using autowiring only in 2 cases: - during development; - during deployment,...
@alexandrmazur96, yes, you're right, putting all the existing classes in the compiled container is not an option. But thankfully to autowiring, all **used** classes will be collected automatically. And after...
>How so? Aren't you required to add a class to the definition list like SomeClass::class => autowire() before compiling the container? Yes, you're right, I still need to do it....
@alexandrmazur96, sorry, I was wrong in this exact statement: >all the services used by them will be resolved and included in compiled container automatically. As stated in the docs, you...