[BUGFIX] Harden fallback class map generation 03/45603/2
authorHelmut Hummel <info@helhum.io>
Wed, 6 Jan 2016 14:28:49 +0000 (15:28 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 13 Jan 2016 09:49:08 +0000 (10:49 +0100)
commit3522a11e9118456c20d91bc6b1c1377dd6554347
treec8ba2e051c9523b95321214ed090def0e2884854
parent8dab835989d7208bfabc0ba16c1f067d52da7123
[BUGFIX] Harden fallback class map generation

It could happen when an extension does not provide any
autoload definition, that valid classes are not or
invalid classes are taken into account during class map generation.

To fix this, update to latest composer code that supports
a blacklist for class map generation and provide tests
folder and ext_update files as valid black list.

Also add "Resources" and "res" folder to black list, which
very often also contain php classes, which are then manually required.

Also fix, streamline and add tests to verify this behavior.

Resolves: #72557
Releases: 7.6, master
Change-Id: I0b949fea8b23edbf9c8b92a4ff87218a66bd0918
Reviewed-on: https://review.typo3.org/45603
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Core/ClassLoadingInformationGenerator.php
typo3/sysext/core/Resources/PHP/ClassMapGenerator.php
typo3/sysext/core/Tests/Unit/Core/ClassLoadingInformationGeneratorTest.php
typo3/sysext/core/Tests/Unit/Core/Fixtures/test_extension/Tests/TestClass.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Core/Fixtures/test_extension/class.ext_update.php [new file with mode: 0644]