Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Using client from browser kit component instead of http kernel component#10426

Merged
pamil merged 1 commit into
Sylius:1.3from
loevgaard:1.2
Jun 5, 2019
Merged

Using client from browser kit component instead of http kernel component#10426
pamil merged 1 commit into
Sylius:1.3from
loevgaard:1.2

Conversation

@loevgaard
Copy link
Copy Markdown
Contributor

Using client from browser kit component instead of http kernel component. I am using the deprecated version because the Symfony\Component\BrowserKit\AbstractBrowser is first introduced in SF4.3 (not sure this is correct?).

This commit fixes this issue when running behat tests:

Argument 1 passed to Sylius\Behat\Context\Api\Admin\ManagingTaxonsContext::__construct() must be an instance of Symfony\Component\HttpKernel\Client, instance of Symfony\Bundle\FrameworkBundle\KernelBrowser given

Q A
Branch? 1.3 and newer
Bug fix? Somewhat
New feature? no
BC breaks? no
Deprecations? no
License MIT

…ent. I am using the deprecated version because the Symfony\Component\BrowserKit\AbstractBrowser is first introduced in SF4.3. This commit fixed this issue when running behat tests: `Argument 1 passed to Sylius\Behat\Context\Api\Admin\ManagingTaxonsContext::__construct() must be an instance of Symfony\Component\HttpKernel\Client, instance of Symfony\Bundle\FrameworkBundle\KernelBrowser given`
@loevgaard loevgaard requested a review from a team as a code owner June 4, 2019 12:10
@pamil pamil merged commit 0713c47 into Sylius:1.3 Jun 5, 2019
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Jun 5, 2019

Thank you, Joachim! 🎉

@loevgaard loevgaard deleted the 1.2 branch June 5, 2019 11:45
@loevgaard
Copy link
Copy Markdown
Contributor Author

Thanks for the fast response! 🏎 💨

loevgaard added a commit to Setono/SyliusRedirectPlugin that referenced this pull request Jun 5, 2019
@loevgaard
Copy link
Copy Markdown
Contributor Author

For people finding this you can fix this temporarily by adding this to your services_test.yaml:

# todo remove this when this PR is merged https://github.com/Sylius/Sylius/pull/10426
services:
    test.client:
        class: Symfony\Component\HttpKernel\Client
        public: true
        arguments:
            - "@kernel"
            - "%test.client.parameters%"
            - "@test.client.history"
            - "@test.client.cookiejar"

loevgaard added a commit to Setono/SyliusMailchimpPlugin that referenced this pull request Jun 5, 2019
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Jun 6, 2019

It's going to be fixed by symfony/symfony#31881.

@loevgaard
Copy link
Copy Markdown
Contributor Author

Then we probably shouldn't merge this PR anyways, should we?

@pamil
Copy link
Copy Markdown
Contributor

pamil commented Jun 6, 2019

There's no need AFAIK, we don't use any behaviour that was specific to HttpKernel's Client, so it's fine and backward compatible.

@loevgaard
Copy link
Copy Markdown
Contributor Author

Okay, cool :)

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