- Notifications
You must be signed in to change notification settings - Fork 2k
Fix: Remove the Debug ignore errors. #7796
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
MGatner left a comment
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.
Thanks again! Some more comments on this one.
system/Log/Logger.php Outdated
| * @var array | ||
| */ | ||
| public $logCache; | ||
| public array $logCache; |
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 a breaking change for class extensions. Please explain or revert.
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.
Hi @MGatner , thanks for your reply.
I have now restored this attribute to its original state.
The reason I will make this change is because of the following.
$ignoreErrors[] = [ 'message' => '#^Property CodeIgniter\\\\Log\\\\Logger\\:\\:\\$logCache \\(array\\) on left side of \\?\\? is not nullable\\.$#', 'count' => 1, 'path' => __DIR__ . '/system/Debug/Toolbar/Collectors/Logs.php', ];
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.
That is not a "type specified" error. We can tackle that in separate PR.
system/Debug/Timer.php Outdated
| * @param string $name The name of the timer | ||
| * @param callable $callable callable to be executed | ||
| * @param string $name The name of the timer | ||
| * @phpstan-param callable():mixed $callable callable to be executed |
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.
| * @phpstan-param callable():mixed $callable callable to be executed | |
| * @phpstan-param callable(): mixed $callable callable to be executed |
system/Debug/Toolbar.php Outdated
| * | ||
| * @codeCoverageIgnore | ||
| * | ||
| * @return void |
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.
| * @return void | |
| * @return void | |
| * @phpstan-return never|void |
system/Debug/Exceptions.php Outdated
| * | ||
| * @codeCoverageIgnore | ||
| * | ||
| * @return void |
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.
| * @return void | |
| * @return void | |
| * @phpstan-return never|void |
system/Debug/Exceptions.php Outdated
| * | ||
| * @codeCoverageIgnore | ||
| * | ||
| * @return void |
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.
| * @return void | |
| * @return void | |
| * @phpstan-return never|void |
system/Debug/Exceptions.php Outdated
| /** | ||
| * Given an exception and status code will display the error to the client. | ||
| * | ||
| * @return void |
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.
| * @return void | |
| * @return void | |
| * @phpstan-return never|void |
2122069 to 6dfc38b Compare
Description
See #7731
The remaining two sections of the Debug have not been corrected.
The viewer attribute refers to the RendererInterface, but the RendererInterface has undefined method of
getPerformanceData()andgetData()methods.Maybe replace the viewer attribute reference with
CodeIgniter\View\View?After issuing this PR, I tried to change the reference attribute and phpstan does not show Debug section related errors.
I will update the commit to this PR if needed.
before the change viewer attribute refersphpstan-baseline.php:system/Debug/Toolbar/Collectors/Views.php:after the change viewer attribute refersphpstan-baseline.php:system/Debug/Toolbar/Collectors/Views.php:Checklist: