Skip to content

Commit ba7591e

Browse files
TASK: Fix PHP 8.4 deprecations (#247)
1 parent 5a9ebae commit ba7591e

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

.github/workflows/php_linter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
php-versions: [ 8.1, 8.2, 8.3 ]
18+
php-versions: [ 8.1, 8.2, 8.3, 8.4 ]
1919
steps:
2020
- uses: actions/checkout@v4
2121

.github/workflows/weekly_pull_requests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
-
3434
uses: shivammathur/setup-php@v2
3535
with:
36-
php-version: 7.4
36+
php-version: 8.1
3737
coverage: none
3838

3939
- uses: "ramsey/composer-install@v3"

Classes/Asset/EntrypointLookupCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(
2626
) {
2727
}
2828

29-
public function getEntrypointLookup(string $buildName = null): EntrypointLookupInterface
29+
public function getEntrypointLookup(?string $buildName = null): EntrypointLookupInterface
3030
{
3131
if ($this->buildEntrypoints === null) {
3232
$this->buildEntrypoints = $this->entryLookupFactory->getCollection();

Classes/Asset/EntrypointLookupCollectionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313

1414
interface EntrypointLookupCollectionInterface
1515
{
16-
public function getEntrypointLookup(string $buildName = null): EntrypointLookupInterface;
16+
public function getEntrypointLookup(?string $buildName = null): EntrypointLookupInterface;
1717
}

Classes/Form/FormDataProvider/RichtextEncoreConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class RichtextEncoreConfiguration implements FormDataProviderInterface
2121
{
2222
private readonly EntrypointLookupCollectionInterface $entrypointLookupCollection;
2323

24-
public function __construct(EntrypointLookupCollectionInterface $entrypointLookupCollection = null)
24+
public function __construct(?EntrypointLookupCollectionInterface $entrypointLookupCollection = null)
2525
{
2626
$this->entrypointLookupCollection = $entrypointLookupCollection ?? GeneralUtility::makeInstance(
2727
EntrypointLookupCollection::class

Classes/ViewHelpers/Stimulus/AbstractViewHelper.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public function renderStimulusController(
6565
*/
6666
public function renderStimulusAction(
6767
$controllerName,
68-
string $actionName = null,
69-
string $eventName = null,
68+
?string $actionName = null,
69+
?string $eventName = null,
7070
array $parameters = []
7171
): StimulusActionsDto {
7272
$dto = new StimulusActionsDto();
@@ -133,7 +133,7 @@ public function appendStimulusAction(
133133
StimulusActionsDto $dto,
134134
string $controllerName,
135135
string $actionName,
136-
string $eventName = null,
136+
?string $eventName = null,
137137
array $parameters = []
138138
): StimulusActionsDto {
139139
$dto->addAction($controllerName, $actionName, $eventName, $parameters);
@@ -145,7 +145,7 @@ public function appendStimulusAction(
145145
* @param string|array $controllerName the Stimulus controller name
146146
* @param string|null $targetNames The space-separated list of target names if a string is passed to the 1st argument. Optional.
147147
*/
148-
public function renderStimulusTarget($controllerName, string $targetNames = null): StimulusTargetsDto
148+
public function renderStimulusTarget($controllerName, ?string $targetNames = null): StimulusTargetsDto
149149
{
150150
$dto = new StimulusTargetsDto();
151151
if (\is_array($controllerName)) {
@@ -183,7 +183,7 @@ public function renderStimulusTarget($controllerName, string $targetNames = null
183183
public function appendStimulusTarget(
184184
StimulusTargetsDto $dto,
185185
string $controllerName,
186-
string $targetNames = null
186+
?string $targetNames = null
187187
): StimulusTargetsDto {
188188
$dto->addTarget($controllerName, $targetNames);
189189

Classes/ViewHelpers/Stimulus/Dto/StimulusActionsDto.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __toString(): string
4040
public function addAction(
4141
string $controllerName,
4242
string $actionName,
43-
string $eventName = null,
43+
?string $eventName = null,
4444
array $parameters = []
4545
): void {
4646
$controllerName = $this->getFormattedControllerName($controllerName);

Classes/ViewHelpers/Stimulus/Dto/StimulusTargetsDto.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __toString(): string
3333
* @param string $controllerName the Stimulus controller name
3434
* @param string|null $targetNames The space-separated list of target names if a string is passed to the 1st argument. Optional.
3535
*/
36-
public function addTarget(string $controllerName, string $targetNames = null): void
36+
public function addTarget(string $controllerName, ?string $targetNames = null): void
3737
{
3838
$controllerName = $this->getFormattedControllerName($controllerName);
3939

Tests/Unit/Form/FormDataProvider/RichtextEncoreConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static function provideRteConfigurationWithEncoreFiles(): Iterator
9090
private function createEntrypointLookUpCollection(): EntrypointLookupCollectionInterface
9191
{
9292
return new class() implements EntrypointLookupCollectionInterface {
93-
public function getEntrypointLookup(string $buildName = null): EntrypointLookupInterface
93+
public function getEntrypointLookup(?string $buildName = null): EntrypointLookupInterface
9494
{
9595
if ($buildName !== '_default') {
9696
throw new Exception('Invalid buildName in test case', 1_645_708_934);

0 commit comments

Comments
 (0)