Required PHP Version is Incorrect
Bellardia opened this issue · comments
Bellardia commented
This project now relies on PHP 7.4+ at least, but composer.json
still indicates support for 7.1+:
"require": {
"php": "~7.1 || ^8.0"
},
Andreas Braun commented
It is correct.
fluff commented
Are you sure this is correct? I get a php linter error with php 7.3 on TypedCacheItem.php line 18, on https://github.com/doctrine/cache/blob/2.1.x/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php#L18
% php73 -l ./vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php
PHP Parse error: syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST) in ./vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php on line 18
It looks like type hinting for properties of a class/object was added in php 7.4. https://www.php.net/manual/en/migration74.new-features.php
Alexander M. Turek commented
Yes, we are. That piece of code is not executed on PHP 7.3.
fluff commented
Ah, I see. Thanks for clarifying, and sorry for the noise.