Slim-Skeleton icon indicating copy to clipboard operation
Slim-Skeleton copied to clipboard

PHP version bump

Open JimTools opened this issue 1 year ago • 7 comments

With the recent... ish release of PHP 8.3, I think the project can bump the version. this wouldn't break backwards compatibility as the skeleton is only used to create a new Slim App and would also allow for other packages to be upgraded.

Supported Versions

JimTools avatar Feb 29 '24 12:02 JimTools

Hmm, but what if somebody wants to create a new app that should also be compatible with older PHP versions?

carlosmintfan avatar May 11 '24 20:05 carlosmintfan

I guess theirs an argument for both side, if you creating something new then newest language features are preferable and the performance gains form newer versions.

But if you’re constrained by your production environment would also be nice to have that option.

can you can tell I’m in the first camp, if your making something new use update things it also means you can make more assumptions as a maintainer (rightly or wrongly.)

Ultimately this is a decision is for the maintainers.

JimTools avatar May 12 '24 06:05 JimTools

What I'd suggest (yes, not a maintainer) is: if you want to drop something, drop 7.4. But not everything until 8.3. I'm using the latest Linux Mint distro, based on Ubuntu Jammy, I think, and there I've 8.1, I think. So please don't make the latest version of this package useless/hard for people just using the php version of their distro.

carlosmintfan avatar May 12 '24 16:05 carlosmintfan

A skeleton is simply a starting template for developers to build their applications from, but it should encourage them to leverage the latest tools. Keeping it aligned with the latest PHP version makes sense to me.

Those who prefer an older version can always roll back to a previous commit that does support that version.

rayblair06 avatar Oct 30 '24 08:10 rayblair06

I believe latest Slim framework now supports PHP 8.4. and links to this repo prominently as a great way to get started. So it would make sense (to me) that this project therefore also supports later PHP and other dependencies.

E.g. When I tried to upgrade to PHP 8.4 and latest slim in an existing slim skeleton project, most things were smooth but there was this

ERROR: DI\Definition\Resolver\ParameterResolver::resolveParameters(): Implicitly marking parameter $method as nullable is deprecated, the explicit nullable type must be used instead on line 38 in file /vendor/php-di/php-di/src/Definition/Resolver/ParameterResolver.php.

composer.json has this dependency: "php-di/php-di": "^6.4",

php-di 7.x I believe supports later PHPs.

Slim's composer.json suggests php-di.

anupshah avatar Jan 06 '25 21:01 anupshah

I will update this branch again, to 8.4 now it’s released.

JimTools avatar Jan 13 '25 21:01 JimTools

Thanks for your works so far @JimTools. Is there anything that I can do to get this issue resolved (and the PR merged)? I'm using the skeleton in my PHP classes and with each new PHP versions there's more deprecation notices to squash. So I'd love to help out if I can.

hochleitner avatar Jun 05 '25 15:06 hochleitner