Skip to content

Commit

Permalink
[TASK] Raise typo3fluid/fluid ^2.7.0
Browse files Browse the repository at this point in the history
A minor raise from 2.6 to 2.7 brings an aria
related feature and a cleanup we adapt in core.

composer req typo3fluid/fluid:^2.7.0

Resolves: #94242
Releases: master
Change-Id: I9b479c33aa5183ea2bad845452dfa8cba52245e6
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69334
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Jochen <rothjochen@gmail.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Jochen <rothjochen@gmail.com>
Reviewed-by: Claus Due <claus@phpmind.net>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
lolli42 committed May 31, 2021
1 parent 1e4c675 commit b68c5d3
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 41 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -80,7 +80,7 @@
"typo3/cms-composer-installers": "^2.0 || ^3.0",
"typo3/phar-stream-wrapper": "^3.1.6",
"typo3/symfony-psr-event-dispatcher-adapter": "^1.0 || ^2.0",
"typo3fluid/fluid": "^2.6.10"
"typo3fluid/fluid": "^2.7.0"
},
"require-dev": {
"composer-runtime-api": "^2.0",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions phpstan.neon
Expand Up @@ -62,10 +62,6 @@ parameters:
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
path: typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php
-
message: "#^Class TYPO3Fluid\\\\Fluid\\\\Core\\\\Parser\\\\TemplateParser does not have a constructor and must be instantiated without any parameters\\.$#"
count: 1
path: typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
-
message: "#^Call to an undefined static method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContext\\:\\:getParserConfiguration\\(\\)\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/adminpanel/composer.json
Expand Up @@ -27,7 +27,7 @@
"typo3/cms-core": "11.3.*@dev",
"typo3/cms-fluid": "11.3.*@dev",
"typo3/cms-frontend": "11.3.*@dev",
"typo3fluid/fluid": "^2.6.10"
"typo3fluid/fluid": "^2.7.0"
},
"conflict": {
"typo3/cms": "*"
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/core/composer.json
Expand Up @@ -64,7 +64,7 @@
"typo3/cms-composer-installers": "^2.0 || ^3.0",
"typo3/phar-stream-wrapper": "^3.1.6",
"typo3/symfony-psr-event-dispatcher-adapter": "^1.0 || ^2.0",
"typo3fluid/fluid": "^2.6.10"
"typo3fluid/fluid": "^2.7.0"
},
"require-dev": {
"codeception/codeception": "^4.1.12",
Expand Down
32 changes: 10 additions & 22 deletions typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
Expand Up @@ -32,7 +32,6 @@
use TYPO3Fluid\Fluid\Core\Variables\StandardVariableProvider;
use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInvoker;
use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperVariableContainer;
use TYPO3Fluid\Fluid\View\ViewInterface;

/**
* Class RenderingContext
Expand Down Expand Up @@ -69,29 +68,18 @@ public function injectViewHelperVariableContainer(ViewHelperVariableContainer $v
$this->viewHelperVariableContainer = $viewHelperVariableContainer;
}

/**
* @param ViewInterface $view
*/
public function __construct(ViewInterface $view = null)
public function __construct()
{
if ($view !== null) {
// Note: if $view is received here this indicates internal framework instancing
// and it is safe to call the parent constructor. Custom, non-view-providing
// usages will only perform the initialisation below (which is sufficient mind you!)
parent::__construct($view);
} else {
// Reproduced partial initialisation from parent::__construct; minus the custom
// implementations we attach below.
$this->setTemplateParser(new TemplateParser($this));
if (method_exists($this, 'setTemplateCompiler')) {
$this->setTemplateCompiler(new TemplateCompiler());
}
if (method_exists($this, 'setViewHelperInvoker')) {
$this->setViewHelperInvoker(new ViewHelperInvoker());
}
$this->setViewHelperVariableContainer(new ViewHelperVariableContainer());
$this->setVariableProvider(new StandardVariableProvider());
// Reproduced partial initialisation from parent::__construct; minus the custom implementations we attach below.
$this->setTemplateParser(new TemplateParser());
if (method_exists($this, 'setTemplateCompiler')) {
$this->setTemplateCompiler(new TemplateCompiler());
}
if (method_exists($this, 'setViewHelperInvoker')) {
$this->setViewHelperInvoker(new ViewHelperInvoker());
}
$this->setViewHelperVariableContainer(new ViewHelperVariableContainer());
$this->setVariableProvider(new StandardVariableProvider());

$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
if (method_exists($this, 'setTemplateProcessors')) {
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/fluid/Classes/View/AbstractTemplateView.php
Expand Up @@ -50,7 +50,7 @@ public function initializeView()
public function __construct(RenderingContextInterface $context = null)
{
if (!$context) {
$context = GeneralUtility::makeInstance(ObjectManager::class)->get(RenderingContext::class, $this);
$context = GeneralUtility::makeInstance(ObjectManager::class)->get(RenderingContext::class);
}
parent::__construct($context);
}
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/fluid/Classes/View/StandaloneView.php
Expand Up @@ -49,7 +49,7 @@ public function __construct(ContentObjectRenderer $contentObject = null)
$configurationManager->setContentObject($contentObject);

$request = $objectManager->get(Request::class);
$renderingContext = $objectManager->get(RenderingContext::class, $this);
$renderingContext = $objectManager->get(RenderingContext::class);
$renderingContext->setRequest($request);
parent::__construct($renderingContext);
}
Expand Down
Expand Up @@ -71,9 +71,10 @@ public function initializeArgumentsRegistersExpectedArguments()
->setMethods(['registerTagAttribute', 'registerUniversalTagAttributes', 'registerArgument'])
->getMock();

$viewHelper->expects(self::exactly(5))->method('registerArgument')->withConsecutive(
$viewHelper->expects(self::exactly(6))->method('registerArgument')->withConsecutive(
['additionalAttributes', 'array', self::anything()],
['data', 'array', self::anything()],
['aria', 'array', self::anything()],
['route', 'string', self::anything()],
['parameters', 'array', self::anything()],
['referenceType', 'string', self::anything()]
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/fluid/composer.json
Expand Up @@ -22,7 +22,7 @@
"symfony/dependency-injection": "^5.2",
"typo3/cms-core": "11.3.*@dev",
"typo3/cms-extbase": "11.3.*@dev",
"typo3fluid/fluid": "^2.6.10"
"typo3fluid/fluid": "^2.7.0"
},
"conflict": {
"typo3/cms": "*"
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/redirects/composer.json
Expand Up @@ -25,7 +25,7 @@
"symfony/console": "^5.2",
"typo3/cms-backend": "11.3.*@dev",
"typo3/cms-core": "11.3.*@dev",
"typo3fluid/fluid": "^2.6.10"
"typo3fluid/fluid": "^2.7.0"
},
"conflict": {
"typo3/cms": "*"
Expand Down

0 comments on commit b68c5d3

Please sign in to comment.