FEATURE: Make legacyExtensions configurable

* Make property public to allow configuration through ruleset.xml
* Provide example configuration in ruleset.xml

Relates: #7
This commit is contained in:
Daniel Siepmann 2017-03-16 11:02:49 +01:00
parent 11cfcf8563
commit ae3c850e58
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 9 additions and 3 deletions

View file

@ -37,11 +37,11 @@ trait ClassnameCheckerTrait
* A list of extension names that might contain legacy class names. * A list of extension names that might contain legacy class names.
* Used to check clas names for warnings. * Used to check clas names for warnings.
* *
* Configure through ruleset.xml.
*
* @var array<string> * @var array<string>
*/ */
private $legacyExtensions = [ public $legacyExtensions = ['Extbase', 'Fluid'];
'Extbase',
];
/** /**
* @param string $mappingFile File containing php array for mapping. * @param string $mappingFile File containing php array for mapping.

View file

@ -1,4 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<ruleset name="TYPO3 Update"> <ruleset name="TYPO3 Update">
<description>Provides sniffs and fixes for TYPO3 Updates.</description> <description>Provides sniffs and fixes for TYPO3 Updates.</description>
<rule ref="Typo3Update.LegacyClassnames.Instanceof">
<properties>
<property name="legacyExtensions" type="array" value="Extbase,Fluid,Frontend,Core"/>
</properties>
</rule>
</ruleset> </ruleset>