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

Packages not grouped with "update-lockfile" range strategy #12763

Closed
mbrodala opened this issue Nov 19, 2021 · 2 comments · Fixed by #12787
Closed

Packages not grouped with "update-lockfile" range strategy #12763

mbrodala opened this issue Nov 19, 2021 · 2 comments · Fixed by #12787
Labels
status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality

Comments

@mbrodala
Copy link
Contributor

How are you running Renovate?

WhiteSource Renovate hosted app on github.com

If you're self-hosting Renovate, tell us what version of Renovate you run.

No response

Please select which platform you are using if self-hosting.

No response

If you're self-hosting Renovate, tell us what version of the platform you run.

No response

Describe the bug

Given the following renovate.json:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    "config:base"
  ],
  "rangeStrategy": "update-lockfile",
  "packageRules": [
    {
      "matchPackagePrefixes": [
        "phpstan/"
      ],
      "matchPackageNames": [
        "jangregor/phpstan-prophecy",
        "saschaegerer/phpstan-typo3",
        "rector/rector"
      ],
      "groupName": "PHPStan"
    }
  ]
}

And the following composer.json:

{
    "require-dev": {
        "jangregor/phpstan-prophecy": "^0.8.0",
        "phpstan/phpstan": "^0.12.30",
        "rector/rector": "^0.11.57",
        "saschaegerer/phpstan-typo3": "^0.13"
    }
}

As can be seen, there's a package rule to group all PHPStan packages and related 3rd party packages. Strangely the rector/rector package is not part of the PHPStan package group update:

image

Since rector/rector 0.12.x depends on phpstan/phpstan 1.x both update pull requests are broken.

See mbrodala/renovate-phpstan-package-group#1 for a live example.

What am I missing?

Relevant debug logs

Logs
DEBUG: Dependency rector/rector is part of group PHPStan
DEBUG: Using group branchName template
DEBUG: Dependency saschaegerer/phpstan-typo3 is part of group PHPStan
DEBUG: 4 flattened updates found: jangregor/phpstan-prophecy, phpstan/phpstan, rector/rector, saschaegerer/phpstan-typo3
DEBUG: Returning 2 branch(es)
DEBUG: Fetching changelog: https://github.com/sascha-egerer/phpstan-typo3 (0.13.3 -> 1.0.0)
DEBUG: Fetching changelog: https://github.com/phpstan/phpstan (0.12.99 -> 1.2.0)
DEBUG: Fetching changelog: https://github.com/Jan0707/phpstan-prophecy (0.8.1 -> 1.0.0)
DEBUG: Fetching changelog: https://github.com/rectorphp/rector (0.11.60 -> 0.12.4)

Have you created a minimal reproduction repository?

I have linked to a minimal reproduction repository in the bug description

@mbrodala mbrodala added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Nov 19, 2021
@rarkins
Copy link
Collaborator

rarkins commented Nov 20, 2021

Groups are split between major and minor by default. If you really want them to be combined, you could try setting separateMajorMinor=false

@mbrodala
Copy link
Contributor Author

mbrodala commented Nov 22, 2021

That makes sense, and indeed adding "separateMajorMinor": false to the PHPStan package group made Renovate behave like expected:

image

Maybe this fact should be mentioned in the docs for separateMajorMinor.

mbrodala added a commit to mbrodala/renovate that referenced this issue Nov 22, 2021
mbrodala added a commit to pagemachine/renovate-config that referenced this issue Nov 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants