Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Release/2.0.0 - Composer 2 Compatibility #36

Merged
merged 8 commits into from
Feb 16, 2021
Merged

Release/2.0.0 - Composer 2 Compatibility #36

merged 8 commits into from
Feb 16, 2021

Conversation

JParkinson1991
Copy link
Contributor

@JParkinson1991 JParkinson1991 commented Nov 24, 2020

The following PR will make this package compatibile with Composer version 2.

  • Added .gitignore
  • Track package dependencies via commited composer.locl
  • Update Plugin adding missing PluginInterface methods
  • Add missing constructor argument to src/Netresearch/Composer/Patches/Downloader/Composer.php

A major version bump is required here, due to the changes in src/Netresearch/Composer/Patches/Downloader/Composer.phpas the package can no longer be compatibile with both composer 1 and 2 simultaneously.

Consumers of this package can still require either version 1 or 2 as no pulic interfaces have changes.

{
    "require": {
        "netresearch/composer-patches-plugin": "^1.0 || ^2.0"
    }
}

For those wanting to use these changes now following instructions here: #36 (comment)

- Set package version number to 2.0.0
- Update Plugin class implementing missing PluginInterface methods
- Fix RemoteFilesystem constructor missing Config object
- Track dependencies in git (composer.lock)
@JParkinson1991
Copy link
Contributor Author

Looks like most of the PrettyCI errors are coming from exisiting source, i do not think they should delay the merge of this PR.

@JParkinson1991
Copy link
Contributor Author

For those looking to use these changes prior to this PR being merged do the following:

Bump the require constraints where this package is used

{
    "require": {
        "netresearch/composer-patches-plugin": "^1.0 || ^2.0"
    },
}

Add the forked repository as a project repository
Note: If providing packages via a metapack, add this repository definition to the main project composer.json

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/JParkinson1991/composer-patches-plugin"
        }
    ],
}

Update the package

composer update netresearch/composer-patches-plugin ^2.0

@CybotTM
Copy link
Member

CybotTM commented Nov 24, 2020

We do not provide a composer.lock file as part of this repository, because this is not a standalone application. Please remove it from your PR.

@CybotTM
Copy link
Member

CybotTM commented Nov 24, 2020

Hi @JParkinson1991 ,

thanks for your PR - please review my comments.

@CybotTM
Copy link
Member

CybotTM commented Nov 24, 2020

And please also consider updating the README.

@JParkinson1991
Copy link
Contributor Author

@CybotTM i have removed composer.lock and added it to .gitignore

Around adding version to composer.json I usually add it manually to all plugin's etc i maintain, but that follows my release process which may not be applicable here. It has been removed.

@JParkinson1991
Copy link
Contributor Author

What's blocking the merge/release of this?

@CybotTM
Copy link
Member

CybotTM commented Jan 5, 2021

Hi @JParkinson1991 ,

What's blocking the merge/release of this?

Nothing, except the two tiny code formatting issues.
Oh, and an updated README - it still refers to version 1.* of this plugin.

Thank you for your effort.

@JParkinson1991
Copy link
Contributor Author

I wonder if it's worth forgetting about PrettyCI for now, given it seems to be abandoned? https://prettyci.com/goodbye

Given the pressing need to have something out there composer 2 compatible do you release now and look to implement code standard enforcement/validation etc (possibly(using github actions) as part of a subsequent release?

@CybotTM CybotTM merged commit 12597c5 into netresearch:master Feb 16, 2021
@hvt
Copy link

hvt commented Feb 24, 2021

Hey @JParkinson1991 thanks for the work! @CybotTM would a new tag be possible for this work to reach the public :]?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants