Skip to content

Commit

Permalink
[BUGFIX] Fix deprecation rule in cs fixer tests
Browse files Browse the repository at this point in the history
When performing `Build/Scripts/runTests.sh -s cglGit`
with latest cs fixer version a rule dependency error
is thrown.

This patch exchanges the deprecation with the current
recommended rule.

Used command(s):

> composer require --dev \
  "friendsofphp/php-cs-fixer":"^3.26.1"
> Build/Scripts/runTests.sh -s cgl

Resolves: #101888
Releases: main, 11.5, 12.4
Change-Id: Ie139ef841c92461e116732923991c6474e888a5e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80936
Tested-by: Anja Leichsenring <[email protected]>
Tested-by: core-ci <[email protected]>
Reviewed-by: Anja Leichsenring <[email protected]>
  • Loading branch information
wandoliver authored and maddy2101 committed Sep 10, 2023
1 parent 397851d commit 127b13c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Tests/Functional/Mvc/Validation/FileSizeValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function FileSizeValidatorHasErrorsIfFileResourceSizeIsToSmall(): void
$validator = new FileSizeValidator();
$validator->setOptions($options);
$mockedStorage = $this->getMockBuilder(ResourceStorage::class)->disableOriginalConstructor()->getMock();
$file = new File(['identifier' => '/foo', 'name'=> 'bar.txt', 'size' => '1'], $mockedStorage);
$file = new File(['identifier' => '/foo', 'name' => 'bar.txt', 'size' => '1'], $mockedStorage);
self::assertTrue($validator->validate($file)->hasErrors());
}

Expand Down
10 changes: 5 additions & 5 deletions Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function loadThrowsExceptionIfPersistenceIdentifierHasNoYamlExtension():

$mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false);

$runtimeCache= $this->getMockBuilder(VariableFrontend::class)
$runtimeCache = $this->getMockBuilder(VariableFrontend::class)
->onlyMethods(['get', 'set'])
->disableOriginalConstructor()
->getMock();
Expand All @@ -67,7 +67,7 @@ public function loadThrowsExceptionIfPersistenceIdentifierIsAExtensionLocationWh

$mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false);

$runtimeCache= $this->getMockBuilder(VariableFrontend::class)
$runtimeCache = $this->getMockBuilder(VariableFrontend::class)
->onlyMethods(['get', 'set'])
->disableOriginalConstructor()
->getMock();
Expand Down Expand Up @@ -132,7 +132,7 @@ public function saveThrowsExceptionIfPersistenceIdentifierIsAExtensionLocationWh

$mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false);

$runtimeCache= $this->getMockBuilder(VariableFrontend::class)
$runtimeCache = $this->getMockBuilder(VariableFrontend::class)
->onlyMethods(['get', 'set'])
->disableOriginalConstructor()
->getMock();
Expand Down Expand Up @@ -220,7 +220,7 @@ public function deleteThrowsExceptionIfPersistenceIdentifierIsExtensionLocationW

$mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['exists'], [], '', false);

$runtimeCache= $this->getMockBuilder(VariableFrontend::class)
$runtimeCache = $this->getMockBuilder(VariableFrontend::class)
->onlyMethods(['get', 'set'])
->disableOriginalConstructor()
->getMock();
Expand Down Expand Up @@ -288,7 +288,7 @@ public function existsReturnsTrueIfPersistenceIdentifierIsExtensionLocationAndFi
{
$mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false);

$runtimeCache= $this->getMockBuilder(VariableFrontend::class)
$runtimeCache = $this->getMockBuilder(VariableFrontend::class)
->onlyMethods(['get', 'set'])
->disableOriginalConstructor()
->getMock();
Expand Down

0 comments on commit 127b13c

Please sign in to comment.