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

Idea: sort 'patches' alphabetically #614

Closed
fredden opened this issue Nov 4, 2020 · 5 comments · Fixed by #634
Closed

Idea: sort 'patches' alphabetically #614

fredden opened this issue Nov 4, 2020 · 5 comments · Fixed by #634
Assignees

Comments

@fredden
Copy link

fredden commented Nov 4, 2020

Steps required to reproduce the problem

When using cweagans/composer-patches, a list of modules is added to a new 'patches' key within 'extra'. This list of packages should be sorted alphabetically.

...
  "extra": {
    "patches": {
      "vendor/package": { ... },
      "another-vendor/module": { ... }
    },
    "patches-ignore": {
      "vendor/package": { ... },
      "another-vendor/module": { ... }
    }
  },
...

Expected Result

  • Lists of packages in extra -> patches and extra -> patches-ignore should be sorted alphabetically.

Actual Result

  • Lists of packages in extra -> patches and extra -> patches-ignore remains unchanged.
@localheinz localheinz self-assigned this Nov 10, 2020
@localheinz
Copy link
Member

Perhaps it would make sense to keep all entries in extra sorted by key when an entry is in object?

@localheinz
Copy link
Member

@fredden

Just released as ergebnis/composer-normalize:2.12.0!

Let me know how this works for you!

🤓

@fredden
Copy link
Author

fredden commented Dec 30, 2020

Thanks for this. Unfortunately I'm stuck on composer v1 for some projects, so can't test these changes fully yet. (There's an open issue for composer v1 support: #620.)

@localheinz
Copy link
Member

@fredden

Just released support for composer/composer:^1 as ergebnis/composer-normalize:2.13.0!

@fredden
Copy link
Author

fredden commented Dec 30, 2020

Wow, thanks for such a quick update! I've updated the version used in our continuous integration pipeline and can confirm this is working as expected. Thanks again for picking this up.

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

Successfully merging a pull request may close this issue.

2 participants