New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #416 Session class incompatibility with PHP 7.x/8+ #417
Conversation
Due to difference in SessionInterfaceHandler interface in PHP 7.x and PHP 8+ gc method return type was ommited and suppressed warning as PHP 8+ It's better for future to make different version of Stash for PHP 7.x and PHP 8+ Minor change was made also to remove cmpatibility with PHP version before 5.4.0 while Stash package is compatible with 7+.
It's not clear to me what you're referring to in this PR @mitkola, it'd probably be better to reconsider how this might change now that this repository is PHP 8.0+ and describe the changes and why they are necessary in different words. |
The problem exist when installing stash with composer in php 7.2 (7.4) environment. Line 229 in a2c9df1
In short, when installing stash in php 7.2+ environment it produces syntax error at this line. I have to make workaround with downgrade and manually require version 0.16.0 of stash instead of automatically suggested 0.17.6.. |
PHP7 hasn't even had security updates in over a year. Don't run insecure ancient versions of PHP. |
@tedivm We considered Stash for use in a blogging engine, but not supporting PHP 7.x was a deal breaker. This is less about using it for new installations, which should run PHP 8.x, but providing an upgrade path for old installations. Also, there are still LTS distros out there that will provide (and patch) PHP 7.x, so actually not erroring out with them would be important. It would really be appreciated if you could reconsider, being backwards compatible would make Stash a lot more useful. At least for us. (I have no connection to the author of the PR, was just watching here). |
The existing PR wasn't suitable as it was doing things like setting up a workflow dispatch. What would be your preference? What was the last version that will work with your installs, and do you see a path for 0.17 working for it? |
PHP 7.4 would be enough for us :) That's usually achievable in those old installations.
Does 0.17 work with PHP 7.4 and PHP 8.x? Then yes, it would be an option to pin Stash to that older version. It would of course be nicer to be able to use the current version, but psr/cache also set the php minimum to 8.0 with its 2.0... |
Due to difference in SessionInterfaceHandler interface in PHP 7.x and PHP 8+ gc method return type was ommited and suppressed warning as PHP 8+ It's better for future to make different version of Stash for PHP 7.x and PHP 8+
Minor change was made also to remove cmpatibility with PHP version before 5.4.0 while Stash package is compatible with 7+.