Skip to content

Conversation

lippserd
Copy link
Member

@lippserd lippserd commented Feb 8, 2022

Composer update will fail if a dependency requires a newer PHP version than the hardcoded one.

refs lippserd/docker-compose-icinga#23

@cla-bot cla-bot bot added the cla/signed label Feb 8, 2022
@lippserd lippserd requested a review from nilmerg February 8, 2022 12:25
@lippserd
Copy link
Member Author

lippserd commented Feb 8, 2022

@nilmerg If I remember correctly we hardcode the PHP version to a common minimum so releases have deps installed that are guaranteed to work. This should be PHP 7.0 for the moment right? We could add composer config platform.php $version in our scripts in order to set it.

lippserd added a commit to lippserd/docker-compose-icinga that referenced this pull request Feb 8, 2022
lippserd added a commit to lippserd/docker-compose-icinga that referenced this pull request Feb 8, 2022
@nilmerg
Copy link
Member

nilmerg commented Feb 8, 2022

I'm not sure if I can befriend the idea that the environment controls which minimum version we require 🤔

That's part of composer.json just like which versions of the libs should be installed in the given set. And that's not incorrect currently, only in the snapshot it might be wrong, but even that built fine in the latest runs. The problem is entirely on your side, since you have a custom build process. Just like the snapshots have here, and so the fix I see is only part of bin/make-snapshot.sh like in your own build process.

@lippserd
Copy link
Member Author

lippserd commented Feb 8, 2022

Sure, my fix is to override that platform config as it is just wrong since we dropped PHP 5.6 support. Platform is not about the version we support but the version composer installs the dependencies for. So I can't install newer IPL libs since they all require PHP >= 7. I'm also fine with hardcoding it in composer.json, but then it must be 7.0.

Edit: What I'm saying is that this repo is missing the "Drop PHP 5.6 support" completely.

@nilmerg
Copy link
Member

nilmerg commented Feb 8, 2022

What I'm saying is that this repo is missing the "Drop PHP 5.6 support" completely.

That is true, once composer.json requires a version that really drops it. As it stands, it does not do that. Nor does any released version of the ipl repositories.

@lippserd
Copy link
Member Author

lippserd commented Feb 8, 2022

What I'm saying is that this repo is missing the "Drop PHP 5.6 support" completely.

That is true, once composer.json requires a version that really drops it. As it stands, it does not do that. Nor does any released version of the ipl repositories.

I understand. You don't want to increase the platform version yet.

@lippserd lippserd closed this Feb 8, 2022
@lippserd lippserd deleted the composer-platform-php branch February 8, 2022 14:49
@nilmerg
Copy link
Member

nilmerg commented Feb 8, 2022

I also meant the fix I see is only part of bin/make-snapshot.sh. You're correct with your proposal, it's just not the correct location yet. Snapshots also override the library versions and force the install of the master everywhere, there the minimum required PHP version really might change and should probably be overridden. 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants