-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Respect PHP ini settings for error reporting #437
Comments
I do see your point. I'll consider it. I'd also like to have an issue opened for the deprecation though ;) |
Sure thing :) issue #438 |
Could be fixed like this. phive/src/shared/cli/Runner.php Line 73 in 9dee308
/** @var MigrationService */
private $migrationService;
private $errorLevel; phive/src/shared/cli/Runner.php Line 181 in 9dee308
private function setupRuntime(): void {
$this->errorLevel = error_reporting(-1); phive/src/shared/cli/Runner.php Line 124 in 9dee308
public function errorHandler(int $code, string $message, string $file, int $line): bool {
if (!($this->errorLevel & $code)) {
return false;
} |
I'm not sure I understand the proposed change. It uses a hardcoded |
Flow:
this way you could still do something with deprecations in the future (print as warnings after execution...) |
phive registers its own error handler
phive/src/shared/cli/Runner.php
Line 183 in 9dee308
that does not respect the PHP ini
error_reporting
setting.This is a bit problematic while running builds for new PHP versions.
While
phive
would most likely run under php 8.4 without any problems but because there aredeprecation
errors it just crashes.I think, during execution time deprecations can safely be ignored.
The text was updated successfully, but these errors were encountered: