slimphp / Slim-Csrf

Slim Framework CSRF protection middleware
MIT License
338 stars 58 forks source link

PHP8 Support #128

Closed schiederme closed 3 years ago

schiederme commented 3 years ago

Hey, I ruined into the following error: ` Problem 1

My 'testing' solution is removing the required for now and add it manually as remote repository in composer.

Besides that PHP7.1 is (if im right) EOL.

Thanks, Maxi

schiederme commented 3 years ago

Ohhh

If installed, with requires php^7.1 its throws the following error on the slim project: [Wed Jan 6 01:29:54 2021] PHP Fatal error: Uncaught TypeError: rtrim(): Argument #1 ($string) must be of type string, Slim\Psr7\Factory\ResponseFactory given in /Users/maxi/Desktop/Workspace/schiederme/slim/vendor/slim/csrf/src/Guard.php:97 Stack trace:

schiederme commented 3 years ago

Running composer install with --ignore-platform-reqs fix the issue too, so my testing solution is nonsense.

l0gicgate commented 3 years ago

This repo is currently not compatible with PHP 8.0. We are working on converting all our repos at the moment.

schiederme commented 3 years ago

Ok, thank you. I will just use ignore platform for now. If you want, you can close this or let it open for other people (for now.)

hkvstore commented 3 years ago

Root composer.json requires slim/csrf ^1.0.0 -> satisfiable by slim/csrf[1.0.0]. - slim/csrf 1.0.0 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.

The composer.json of the just released v1.1.0 still requires "php": "^7.1". Does the new version support PHP 8?

Thanks.

akrabat commented 3 years ago

We need to update the travis configuration to test on PHP8 to find out.

akrabat commented 3 years ago

Slim-Csrf 1.2.0 released which will install on PHP 8.

hkvstore commented 3 years ago

Thank you very much. However, the current version of Slim still requires "php": "^7.2 || ^8.0", it would be nice if the requirements can be in sync. (Slim requires ^7.3 or Slim-Csrf supports ^7.2.)