Closed tysonlemire closed 2 weeks ago
The error is correct. Params expect a class name.
$di->params[YouShouldReferenceAClassNameHereNotAServiceName::class]['constructorParamOfReferencedClass'] = $di->lazyGet('something');
Thank you for the quick resolution!
The container fails to compile if a service within the config classes is defined using a lazyNew and a param.
Calling
ContainerBuilder
newCompiledInstance using the example for a config in the getting started docs causes an error.To reproduce the issue, patch
/tests/Fake/FakeLibraryConfig.php
and then run theContainerBuilderTest::testCompilationSerialization
test.output: