MyIntervals / emogrifier

Converts CSS styles into inline style attributes in your HTML code.
https://www.myintervals.com/emogrifier.php
MIT License
907 stars 154 forks source link

Inconsistency in dev tool versions selected for CI build #1233

Closed JakeQZ closed 1 year ago

JakeQZ commented 1 year ago

PHIVE installs the exact version specified as installed in the phars.xml file.

Composer tests against the lowest and highest versions of tools that satisfy the version constraint.

From #1227:

I'd prefer use to have pinned versions for our CI tools: I don't want our CI build to fail if we haven't changed anything (and it's not due to an update to a production dependency).

From #1228:

I am curious to know why our CI/weekly build seems to keep using the minimum version of the PHIVE Phars, rather than the latest that satisfy the version constraint.

That's because phive install (which we're using in the CI pipeline) installs the exact version configured as installed in the phars.xml, while phive update <package> would install the highest version allowed by version:

<phar name="php-cs-fixer" version="^3.13.0" installed="3.13.0" location="./.phive/php-cs-fixer" copy="false"/>

phive update will also update the installed version in the phars.xml, but leave the version alone.

(I usually update both when updating our CI tools.)

1221 arose because a newer version of a dev tool installed via Composer introduced some Psalm annotations which broke the CI build.

For consistency, we should either

JakeQZ commented 1 year ago

I added the discussion label, but as I wrote the OP, I realized I knew where this was going:

Specify exact version numbers in the require-dev section of composer.json, so that unforseen minor or point releases won't break the CI build.

@oliverklee, can you confirm that you agree?

JakeQZ commented 1 year ago

Possibly Tilde version range would work, e.g. ~2.7.0 would allow 2.7.x but not 2.8.x. That way we would allow polnt fixes without breaking the CI build - hopefully.

oliverklee commented 1 year ago

Then I'm for using exact versions for dev dependencies. That would be consistent with how PHIVE works.