Dependency version constraints evaluate true even the constraint strings aren't valid

Created on 29 July 2019, almost 5 years ago
Updated 21 July 2023, 11 months ago

Problem/Motivation

Found in #2641658-50: Module version dependency in .info.yml is ineffective for patch releases β†’

There are many cases where our the constraint strings for dependencies in our info.yml files will evaluate as true in \Drupal\Component\Version\Constraint::isCompatible() even they are not valid.

For example

  1. - mymodule (=2.0-but-also-nonsense)
  2. - mymdoule (=nonsense-plus-2.0)
  3. - mymodule (=2.oh-my-gosh-i-spilled-coffee-on-my-keyboard-0)

All evaluate as TRUE for the version 2.0

Proposed resolution

2 options,

  1. Validate our constraints and fix our regex
  2. Switch to using composer semver to evaluate while supporting 8.x- prefix and not adding support new options such as ^~. see #3069795-11: [meta] Improve dependency management for extensions β†’ for why we don't want to add new options

Remaining tasks

User interface changes

None

API changes

Data model changes

None

πŸ› Bug report
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
ExtensionΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024