Skip to content
Snippets Groups Projects
Commit 2d16d390 authored by Christian Kuhn's avatar Christian Kuhn Committed by Anja Leichsenring
Browse files

[TASK] PhpStorm understands ContainerInterface->get()

PhpStorm now understands that PSR-11
ContainerInterface->get() returns an
instance of the first argument.

Resolves: #99929
Releases: main
Change-Id: I4c3e77aed92ce4e9b318923577ce346515a6299c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77829


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent eabbc850
Branches
Tags
No related merge requests found
......@@ -3,13 +3,10 @@
/**
* Extend PhpStorms code completion capabilities by providing a meta file
*
* Kudos to Alexander Schnitzler's work, see https://github.com/alexanderschnitzler/phpstorm.meta.php-typo3
* @link https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html
*/
namespace PHPSTORM_META {
// Contexts
// @see https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.4/Feature-85389-ContextAPIForConsistentDataHandling.html
expectedArguments(
\TYPO3\CMS\Core\Context\Context::getAspect(),
0,
......@@ -21,7 +18,6 @@ namespace PHPSTORM_META {
'language',
'typoscript'
);
override(\TYPO3\CMS\Core\Context\Context::getAspect(), map([
'date' => \TYPO3\CMS\Core\Context\DateTimeAspect::class,
'visibility' => \TYPO3\CMS\Core\Context\VisibilityAspect::class,
......@@ -31,7 +27,6 @@ namespace PHPSTORM_META {
'language' => \TYPO3\CMS\Core\Context\LanguageAspect::class,
'typoscript' => \TYPO3\CMS\Core\Context\TypoScriptAspect::class,
]));
expectedArguments(
\TYPO3\CMS\Core\Context\DateTimeAspect::get(),
0,
......@@ -41,7 +36,6 @@ namespace PHPSTORM_META {
'full',
'accessTime'
);
expectedArguments(
\TYPO3\CMS\Core\Context\VisibilityAspect::get(),
0,
......@@ -49,7 +43,6 @@ namespace PHPSTORM_META {
'includeHiddenContent',
'includeDeletedRecords'
);
expectedArguments(
\TYPO3\CMS\Core\Context\UserAspect::get(),
0,
......@@ -60,7 +53,6 @@ namespace PHPSTORM_META {
'groupIds',
'groupNames'
);
expectedArguments(
\TYPO3\CMS\Core\Context\WorkspaceAspect::get(),
0,
......@@ -68,7 +60,6 @@ namespace PHPSTORM_META {
'isLive',
'isOffline'
);
expectedArguments(
\TYPO3\CMS\Core\Context\LanguageAspect::get(),
0,
......@@ -79,7 +70,6 @@ namespace PHPSTORM_META {
'legacyLanguageMode',
'legacyOverlayType'
);
expectedArguments(
\TYPO3\CMS\Core\Context\TypoScriptAspect::get(),
0,
......@@ -99,7 +89,6 @@ namespace PHPSTORM_META {
'frontend.controller',
'frontend.typoscript',
);
override(\Psr\Http\Message\ServerRequestInterface::getAttribute(), map([
'frontend.user' => \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class,
'normalizedParams' => \TYPO3\CMS\Core\Http\NormalizedParams::class,
......@@ -123,7 +112,6 @@ namespace PHPSTORM_META {
'module',
'moduleData'
);
override(\TYPO3\CMS\Core\Http\ServerRequest::getAttribute(), map([
'frontend.user' => \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class,
'normalizedParams' => \TYPO3\CMS\Core\Http\NormalizedParams::class,
......@@ -144,4 +132,8 @@ namespace PHPSTORM_META {
\TYPO3\CMS\Core\Routing\PageArguments::class,
\TYPO3\CMS\Core\Routing\RouteResultInterface::class,
));
override(\Psr\Container\ContainerInterface::get(0), map([
'' => '@',
]));
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment