Michael Babker
Accumulator of low activity social media accounts. Possibly finding new ways to finalize PHP libraries. Opinions, while my own, generally aren’t popular.
@waterkip@defcon.social Follow https://github.com/composer/composer/issues/12691 since this looks like the exact same scenario you've described.
Looks like a possible Docker-free workaround could be using the --no-install flag with composer create-project, editing requirements and platform config, then installing dependencies.
IMO, it's fair that Composer assumes the currently running PHP version as a requirement for new projects, but it should be configurable (and seems Jordi agrees).
@waterkip@defcon.social I get the feeling the answer to that one ("run minimal PHP") is you being told "use the platform override config and --prefer-lowest flag liberally". And probably very tight dependency constraints (pinned versions instead of ranges, which if this is an application, seems fair). I get the feeling a more generalized "just assume the minimum supported version" mode isn't one they'd want to add considering there's something in place to do something very close.
@waterkip@defcon.social I needed no-scripts otherwise the post-create-project-cmd stuff was still firing off. I just did no-plugins also to make sure nothing that could've needed a composer install ran.
Looking at the diff, it looks like they changed some PDO stuff to the namespaced versions added in 8.4, but also added the Symfony PHP 8.4 polyfill to the dependencies, so that shouldn't have caused an issue (unless you're in an environment where ext-pdo_mysql isn't installed?)
