From b5df4676b7c59ade0b850779c244604e66aa54fa Mon Sep 17 00:00:00 2001 From: Fenikkusu Date: Wed, 28 May 2025 22:19:58 -0400 Subject: [PATCH] Force Exception if Compilation Fails --- CHANGELOG.md | 1 + src/Compiler.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e92cd2eea..900267a1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org). ## [Unreleased] +- Forcing Exception on Failure of Compile Step ## [0.19.0] - 2025-05-13 ### Added - Added support of PHP `8.4` [#2440](https://github.com/zephir-lang/zephir/issues/2440), [#2443](https://github.com/zephir-lang/zephir/pull/2443) diff --git a/src/Compiler.php b/src/Compiler.php index ae62813f3..97ac985fd 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -371,6 +371,10 @@ public function compile(bool $development = false, ?int $jobs = null): void $exit ); } + + if ($exit !== 0) { + throw new CompilerException("Compilation failed. Check compile-errors.log"); + } } /**