FriendsOfBehat / SymfonyExtension

:musical_score: Extension integrating Behat with Symfony.
MIT License
472 stars 62 forks source link

Fix referencing context initializers #101

Closed kamazee closed 4 years ago

kamazee commented 4 years ago

With definition, that has been used instead of reference, container used to create 2 instances of initializer: one with service id, and one "anonymous", described by spl_object_hash in a container, which broke stateful initializers: in my case initializer was also used to reset state before next scenario/example, and initializing and resetting happened with different instances of initializer.

If the fix and test are OK, let me know if you want me to cherry-pick the fix onto master and created additional pull request for master.

pamil commented 4 years ago

Thank you, Alexander! :tada:

kamazee commented 4 years ago

Thanks @pamil ! It's a pleasure to be able to specify an updated version in composer.json in less than 24 hours since the pull request has been created.