Project

General

Profile

Actions

Bug #89691

closed

Having declare(strict_types=1); in ext_* files breaks PHP because TYPO3 copies these files to a single one

Added by S P about 5 years ago. Updated almost 5 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2019-11-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using declare(strict_types=1); in ext_tables.php or ext_localconf.php can not be used currently because TYPO3 creates a combined cached version of all these files by copying them t oa single file. This leads to having declare(strict_types=1); in teh middle of the file - but it must only appear once and only on the first statement of any PHP source file.

This is the case for all TYPO3 versions supporting PHP7+.

Actions #1

Updated by Georg Ringer almost 5 years ago

  • Status changed from New to Rejected

THanks for creating the issue. the is true but not really a bug. I opened the issue https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/issues/694 to document also the usage of that.

Actions

Also available in: Atom PDF