From 5c9dff71ac6f555bd5b57b1b124d33b1cd087dc1 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Mon, 12 Oct 2026 17:18:17 +0530 Subject: [PATCH 1/2] fix(phar): leave the packages' tests and features out of the phar The ee-*.json step of make-phar.php reused the previous Finder, which still matched *.php, and added every PHP file below each *-command package: features/bootstrap of the released phars and, with the incremental engine, site-command's 60 PHPUnit test files. It now starts from a new Finder, and the build job fails when a package's tests/ or features/ is in the phar. --- .github/workflows/test_and_build.yml | 4 ++++ utils/make-phar.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 16dd001f5..c84aaf338 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -79,6 +79,10 @@ jobs: - name: Check phar run: sudo ./easyengine.phar cli info + - name: Check phar contents + run: | + php -r '$bad = []; foreach ( new RecursiveIteratorIterator( new Phar( "easyengine.phar" ) ) as $f ) { $p = $f->getPathname(); if ( preg_match( "#/vendor/easyengine/[^/]+/(tests|features)/#", $p ) ) { $bad[] = $p; } } if ( $bad ) { fwrite( STDERR, "Package tests in the phar:\n" . implode( "\n", $bad ) . "\n" ); exit( 1 ); }' + - name: Upload built Phar file uses: actions/upload-artifact@v7 with: diff --git a/utils/make-phar.php b/utils/make-phar.php index 4429f36bc..c7a2d5f7e 100644 --- a/utils/make-phar.php +++ b/utils/make-phar.php @@ -267,6 +267,8 @@ function get_composer_versions( $current_version ) { add_file( $phar, $file ); } +// A fresh finder: the one above still carries its *.php pattern and would add the packages' tests and features too. +$finder = new Finder(); $finder ->files() ->ignoreDotFiles(false) From e9ebcdcf3761de15ec8ca38be4c9027681d0b312 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Mon, 12 Oct 2026 17:43:03 +0530 Subject: [PATCH 2/2] ci(phar): name features too in the phar contents check message --- .github/workflows/test_and_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index c84aaf338..add3d34aa 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -81,7 +81,7 @@ jobs: - name: Check phar contents run: | - php -r '$bad = []; foreach ( new RecursiveIteratorIterator( new Phar( "easyengine.phar" ) ) as $f ) { $p = $f->getPathname(); if ( preg_match( "#/vendor/easyengine/[^/]+/(tests|features)/#", $p ) ) { $bad[] = $p; } } if ( $bad ) { fwrite( STDERR, "Package tests in the phar:\n" . implode( "\n", $bad ) . "\n" ); exit( 1 ); }' + php -r '$bad = []; foreach ( new RecursiveIteratorIterator( new Phar( "easyengine.phar" ) ) as $f ) { $p = $f->getPathname(); if ( preg_match( "#/vendor/easyengine/[^/]+/(tests|features)/#", $p ) ) { $bad[] = $p; } } if ( $bad ) { fwrite( STDERR, "Package tests or features in the phar:\n" . implode( "\n", $bad ) . "\n" ); exit( 1 ); }' - name: Upload built Phar file uses: actions/upload-artifact@v7