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

[SF7] Fix analysis errors #891

Merged
merged 3 commits into from
May 30, 2024
Merged

Conversation

loic425
Copy link
Member

@loic425 loic425 commented May 23, 2024

Q A
Bug fix? yes on SF7 branch
New feature? no
BC breaks? no
Deprecations? no
Related tickets
License MIT

@loic425 loic425 requested a review from a team as a code owner May 23, 2024 14:46
@loic425 loic425 mentioned this pull request May 23, 2024
13 tasks
@loic425 loic425 force-pushed the fix/psalm-errors branch 2 times, most recently from 3efee6e to 1102e08 Compare May 23, 2024 15:07
@loic425 loic425 mentioned this pull request May 24, 2024
@loic425 loic425 changed the base branch from 1.11 to symfony-7 May 29, 2024 14:06
*/
public function transform($value)
public function transform($value): mixed
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a final class

*/
public function transform($value)
public function transform($value): mixed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function transform($value): mixed
public function transform(mixed $value): mixed

https://github.com/symfony/symfony/blob/bed9c3660c0106049622eead422fcb3921f8dd21/src/Symfony/Component/Form/DataTransformerInterface.php#L65

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    /** @param int|string|null $value */
public function reverseTransform($value): ?ResourceInterface

Not sure how it's even working, since correct typehint is

 public function reverseTransform(mixed $value): mixed;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean for the return typehint? this is ok, you can restrict it but I don't even remember on which php version.

@loic425 loic425 merged commit 28fee40 into Sylius:symfony-7 May 30, 2024
19 of 20 checks passed
@loic425 loic425 deleted the fix/psalm-errors branch May 30, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants