62740[TASK] Move TYPO3_version constant to a dedicated class
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Georg Ringer +1
- Tymoteusz Motylewski +1
-
Verified V +2 Done
- Oliver Hader +2
- Georg Ringer +1
- TYPO3com +1 CI
Issues 1
Files 32
- typo3/sysext/about/Classes/Controller/AboutController.php1+9 −2
- typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php+9 −3
- typo3/sysext/backend/Classes/Controller/BackendController.php1+11 −3
- typo3/sysext/core/Classes/Console/CommandApplication.php+2 −1
- typo3/sysext/core/Classes/Console/CommandRequestHandler.php+2 −1
- typo3/sysext/core/Classes/Core/Bootstrap.php+2 −1
- typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php+1 −4
- typo3/sysext/core/Classes/DependencyInjection/ContainerBuilder.php+2 −1
- typo3/sysext/core/Classes/ExpressionLanguage/SiteConditionProvider.php+5 −2
- typo3/sysext/core/Classes/ExpressionLanguage/TypoScriptConditionProvider.php+4 −2
- typo3/sysext/core/Classes/Http/MiddlewareStackResolver.php+2 −1
- typo3/sysext/core/Classes/Imaging/IconRegistry.php+2 −1
- typo3/sysext/core/Classes/Information/Typo3Version.php3new+61 −0
- typo3/sysext/core/Classes/Package/PackageManager.php+2 −1
- typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php+4 −3
- typo3/sysext/core/Classes/Utility/VersionNumberUtility.php+3 −1
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-90007-GlobalConstantsTYPO3_versionAndTYPO3_branch.rstnew+43 −0
- typo3/sysext/extbase/Classes/Configuration/RequestHandlersConfigurationFactory.php+2 −1
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php+2 −1
- typo3/sysext/extbase/Classes/Persistence/ClassesConfigurationFactory.php+2 −1
Show 12 more files
- typo3/sysext/extbase/Classes/Reflection/ReflectionService.php+2 −1
- typo3/sysext/impexp/Classes/Export.php+2 −1
- typo3/sysext/install/Classes/Controller/AbstractController.php+2 −0
- typo3/sysext/install/Classes/Controller/InstallerController.php+2 −1
- typo3/sysext/install/Classes/Controller/LayoutController.php+2 −1
- typo3/sysext/install/Classes/Report/InstallStatusReport.php+5 −3
- typo3/sysext/install/Classes/Service/CoreVersionService.php+3 −15
- typo3/sysext/install/Classes/ViewHelpers/ConstantViewHelper.phpdeleted+0 −51
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ConstantMatcher.php+11 −1
- typo3/sysext/install/Resources/Private/Templates/Layout/MainLayout.html+1 −1
- typo3/sysext/install/Tests/Unit/Service/CoreVersionServiceTest.php+16 −47
- typo3/sysext/t3editor/Classes/T3editor.php+2 −1
Review log 1927
Show 12 earlier messages
-
Benni Mack uploaded patch set 1 12/18/19, 12:51
-
TYPO3com voted on patch set 1 V +1 12/18/19, 12:59 Completed build in 07m 58s on Wed, 18 Dec, 12:59 PM Test Summary: 69246 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39503
-
Benni Mack updated the commit message in patch set 2 12/23/19, 22:25
-
Benni Mack uploaded patch set 3 12/23/19, 22:31
-
TYPO3com voted on patch set 2 V -1 12/23/19, 22:38 Completed build in 12m 15s on Mon, 23 Dec, 10:38 PM Test Summary: 525 of 69578 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39562
-
TYPO3com voted on patch set 3 V -1 12/23/19, 22:41 Completed build in 09m 20s on Mon, 23 Dec, 10:40 PM Test Summary: 28 of 69578 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39563
-
TYPO3com voted on patch set 3 V +1 12/24/19, 08:18 Completed build in 9h 56m 21s on Tue, 24 Dec, 08:18 AM Test Summary: 69128 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39563
-
Anja Leichsenring commented on patch set 4 12/27/19, 16:15
Published edit on patch set 3. -
TYPO3com voted on patch set 4 V +1 12/27/19, 16:23 Completed build in 07m 51s on Fri, 27 Dec, 04:23 PM Test Summary: 69128 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39603
-
Oliver Klee commented on patch set 4 12/27/19, 17:16
AboutController.php:78UnresolvedAre you intentionally omitting the pair of parenthesis after the class name? -
Georg Ringer commented on patch set 4 12/27/19, 19:37
BackendController.php:223Unresolvedshould we move that one line up to a new variable?Typo3Version.php:20Unresolvedwhy is this public? this means there are 2 ways to access it, either use it directly or the getter. I would like to have only 1 way -
Benni Mack uploaded patch set 5 12/27/19, 20:20
-
Benni Mack commented on patch set 5 12/27/19, 20:22
I fixed the issues mentioned by Oli and Georg. The new Typo3Version() is now used when e.g. cache identifiers are set up, otherwise GeneralUtility::makeInstance(). -
TYPO3com voted on patch set 5 V -1 12/27/19, 20:42 Completed build in 16m 43s on Fri, 27 Dec, 08:42 PM Test Summary: 66 of 69578 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39608
-
Benni Mack uploaded patch set 6 12/27/19, 21:29
-
TYPO3com voted on patch set 6 V +1 12/27/19, 22:21 Completed build in 51m 19s on Fri, 27 Dec, 10:21 PM Test Summary: 69110 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39624
-
Oliver Hader commented on patch set 6 12/31/19, 12:20
Typo3Version.php:20UnresolvedThis is something we need to adjust in packaging script...Typo3Version.php:36UnresolvedShould we add an additional __toString() method here? -
Benni Mack uploaded patch set 7 12/31/19, 13:02
-
TYPO3com voted on patch set 7 V +1 12/31/19, 13:11 Completed build in 09m 12s on Tue, 31 Dec, 01:11 PM Test Summary: 69116 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39680
-
Tymoteusz Motylewski commented on patch set 7 01/03/20, 22:06
2c - can you shed some light how this change helps with opcache? - can't we make this class method static, so you don't have to create object all the time -
Benni Mack commented on patch set 7 01/06/20, 08:29
> Patch Set 7: > > 2c > - can you shed some light how this change helps with opcache? a) opcache does not cache "runtime" changes of course, such as $a = $b; it can pre-compile the code, but not the values. b) although the topic is not widely covered in blog posts or official docs (mostly in presentations on PHP conferences), you can do "fun" tests with https://www.php.net/manual/en/function.opcache-get-status.php to see what gets cached and what does not. c) the main thing with the define() is that it's in "global" state which cannot be opcached in namespaces classes (see this RFC for PHP 8.0) https://wiki.php.net/rfc/use_global_elements > - can't we make this class method static, so you don't have to create object all the time Yup. If we make it static (or basically allow people to add the static public properties), then we benefit from Opcache as well. But we cannot use this class in tests for dependency injection unfortunately. This is one of the main reasons I really dislike our "Utility" classes. Since PHP7, doing either static public class constants or methods as it is now, is not really relevant performance-wise anymore, since the method is only used a handful of times in TYPO3 Core during one PHP process and code has been byte-code converted already. -
Tymoteusz Motylewski commented on patch set 7 CR +1 01/06/20, 22:24
> Patch Set 7: > > > Patch Set 7: > > > > 2c > > - can you shed some light how this change helps with opcache? > a) opcache does not cache "runtime" changes of course, such as $a = $b; it can pre-compile the code, but not the values. > b) although the topic is not widely covered in blog posts or official docs (mostly in presentations on PHP conferences), you can do "fun" tests with https://www.php.net/manual/en/function.opcache-get-status.php to see what gets cached and what does not. > c) the main thing with the define() is that it's in "global" state which cannot be opcached in namespaces classes (see this RFC for PHP 8.0) https://wiki.php.net/rfc/use_global_elements > > > > - can't we make this class method static, so you don't have to create object all the time > Yup. If we make it static (or basically allow people to add the static public properties), then we benefit from Opcache as well. But we cannot use this class in tests for dependency injection unfortunately. This is one of the main reasons I really dislike our "Utility" classes. Since PHP7, doing either static public class constants or methods as it is now, is not really relevant performance-wise anymore, since the method is only used a handful of times in TYPO3 Core during one PHP process and code has been byte-code converted already. Thanks a lot for explanation! -
Georg Ringer voted on patch set 7 V +1 CR +1 01/08/20, 11:17
-
Oliver Hader voted on patch set 7 CR +1 01/09/20, 09:32
-
Oliver Hader voted on patch set 7 V +2 CR +2 01/09/20, 09:45
-
Oliver Hader merged patch set 8 01/09/20, 09:45
-
Oliver Hader commented on patch set 8 01/09/20, 09:46
→ change to release script "darth" at https://github.com/TYPO3/darth/pull/12