Elao / PhpEnums

:nut_and_bolt: Extended PHP 8.1+ enums features & specific integrations with frameworks and libraries
MIT License
326 stars 27 forks source link

Remove symfony/framework-bundle from require-dev #118

Closed bnymn closed 3 years ago

bnymn commented 3 years ago

Hi there,

I have just realized that your package does not really need symfony/framework-bundle. Can we please remove it?

I am using this package in my bundle, and I get the following error message when I run my tests.

Symfony\Component\Config\Definition\Exception\InvalidConfigurationException : The child node "resource" at path "framework.router" must be configured.
"name": "symfony/framework-bundle",
"version": "v4.4.0",
ogizanagi commented 3 years ago

Hi @bnymn

I think there is a misunderstanding here. As you can see in your PR, the tests are failing. This is because the Framework bundle is used in integration tests to check all the features related to Symfony and the bundle are properly working. Tests are even booting a Symfony app using the FrameworkBundle. So this dependency IS required for us.

Now regarding your issue, note that the symfony/framework-bundle dependency is in our require-dev section of composer.json. This means these dependencies are not installed when you require elao/enum in your project or bundle. These dependencies are only installed whenever you fork the project locally and run composer install/update to dev and run tests of this repository.

I'm unsure why you get this issue. But I really suspect this is not related to the require-dev dependencies of elao/enum. So I'm gonna close your PR for now.

EDIT: actually tests aren't failing as I expected 😄 But this is only because DoctrineBundle still is part of the dependencies and is requiring itself the framework-bundle. Conclusion is the same :)