Project

General

Profile

Actions

Bug #82025

closed

Invalid declare strict_types in CMS 7 strikes again

Added by Anonymous over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-08-01
Due date:
% Done:

0%

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

Description

The latest version 1.4.1 of typo3/cms-composer-installers comes with a non 7.6-compatible strict_types declaration:

$ grep strict_types -r vendor/
vendor/typo3/cms/ChangeLog:2016-07-07  6c0ac42  #76984          [BUGFIX] Unsupported declare 'strict_types' (Christian Kuhn)
vendor/typo3/cms-composer-installers/src/Plugin/PluginImplementation.php:declare(strict_types=1);
vendor/typo3/cms-composer-installers/src/Plugin/Util/ExtensionKeyResolver.php:declare(strict_types=1);
vendor/typo3/cms-composer-installers/src/Plugin/Core/ScriptDispatcher.php:declare(strict_types=1);
vendor/typo3/cms-composer-installers/src/Plugin/Core/InstallerScripts/EntryPoint.php:declare(strict_types=1);
vendor/typo3/cms-composer-installers/src/Plugin/Core/StopInstallerScriptExecution.php:declare(strict_types=1);
vendor/typo3/cms-composer-installers/src/Plugin/Core/InstallerScriptsRegistration.php:declare(strict_types=1);
vendor/typo3/cms-composer-installers/src/Plugin/Core/InstallerScript.php:declare(strict_types=1);

TYPO3 7.6 should be free of those as already discussed in #76984 and #76989, so the required sub components should be free of them too, right? With version 1.3.x it's working again.

Actions #1

Updated by Christian Kuhn over 7 years ago

i guess the 1.4 branch is not meant to be compatible with core v7 anyway. is that correct helmut?

Actions #2

Updated by Helmut Hummel over 7 years ago

  • Status changed from New to Rejected

Thank you for your report.

The latest version 1.4.1 of typo3/cms-composer-installers

Correct. This is a separate package, which is maintained here: https://github.com/TYPO3/CmsComposerInstallers

comes with a non 7.6-compatible strict_types declaration

This is correct and wrong at the same time :)

It is correct, that version 1.4.0 is only compatible with PHP 7.0 and higher: https://github.com/TYPO3/CmsComposerInstallers/blob/2d078abb2f42f034dad34c948e6d9027e6935e3f/composer.json#L34

But it is perfectly compatible with TYPO3 7.6, given the PHP dependency is fulfilled.
Composer correctly respects the current PHP version during dependency resolving and does not offer version 1.4.0 if the PHP dependency is not met.
If you build your packages on a system with a different PHP version than the deployed code runs, you can configure your Composer with the PHP version of the target system:

https://github.com/TYPO3/CmsComposerInstallers/issues/67#issuecomment-319345285

If all this won't work for you, you can still force the previous version in your composer.json file:

https://github.com/TYPO3/CmsComposerInstallers/issues/67#issuecomment-319345285

To sum it up: The new composer installers version works fine with TYPO3 7.6 and is compatible with it. It however requires at least PHP 7.0

Last but not least, there is nothing that can or should be changed neither in the installers, and for sure not in TYPO3

Actions

Also available in: Atom PDF