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

Context autowiring | autoconfiguration #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Guikingone
Copy link

@Guikingone Guikingone commented Jun 3, 2020

Note: This PR is opened in order to ease the discussions about the implementation, this is a work in progress 🙂

@Guikingone Guikingone changed the title feat(issue_62): autoconfigure & autowire Context autowiring | autoconfiguration Jun 3, 2020
.phpunit.result.cache Outdated Show resolved Hide resolved
phpunit.xml.dist Outdated Show resolved Hide resolved
@@ -63,6 +78,8 @@ public function configure(ArrayNodeDefinition $builder): void
->scalarNode('class')->defaultNull()->end()
->scalarNode('environment')->defaultNull()->end()
->booleanNode('debug')->defaultNull()->end()
->booleanNode('autoconfigure')->defaultFalse()->end()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess those options are not really related to the kernel configuration, so it should be on the same level with bootstrap and kernel options.


private function handleAutoConfiguration(ContainerBuilder $container): void
{
$container->registerForAutoconfiguration(Context::class)->addTag(self::CONTEXT_TAG);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably won't work, since $container here is Behat's container, not the application's container with all the context services. There's a bundle inside this extension where it is already implemented.

@Yozhef
Copy link
Contributor

Yozhef commented Nov 27, 2022

@Guikingone Hello, let me know if there is an inspiration to continue your work.)

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

Successfully merging this pull request may close these issues.

3 participants