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

Check types when argument is passed by reference #2941

Merged
merged 4 commits into from
Feb 24, 2024

Conversation

ljmaskey
Copy link
Contributor

Do type checks on pass by reference parameters for non-builtin functions and methods.

Initially, all pass by reference parameters were skipped for type checking. This change continues to skip those checks for builtin PHP methods, but does check parameters for userland methods.

…ons and methods.

Initially, all pass by reference parameters were skipped for type checking. This change continues to skip
those checks for builtin PHP methods, but does check parameters for userland methods.
@ondrejmirtes ondrejmirtes changed the title Resolve 10626 and 8296 Check types when argument is passed by reference Feb 24, 2024
@@ -0,0 +1,17 @@
<?php

namespace PassedByReference;
Copy link
Member

Choose a reason for hiding this comment

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

This needs to have "Bug10626" namespace

@@ -0,0 +1,27 @@
<?php

class VerifyLoginTask{
Copy link
Member

Choose a reason for hiding this comment

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

This needs to have Bug8296 namespace

@ondrejmirtes ondrejmirtes merged commit ef31b4f into phpstan:1.10.x Feb 24, 2024
346 of 352 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

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