Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Hotfix #61 - Clear global arrays on setUp #66

Merged
merged 2 commits into from
Apr 10, 2018
Merged

Hotfix #61 - Clear global arrays on setUp #66

merged 2 commits into from
Apr 10, 2018

Conversation

michalbundyra
Copy link
Member

Fixes #61

As described in #61 in case of request uri contains "phpunit" response is always 404, because request is wrongly created from global arrays with all PHPUnit request data etc.

I think we should clear all global arrays when we run these integration tests.
I'm not sure if it has any impact on current users. All our tests pass with these changes. It would be nice to test it with some applications.

We have to set args (and argv for consistency) because args is checked on constucting console request:
https://github.com/zendframework/zend-console/blob/master/src/Request.php#L43-L48
and here we got before all params passed to phpunit runner.

/cc @Scyt8l3 - would you be able to test that branch with your application to check if all works correctly? Thanks!

  • Are you fixing a bug?
    • Detail how the bug is invoked currently.
    • Detail the original, incorrect behavior.
    • Detail the new, expected behavior.
    • Base your feature on the master branch, and submit against that branch.
    • Add a regression test that demonstrates the bug, and proves the fix.
    • Add a CHANGELOG.md entry for the fix.

@Scyt8l3
Copy link

Scyt8l3 commented Apr 9, 2018

@webimpress Great, It's work. Now just waiting for the hotfix to be merged

@Xerkus Xerkus added this to the 3.2.1 milestone Apr 9, 2018
@Xerkus Xerkus merged commit a9870f8 into zendframework:master Apr 10, 2018
Xerkus added a commit that referenced this pull request Apr 10, 2018
Xerkus added a commit that referenced this pull request Apr 10, 2018
Xerkus added a commit that referenced this pull request Apr 10, 2018
@Xerkus
Copy link
Member

Xerkus commented Apr 10, 2018

@webimpress thank you

@michalbundyra michalbundyra deleted the hotfix/61 branch April 11, 2018 12:13
@loic-couharde
Copy link

Hi @webimpress,
A lot of vendors are using Global arrays to work and this PR breaks a lot of the vendors I use in my project since the the 3.2.1 release.
Can you consider fine fixing the problem instead of clearing all Global arrays (I don't think it is a normal behavior for a php application to be loaded with empty Global arrays)?
Thanks.

@michalbundyra
Copy link
Member Author

@lo-cwb Please report separate issue or PR, as you can see this one is merged and released.
Please describe what issues you have notice etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Value "phpunit" in route parameters
4 participants