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

Exit on patch failure should use composer extra, not localPackage #166

Merged
merged 1 commit into from Nov 9, 2017
Merged

Exit on patch failure should use composer extra, not localPackage #166

merged 1 commit into from Nov 9, 2017

Conversation

kdebisschop
Copy link

@kdebisschop kdebisschop commented Nov 9, 2017

Under error handling, two mechanisms are given for halting on patch failure: setting an environment variable and adding an option to the extra section of composer.json. But only the first works - the composer.json setting does not work, or at least does not work as described.

It seems that the code is looking for the extra setting in $localPackage->getExtra() whereas I think it should be looking in the root composer.json $this->composer->getPackage()->getExtra().

This pull request changes the behavior to look only at the root. I am making the assumption that the root should take precedence over localPackage -- once could argue, I guess, that both should be consulted but since one major purpose of this setting is continuous integration, I think it probably expected that the root composer.json is the one that controls CI work flow and should be preferred.

@coveralls
Copy link

coveralls commented Nov 9, 2017

Coverage Status

Coverage decreased (-0.01%) to 2.424% when pulling a4519e8 on kdebisschop:exit-on-patch-fail into 4b1de2a on cweagans:master.

@cweagans cweagans merged commit 6440b5a into cweagans:master Nov 9, 2017
@cweagans
Copy link
Owner

cweagans commented Nov 9, 2017

Also pushed to 1.x.

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.

None yet

3 participants