Problem/Motivation

If installing using `composer install --no-dev`, the symfony/css-selector package is not installed and library_attach errors in LibraryAttach->getLibrarySelectors().

When investigating composer.lock I see an error with the following message:
"error": "require.symfony/css-selector : invalid version constraint (Could not parse version constraint 3.0 - 6.*: Invalid version string \"3.0 - 6.*\")"

Steps to reproduce

Install composer dependencies passing the --no-dev flag.

Proposed resolution

Update library_attach composer.json to require a valid symfony/css-selector version constraint

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

adam-delaney created an issue. See original summary.

adam-delaney’s picture

Based upon composer's documentation this appears to be a valid constraint using Hyphenated Version Range, see: https://getcomposer.org/doc/articles/versions.md#hyphenated-version-range-. I wonder if it cannot be used in combination with wildcard?

dave reid’s picture

Hmm, odd. I wonder if this is just failing now on newer versions of Composer. I wonder if we could just use a more explicit dependency like ^4.0 || ^5.0 || ^6.0 || ^7.0.

I will add some CI integration so that we can snuff this out and get it resolved quickly!

dave reid’s picture

Actually it looks like it's already failing on CI: https://git.drupalcode.org/project/library_attach/-/jobs/283789

dave reid’s picture

adam-delaney’s picture

Looks like changes in your pull request (https://git.drupalcode.org/project/library_attach/-/merge_requests/1) are passing CI (https://git.drupalcode.org/project/library_attach/-/jobs/761744) and would solve this issue. Thanks Dave for looking into that. A release with this fix would be great!

  • Dave Reid committed 15a01947 on 1.x
    Issue #3419347 by adam-delaney, Dave Reid: Composer symfony/css-selector...
dave reid’s picture

Status: Active » Fixed

Merged and tagging release now!

dave reid’s picture

adam-delaney’s picture

Thanks Dave! Tested and works as expected.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.