-
Hi Does PS 8.1.5 require PHP 8.x ? str_contains added in PHP 8: Not sure what is going here, but the solution from a QA member is to upgrade to PHP 8.
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 2 replies
-
Hello @ChillCode as far as we know PS 8.1.5 works with PHP 7.2 to PHP 8.1 If you have found a situation where PS 8.1.5 cannot run with PHP 7.2, the solution is not change the requirements page or the documentation. The solution is to fix the bug. PrestaShop 8.1.5 uses Symfony 4.4.50 . The class you mention Symfony 4.4.50 is marked to require PHP >=7.1.3 So it is possible - it needs confirmation - that you found a bug in Symfony 4.4.50, that is being used in PS 8.1.5, and the bug is that Symfony 4.4.50 is not compatible with PHP7. |
Beta Was this translation helpful? Give feedback.
-
Symfony Finder 4.3 https://github.com/symfony/finder/blob/4.3/Iterator/ExcludeDirectoryFilterIterator.php no str_contains Symfony Finder 4.4 https://github.com/symfony/finder/blob/4.4/Iterator/ExcludeDirectoryFilterIterator.php the str_contains has been added the composer.json of both versions states it's compatible with php 7.1 and above |
Beta Was this translation helpful? Give feedback.
-
Well looks like it was kinda assumed 😛 symfony/finder@030c59d |
Beta Was this translation helpful? Give feedback.
-
Oh, no I got it! They use str_contains because symfony/finder also requires symfony/polyfill-php80 which is supposed to give you the ability to use str_contains even if you are running php7 @ChillCode can you check if you have symfony/polyfill-php80 and if yes, why it does not work for you? |
Beta Was this translation helpful? Give feedback.
-
Hi @matks I just read #35790 and saw that function was called (nice method btw) then I read the recommendation for #35870 so I thought something changed. Searching at symfony repo people are using polyfills to solve the issue. |
Beta Was this translation helpful? Give feedback.
-
At my end symfony/polyfill-php80 is loaded, just updated a site last week and did not face that issue. Thanks for the clarification @matks |
Beta Was this translation helpful? Give feedback.
-
8.0.5 presta with php 7.4 - many modules from 1.7, 8.x 90 percent of the presta 1.7, 8.0 versions of the module work with php 7.4 version, so now, at least for a year, there will be no point in using php 8.1 version. I'm using presta 8 with some modules that are for presta 1.7 and I'm glad they work. Although the downside is that with php 8.1, presta 8 works much faster, but more server resources are needed. In general, presta 1.6 runs the fastest and uses the least amount of server resources. |
Beta Was this translation helpful? Give feedback.
Oh, no I got it!
They use str_contains because symfony/finder also requires symfony/polyfill-php80 which is supposed to give you the ability to use str_contains even if you are running php7
@ChillCode can you check if you have symfony/polyfill-php80 and if yes, why it does not work for you?