symfony / flex

Composer plugin for Symfony
MIT License
4.17k stars 183 forks source link

AssetMapper: upgrade packages when needed #996

Closed weaverryan closed 1 year ago

weaverryan commented 1 year ago

Hi!

The scenario:

If we do nothing, the user's tom-select is out of date and the user won't even know about it. The ^2.5 constraint is defined in the symfony/ux-autocomplete package.json file, but nothing enforces that or notifies the user.

With this small change, during a composer update/require, we look at the dependencies of all UX packages and compare them against the version in importmap.php. If they do not match, the package is upgraded to a version that matches.

Screenshot 2023-10-22 at 1 45 41 PM

We're not creating a fully-fledge package management by any means, but we don't need to. With a few notifications and things like this, we can keep the user's dependencies in sync with each other.

Unrelated: don't forget about that really cool other PR #978 ;)

Cheers!

weaverryan commented 1 year ago

fabbot failures are incorrect - they're trying to add PHP 8 only functions, while 1.x works on 7.1.

fabpot commented 1 year ago

Thank you @weaverryan.