File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 1
1
# TYPO3 extension for PHPStan
2
2
3
- TYPO3 CMS class reflection extension for PHPStan & ; framework-specific rules
3
+ > [ !NOTE]
4
+ > ` friendsoftypo3/phpstan-typo3 ` is obsolete and has been retired.
5
+ > The package dependency should be removed from TYPO3 project or extension development: ` composer rem --dev friendsoftypo3/phpstan-typo3 ` .
6
+ > See below for transition options.
7
+
8
+ ## Migrating away from friendsoftypo3/phpstan-typo3 since TYPO3 core v12
9
+
10
+ ### Switch to saschaegerer/phpstan-typo3
11
+
12
+ [ Sascha's package saschaegerer/phpstan-typo3] ( https://packagist.org/packages/saschaegerer/phpstan-typo3 ) can be an
13
+ alternative.
14
+
15
+ ### Remove package and rely on core annotations
16
+
17
+ * The list of global TYPO3 specific constants shrunk over time and phpstan finds more of the remaining ones by default.
18
+ phpstan may mumble about constants ` LF ` and ` CR ` not being defined. They can be made known to phpstan like this in
19
+ a ` phpstan.neon ` config file:
20
+ ```
21
+ parameters:
22
+ bootstrapFiles:
23
+ - phpstan.bootstrap.php
24
+ ```
25
+ File ` phpstan.bootstrap.php ` then contains:
26
+ ```
27
+ <?php
28
+ define('LF', chr(10));
29
+ define('CR', chr(13));
30
+ ```
31
+ * ` GeneralUtility::makeInstance() ` , ` Context->getAspect() ` , ` Query->execute() ` and ` QueryInterface->execute() `
32
+ have proper method annotations since TYPO3 v12, the phpstan extension classes are not needed anymore and
33
+ phpstan "understands" return values of these methods out of the box.
34
+ * ` ObjectManagerInterface->get() ` and ` ObjectManager->get() ` extensions have been removed from TYPO3 since v12
35
+ and are thus obsolete.
36
+
37
+ ## TYPO3 CMS class reflection extension for PHPStan & ; framework-specific rules
4
38
5
39
This extension provides the following features:
6
40
You can’t perform that action at this time.
0 commit comments