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

Checks that getForPackageVersion() has returned a ConstraintInterface #1

Merged
merged 2 commits into from
Nov 22, 2019

Conversation

bikerdave
Copy link
Contributor

@bikerdave bikerdave commented Nov 21, 2019

If you use a configuration without package versions specified it only works on the initial composer install.

{
    "patches": {
        "vendor/project": {
            "Patch description": "https://www.example.com/remote.patch",
        }
    }
}

The next time composer install is run a PatchAlreadyApplied exception is raised, but fails when the constructor tries to get the package version:

// $patch->getForPackageVersion() returns null
$message = 'The patch "'.$patch->getDescription().'" for '.$patch->getForPackageVersion()->getPrettyString().' provided by '.$patch->getFromPackage()->__toString().' is already applied.';

@mlocati
Copy link
Owner

mlocati commented Nov 22, 2019

👍 thanks!!

@mlocati mlocati merged commit 5884839 into mlocati:master Nov 22, 2019
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.

2 participants