Closed
Description
Preconditions (*)
- Try to upgrade from version 2.4.2-p1 to 2.4.3
- MSI modules are disabled using a replace on composer.
Steps to reproduce (*)
- execute: composer require magento/product-community-edition=2.4.3 --no-update
- execute : composer update
Expected result (*)
- Magento was updated to version 2.4.3
Actual result (*)
- Has got an error :
Fatal error: Uncaught Error: Call to undefined function Magento\Framework\Filesystem\Directory\str_contains() in /var/www/html/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php:74
Class \Magento\Framework\Filesystem\Directory\DenyListPathValidator use a PHP 8.0 function. (str_contains)
....
foreach ($this->fileDenyList as $file) {
$baseName = pathinfo($actualPath, PATHINFO_BASENAME);
if (str_contains($baseName, $file) || preg_match('#' . "\." . $file . '#', $fullPath)) {
throw new ValidatorException(
new Phrase('"%1" is not a valid file path', [$path])
);
}
}
Notes
Based on requirement this version should work on PHP 7.4
https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html
And in the release note (https://devdocs.magento.com/guides/v2.4/release-notes/open-source-2-4-3.html) you wrote:
Magento 2.4.3 is not yet compatible with PHP 8.x, but the following platform upgrades bring us closer to future compatibility with PHP 8.x.