PHP 7.4 exception: union types not supported #1

Closed
opened 2023-03-06 10:51:08 +01:00 by jpmschuler · 0 comments
jpmschuler commented 2023-03-06 10:51:08 +01:00 (Migrated from github.com)

composer.json marks this extension with PHP 7.4 compatibility.

However installing it in a TYPO3 11LTS running PHP 7.4 creates an exception at
protected function createResponse(string|false $content, int $cacheHeaderTime): ResponseInterface
for the union type string|false.

Union types were introduced with PHP 8

So it seems 1.1.1, 1.1.2, 1.1.3 are actually not PHP 7.4 compatible

`composer.json` marks this extension with PHP 7.4 compatibility. However installing it in a TYPO3 11LTS running PHP 7.4 creates an exception at [`protected function createResponse(string|false $content, int $cacheHeaderTime): ResponseInterface`](https://github.com/codemacherUG/tile_proxy/blob/main/Classes/Controller/TileProxyController.php#L74) for the union type `string|false`. [Union types were introduced with PHP 8](https://www.php.net/manual/en/language.types.declarations.php) So it seems 1.1.1, 1.1.2, 1.1.3 are actually not PHP 7.4 compatible
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemacher/tile_proxy#1
No description provided.