Skip to content
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

Symfony Plugin breaks bootstrapFiles configuration #299

Open
shyim opened this issue Aug 11, 2022 · 5 comments
Open

Symfony Plugin breaks bootstrapFiles configuration #299

shyim opened this issue Aug 11, 2022 · 5 comments

Comments

@shyim
Copy link
Contributor

shyim commented Aug 11, 2022

I have in my bootstrapFiles a file which generates the containerXml file.
It looks like the containerXml will be parsed before the bootstrapFiles are executed and so the phpstan command fails always

@ondrejmirtes
Copy link
Member

How does it fail?

@shyim
Copy link
Contributor Author

shyim commented Aug 11, 2022

It just throws an error that it cannot find the xml file

@shyim
Copy link
Contributor Author

shyim commented Aug 11, 2022

For me it looks like that the XmlFactories are too early in the stack constructed before running the bootstrapFiles 🤔

@ondrejmirtes
Copy link
Member

Yeah, it's not meant to be used like that, you need to have the XML file generated already when you start PHPStan. You can create an alias in Makefile or Composer scripts so that it happens every time you run PHPStan.

This could be fixed in phpstan-symfony, but you'd have to inspect the stack traces and make sure that the container isn't requested before bootstrapFiles are called.

@shyim
Copy link
Contributor Author

shyim commented Aug 11, 2022

Yes we have a script but thats annoying in combination with PhpStorm. So when you delete the whole var/cache and then change anything phpstan triggered by phpstorm explodes.

So I would rather have this fixed in the extension :D. I can deliver the stacktrace

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

No branches or pull requests

2 participants