Skip to content

Hint outer scope in console routes #6562

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

Closed
wants to merge 1 commit into from
Closed

Conversation

AJenbo
Copy link
Contributor

@AJenbo AJenbo commented Mar 4, 2025

This is a follow up to #6559

It restores the @var Kernel $this annotation, which was initially included in my original PR but later removed during review. Omitting this annotation causes issues with some developer tools, as they fail to recognize that this file is within the scope of a class. Without it, the inner $this overwrites (@var ClosureCommand $this) lead to incorrect assumptions by static analyzers and IDEs.

By explicitly declaring @var Kernel $this, we ensure proper type inference and improve the developer experience.

@jhm-ciberman
Copy link

causes issues with some developer tools

Can you show a real screenshot showing the problem?

@AJenbo
Copy link
Contributor Author

AJenbo commented Mar 4, 2025

Can you show a real screenshot showing the problem?

@jhm-ciberman
image

With this PR:
image

@taylorotwell
Copy link
Member

This just looks so bad though I'm not sure I can stomach it.

@AJenbo AJenbo deleted the patch-1 branch March 4, 2025 22:07
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.

3 participants