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

feat(preset): group PHPStan packages together #15509

Merged
merged 8 commits into from May 13, 2022

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented May 9, 2022

Changes

Adds a new group preset that groups all PHPStan related packages together.

Context

PHPStan is one of the de-facto standard static analysis tools in the PHP ecosystem. It is developed at https://github.com/phpstan where also the default extensions are hosted in dedicated repos. There are also many third-party extensions like e.g. https://github.com/szepeviktor/phpstan-wordpress. Of course all packages are using Composer to correctly define the dependencies between them, but often you have to update phpstan first and e.g. phpstan-webmozart-assert afterwards. Or you just update them together, which is why I thought this group might be helpful for others as well.

Example package names: phpstan/phpstan, phpstan/phpstan-webmozart-assert, szepeviktor/phpstan-wordpress

Or is use-case too specific to add it into renovate core presets?

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Example run result
image

lib/config/presets/internal/group.ts Outdated Show resolved Hide resolved
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@herndlm
Copy link
Contributor Author

herndlm commented May 9, 2022

just to make sure I'm not doing something here that the author is advising against - @ondrejmirtes do you also think it makes sense that renovate updates phpstan + extensions in the same PR by default or do you see reasons against that? I would also include 3rd party extensions or do you think we should avoid that?

@ondrejmirtes
Copy link

I don't understand. What's the current behaviour and what this PR change?

PHPStan extension updates and PHPStan itself do not happen on the same schedule. There can be many extension updates between each PHPStan release, and some extension aren't update for months while PHPStan is updated many times.

@herndlm
Copy link
Contributor Author

herndlm commented May 9, 2022

Ah sorry to drag you into this without much context. It would just group updates if possible basically. If there's only a phpstan update you get a dedicated PR, if there's only an extension update you also get a dedicated PR. But if there are multiple phpstan related updates, or you just wait long enough until there are, it would group them together in one PR.
Upside I see: if extensions require the same new phpstan version for whatever reason, then this can be done in one PR instead of two where the first one is a precondition of the other.
It's the same as renovate handles symfony packages for example.

Update: sorry, hit save too soon.

@ondrejmirtes
Copy link

I'm not a Renovate expert to decide this. The way I got Renovate set up, all my updates are grouped for each package.json/composer.json in my project.

@ondrejmirtes
Copy link

But to me it seems weird to have an exception for PHPStan like that. It'd make sense to do this for all vendors (or none at all).

@herndlm herndlm requested a review from viceice May 9, 2022 20:52
@herndlm herndlm changed the title feature(preset): group PHPStan packages together feat(preset): group PHPStan packages together May 9, 2022
herndlm and others added 2 commits May 11, 2022 06:49
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@herndlm herndlm requested a review from viceice May 11, 2022 08:07
@viceice viceice enabled auto-merge (squash) May 11, 2022 09:45
@viceice viceice merged commit 9ea60bb into renovatebot:main May 13, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.51.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@herndlm herndlm deleted the group-phpstan branch May 13, 2022 07:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2022
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.

None yet

4 participants