Skip to content

build: exclude build.php from the PHAR#32

Merged
kojiromike merged 1 commit into
mainfrom
exclude-build-php-from-phar
May 11, 2026
Merged

build: exclude build.php from the PHAR#32
kojiromike merged 1 commit into
mainfrom
exclude-build-php-from-phar

Conversation

@kojiromike
Copy link
Copy Markdown
Contributor

Summary

  • Replace the regex passed to Phar::buildFromDirectory with an explicit RecursiveCallbackFilterIterator, so the exclusion list reads as plain PHP.
  • Add build.php to the excluded names — it was shipping inside the distributed PHAR.

Closes #14

Test plan

  • php -l build.php
  • php -d phar.readonly=0 build.php builds cleanly
  • Verified build.php, .git, .github, tests, tools, build all absent from the resulting PHAR
  • php build/oce-manage-users.phar --version runs (after composer install --no-dev)

Replace the regex passed to Phar::buildFromDirectory with an explicit
RecursiveCallbackFilterIterator so the exclusion list is plain PHP.
Adds build.php to the excluded names; previously the build script
shipped inside the distributed PHAR.

Closes #14

Assisted-by: Claude Code
@kojiromike kojiromike added the bug Something isn't working label May 11, 2026
@kojiromike kojiromike merged commit a53e946 into main May 11, 2026
10 checks passed
@kojiromike kojiromike deleted the exclude-build-php-from-phar branch May 11, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exclude build.php from the PHAR

1 participant