Problem/Motivation

Specifically opening this as a critical, per @xjm in Slack. And against 11.x, because that's the only branch with this problem.

In 11.x, \Drupal::VERSION says 11.4-dev: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal.ph...

This breaks modules' GitLab CI jobs for the next minor, since a core_version_requirement like ^11.5 doesn't match 11.4-dev. Example: https://git.drupalcode.org/project/drupal_cms/-/jobs/13459765#L327

Issue fork drupal-3636242

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phenaproxima created an issue. See original summary.

xjm’s picture

Title: \Drupal::VERSION is inaccurate » \Drupal::VERSION is inaccurate in 11.x, causing "next minor" CI jobs to fail
godotislate’s picture

main is currently 12.0-dev as well, when it probably should be 12.1-dev but it currently doesn't have any downstream effects.
https://git.drupalcode.org/project/drupal/-/blob/main/core/lib/Drupal.ph...

berdir made their first commit to this issue’s fork.

berdir’s picture

Status: Active » Needs review

Not sure if a regular MR is the correct approach here, but I'm also running into this in a new 11.5+ contrib module that is currently not passing on next minor, so I created one to get this started.

godotislate’s picture

Status: Needs review » Reviewed & tested by the community

I think this looks fine. main is not affecting contrib downstream, so we don't need to address that here necessarily, so fixing 11.x works for me.

Nightwatch is increasingly flaky and unrelated.

godotislate’s picture

Status: Reviewed & tested by the community » Needs review

Actually, I realized that 11.x is actually 11.6, and the next minor should presumably use 11.5.x. But I'm not sure how gitlab templates works, so back to NR.

godotislate’s picture

@xjm mentioned on Slack that it should be 11.6, so I applied my own suggestion.

godotislate’s picture

Status: Needs review » Reviewed & tested by the community

Change is trivial, back to RTBC.

xjm’s picture

I verified that this is the only place in 11.x that the constant is incorrect; the rest of the version constant info (in the metapackages and the components) is handled by the dev branch alias and/or is already correct. Just to be sure, I ran the following locally:

php -r "include 'vendor/autoload.php'; \Drupal\Composer\Composer::setDrupalVersion('.', '11.6-dev');"

...produces the exact diff in this issue.

COMPOSER_ROOT_VERSION="11.x-dev" composer update drupal/core* --no-progress --no-suggest -n -q

...generates no changes.

  • xjm committed 6b9c0e62 on 11.x
    fix: #3636242 \Drupal::VERSION is inaccurate in 11.x, causing "next...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

git-drmr'ed to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

berdir’s picture

I can confirm that my next minor jobs are now working correctly: https://git.drupalcode.org/project/menu_cache/-/pipelines/1041600

xjm’s picture

🎉