Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix legacy class palceholder definitions for static analysis #52798

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

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

ausi
Copy link
Contributor

@ausi ausi commented Nov 29, 2023

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues
License MIT

In #50392 the UriSigner class was moved from HttpKernel to HttpFoundation. The empty definition class UriSigner {} causes many issues with static analysis tools like PHPStan.

As this code is wrapped in an if (false) changing it to class UriSigner extends HttpFoundationUriSigner should not cause any behavior change while fixing most static analysis issues.

Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

Some other moved classes are not extending the new class:

  • Symfony\Bundle\FrameworkBundle\Routing\AnnotatedRouteControllerLoader
  • Symfony\Component\HttpKernel\Debug\FileLinkFormatter
  • Symfony\Component\Routing\Loader\AnnotationClassLoader
  • Symfony\Component\Routing\Loader\AnnotationDirectoryLoader
  • Symfony\Component\Routing\Loader\AnnotationFileLoader
  • Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader

It may be necessary to do the same change on them.

@ausi
Copy link
Contributor Author

ausi commented Nov 29, 2023

It may be necessary to do the same change on them.

Will do.

@ausi ausi requested a review from dunglas as a code owner November 29, 2023 14:17
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

Thanks. This is consistent with how we deprecated other moved classes.

@nicolas-grekas nicolas-grekas changed the title Fix UriSigner class definition for static analysis Fix legacy class palceholder definitions for static analysis Nov 29, 2023
@nicolas-grekas nicolas-grekas force-pushed the fix/uri-signer-class-definition branch from 53758ef to 0f230fe Compare November 29, 2023 14:34
@nicolas-grekas
Copy link
Member

Thank you @ausi.

@nicolas-grekas nicolas-grekas merged commit 9144962 into symfony:6.4 Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.