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

Sign up
Appearance settings

Fix assertions for phpstan master #51

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
eiriksm wants to merge 5 commits into phpstan:master from eiriksm:fix/test-fix
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"require": {
"php": "^7.1 || ^8.0",
"phpstan/phpstan": "^1.0"
"phpstan/phpstan": "dev-master"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.2",
Expand Down
4 changes: 4 additions & 0 deletions tests/Rules/Deprecations/CallToDeprecatedMethodRuleTest.php
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public function testDeprecatedMethodCall(): void
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedMethodCall\Foo.',
7,
],
[
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedMethodCall\Bar.',
10,
],
[
'Call to deprecated method deprecatedFoo2() of class CheckDeprecatedMethodCall\Foo.',
11,
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public function testDeprecatedStaticMethodCall(): void
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.',
6,
],
[
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Bar.',
8,
],
[
'Call to deprecated method deprecatedFoo2() of class CheckDeprecatedStaticMethodCall\Foo.',
9,
Expand Down Expand Up @@ -59,7 +63,7 @@ public function testDeprecatedStaticMethodCall(): void
],
[
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.',
24,
Copy link
Member

@ondrejmirtes ondrejmirtes Nov 22, 2021

Choose a reason for hiding this comment

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

Thank you! One more thing I need here is to actually add a test that checks that this scenario is continuted to be reported in a valid scenario, e.g. calling parent::deprecatedFoo(); in a scope that's not deprecated. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm ok. I will see if I can get that fixed. If not I will let you know

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I understood your post correctly, I think this has been added back in another way now?

Copy link
Member

@ondrejmirtes ondrejmirtes Nov 23, 2021

Choose a reason for hiding this comment

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

No, it's just that this extension is built with latest stable PHPStan version and not with dev-master. Update the composer.json for the purpose of this PR :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I know that. I was referring to the actual meaning of your sentence 🤓

Anyway updates composer.json as well now

33,
],
]
);
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ public static function deprecatedFoo()

}

class Bar3 extends Foo
{
public static function callOtherDeprecatedMethod()
{
parent::deprecatedFoo();
}
}

/**
* @deprecated
*/
Expand Down

AltStyle によって変換されたページ (->オリジナル) /