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

Hotfix #61 - Clear global arrays on setUp - #66

Merged
Xerkus merged 2 commits into
zendframework:masterfrom
michalbundyra:hotfix/61
Apr 10, 2018
Merged

Hotfix #61 - Clear global arrays on setUp#66
Xerkus merged 2 commits into
zendframework:masterfrom
michalbundyra:hotfix/61

Conversation

@michalbundyra

Copy link
Copy Markdown
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

Scyt8l3 commented Apr 9, 2018

Copy link
Copy Markdown

@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

Xerkus commented Apr 10, 2018

Copy link
Copy Markdown
Member

@webimpress thank you

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

Copy link
Copy Markdown

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
Copy Markdown
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