-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Replace is_callable checks with type hints #16125
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
Conversation
Also removes tests checking the exceptions thrown from the removed is_callable checks.
This is the same BC break as in ##14330. You get a warning for overwritten method that the signature is not the same: https://3v4l.org/ruPcK But I'm 👍 to add callable typehints. |
@Tobion in this PR, it is OK:
|
@nicolas-grekas and it would be great to fix the deps=low tests of the Translation component |
*/ | ||
public function __construct($caster, \Exception $prev) | ||
public function __construct(\Exception $prev) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be changed in older branches actually ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, see #16129
👍 Status: Reviewed |
Thank you @nicolas-grekas. |
…nicolas-grekas) This PR was merged into the 3.0-dev branch. Discussion ---------- Replace is_callable checks with type hints | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14330 | License | MIT | Doc PR | - Also removes tests checking the exceptions thrown from the removed is_callable checks. Commits ------- 7685cdd Add more callable type hints 4e0c6e1 Replace is_callable checks with type hints
Also removes tests checking the exceptions thrown from
the removed is_callable checks.