-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[5.0] [Debug] Add parameter type-hints where possible #32217
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
792401e
to
6b0e323
Compare
I did not change the BufferingLogger as this extends AbstractLogger -> LoggerInterface, and this is part of the Psr spec. Should this be changed as well? I think this could have big impact? |
@@ -112,7 +112,7 @@ class ErrorHandler | |||
* | |||
* @return self The registered error handler | |||
*/ | |||
public static function register(self $handler = null, $replace = true): self | |||
public static function register(self $handler = null, bool $replace = true): self |
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.
now that this class has been deprecated, all changes should be reverted (and the class should be removed actually)
see other classes too (should be easy to spot by rebasing)
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.
Reverted all changes in class. With deprecated you mean final? I couldn't find any others in the namespace.
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.
no, with deprecated, we mean deprecated.
d1aea83
to
c5756ad
Compare
@@ -129,21 +129,19 @@ public static function disable() | |||
} | |||
|
|||
/** | |||
* @return string|null | |||
* @param string $class |
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.
this is wrong. You must not remove the the doc for the return type (and adding the doc for the param is useless now, as it duplicates the typehint)
@@ -60,11 +60,11 @@ public function __construct(bool $debug = true, string $charset = null, $fileLin | |||
* | |||
* @param bool $debug Enable/disable debug mode, where the stack trace is displayed | |||
* @param string|null $charset The charset used by exception messages | |||
* @param string|null $fileLinkFormat The IDE link template | |||
* @param string|FileLinkFormatter|null $fileLinkFormat The IDE link template |
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.
this should be added in older branches
This PR is going to be obsoleted by #32471 |
The Debug component is now gone, long live ErrorHandler. New PR welcome I suppose on branch 4.4 (please have a look at comments here of course) |
Added scalar typehints to Debug (DebugBundle required no work)