[!!!][TASK] Drop PATH_thisScript constant 92/59392/10
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 9 Jan 2019 22:17:51 +0000 (23:17 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 11 Jan 2019 07:37:01 +0000 (08:37 +0100)
commite9d513ae052c5a12512103f4683a46cf6f1b3f1a
tree698dbdd27f49b8012e82c0bb87663b23fd33975e
parent82d2a234889a68ba3b6eb5290defe3ebb447a012
[!!!][TASK] Drop PATH_thisScript constant

The patch removes the definition of constant PATH_thisScript.

* The main change in SystemEnvironmentBuilder splits method
definePaths() into two parts calculateScriptPath() and
calculateRootPath() since definePaths() formerly communicated
the script path using the PATH_thisScript constant to method
initializeEnvironment(), which has to fall now. Note
initializeEnvironment() is now protected, which is ok since
that usage was only internally for the testing framework which
is resolved now, too.

* A raise of the testing framework from 5.0.1 to 5.0.2 is needed.
It also defined that constant and triggered some different code
paths with this in SystemEnvironmentBuilder.
composer require --dev typo3/testing-framework ~5.0.2

* With the changes in SystemEnvironmentBuilder,
Environment::getCurrentScript() now returns '.../bin/phpunit' and
not '.../typo3/index.php' in unit tests, which is more correct. This
however has the side effect that various path related unit tests
need an adaption to properly set up the environment as needed.

Change-Id: I7d16c488a3039b3de689bb8b1b903d989d943c8d
Resolves: #87391
Releases: master
Reviewed-on: https://review.typo3.org/59392
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
13 files changed:
composer.json
composer.lock
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/core/Classes/Resource/ResourceCompressor.php
typo3/sysext/core/Classes/Utility/PathUtility.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/core/Tests/Unit/Resource/ResourceCompressorIntegrationTest.php
typo3/sysext/core/Tests/Unit/Resource/ResourceCompressorTest.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/core/composer.json
typo3/sysext/felogin/Tests/Unit/Controller/FrontendLoginControllerTest.php
typo3/sysext/frontend/Tests/Unit/Typolink/AbstractTypolinkBuilderTest.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/ConstantMatcher.php