Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: RouteTags::createFromArray uses code deprecated in PHP8.2 #3120

Closed
1 task done
nezaniel opened this issue Jul 18, 2023 · 3 comments
Closed
1 task done

BUG: RouteTags::createFromArray uses code deprecated in PHP8.2 #3120

nezaniel opened this issue Jul 18, 2023 · 3 comments
Assignees

Comments

@nezaniel
Copy link
Member

nezaniel commented Jul 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

RouteTags::createFromArray is implemented as

public static function createFromArray(array $tags): self
 {
        array_walk($tags, 'static::validateTag');
        return new static($tags);
 }

This throws the following deprecation error using PHP 8.2: Use of "static" in callables is deprecated

Expected Behavior

no deprecation errors :)

Steps To Reproduce

call RouteTags::createFromArray

Environment

- Flow: 9.0
- PHP: 8.2

Anything else?

No response

@mhsdesign
Copy link
Member

Link: https://github.com/neos/flow-development-collection/blob/4358297c60a0b6266900e447757a3de2388b2fb8/Neos.Flow/Classes/Mvc/Routing/Dto/RouteTags.php#L74C28-L74C34

array_walk($tags, static::validateTag(...)); should do, but id actually prefer a simple for each 😅

@bwaidelich
Copy link
Member

FYI: I just opened up the WEB IDE and did the fix, it was almost faster than writing a comment :)
=> #3156

@bwaidelich bwaidelich removed their assignment Sep 7, 2023
@mhsdesign
Copy link
Member

Hahaha thännks ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants