Download the PHP package friendsoftypo3/phpstan-typo3 without Composer
On this page you can find all versions of the php package friendsoftypo3/phpstan-typo3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download friendsoftypo3/phpstan-typo3
More information about friendsoftypo3/phpstan-typo3
Files in friendsoftypo3/phpstan-typo3
Package phpstan-typo3
Short Description TYPO3 rules for PHPStan
License GPL-2.0-or-later
Informations about the package phpstan-typo3
TYPO3 extension for PHPStan
TYPO3 CMS class reflection extension for PHPStan & framework-specific rules
This extension provides the following features:
- Provides correct return type for
\TYPO3\CMS\Core\Context\Context->getAspect()
. - Provides correct return type for
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance()
. - Provides correct return type for
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface->get()
. - Provides correct return type for
\TYPO3\CMS\Extbase\Object\ObjectManager->get()
. - Provides correct return type for
\TYPO3\CMS\Extbase\Persistence\Generic\Query->execute()
. - Provides correct return type for
\TYPO3\CMS\Extbase\Persistence\QueryInterface->execute()
.
Details on GeneralUtility::makeInstance()
Dynamic return types are returned for: * `GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class)` * `GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler')` * `GeneralUtility::makeInstance(self::class)` * `GeneralUtility::makeInstance(static::class)`Details on ObjectManagerInterface::get() and ObjectManager::get()
Dynamic return types are returned for: * `ObjectManager->get(\TYPO3\CMS\Core\DataHandling\DataHandler::class)` * `ObjectManager->get('TYPO3\\CMS\\Core\\DataHandling\\DataHandler')` * `ObjectManager->get(self::class)` * `ObjectManager->get(static::class)`Installation & Configuration
To use this extension, require it in Composer:
Once installed, put this into your phpstan.neon
config:
FAQ
I found this extension and the one from Sascha (
saschaegerer/phpstan-typo3
). Why are there two extensions and which should I use?
Well, this package has one specific purpose. It's made to help making the TYPO3 core phpstan max level compatible. To achieve this, the core team needs to be able to have its own extension which can be quickly adjusted as soon as the core itself changes. If for example, a new core version is released, the core team can quickly raise the dependency constraints for typo3/cms-core
and typo3/cms-extbase
which cannot be done when working with Sascha's package.
Also, Sascha's package contains dynamic return type providers that are not needed (yet) to make the core more compatible with phpstan.
To sum it all up: There is no competition between both extensions and this extension should not be used by users but only by the TYPO3 core.