Skip to content

[DomCrawler] BC Break in Fix for #15398 #17601

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

Closed
raziel057 opened this issue Jan 29, 2016 · 4 comments
Closed

[DomCrawler] BC Break in Fix for #15398 #17601

raziel057 opened this issue Jan 29, 2016 · 4 comments

Comments

@raziel057
Copy link
Contributor

From this commit my functional tests are failing: 7365bc0

This is a BC break because behaviour have been changed (check the modifications in tests).
I used to make this kind of request:

$crawler = $this->client->request('GET', ''/secured/login', array(), array(), array(
    'HTTP_HOST' => $this->container->getParameter('my.host'),
));

So now we need to provide the full URI (with path for environment) or there is a best way to do the same as before?

@raziel057
Copy link
Contributor Author

In fact we just need to set HTTP_HOST in server parameter before calling request:

public function setUp()
{
    $this->client = static::createClient();
    $this->container = static::$kernel->getContainer();
    $this->client->setServerParameter('HTTP_HOST', $this->container->getParameter('my.host'));
}

But I think the BC break needs to be documented even if it was a bad behaviour before.

@jakzal
Copy link
Contributor

jakzal commented Jan 29, 2016

@raziel057 have you looked at #16265?

@raziel057
Copy link
Contributor Author

@jakzal yes I know it's a bug fix but maybe the change can be documented. I close this issue.

@jakzal
Copy link
Contributor

jakzal commented Feb 1, 2016

@raziel057 please propose a PR if you think think this is something worth documenting. I might be missing something in this particular case, because bug-fixes are usually not treated as BC breaks.

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