バンドル内にこのコードを入れています
class MyPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
$container->get("plugin")->loadServices($container);
}
}
Web ブラウザー経由でアプリを通常どおり実行すると、すべて問題ないように見えます。ただし、作曲家を実行すると
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
コンパイラ クラス内からサービスを取得しようとすると、エラー ReflectionException: Class does not exist が返されるようです。これを解決する方法はありますか?
(このサービスは、カスタム プラグインのサービスのリストを登録するために使用されます。SF2 がキャッシュできるようにするには、コンパイラ パスのどこかで実行する必要があります)