addvilz / pharaoh
Library to simplify .phar build scripts
Installs: 145
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/addvilz/pharaoh
Requires
- symfony/finder: >2.6
This package is not auto-updated.
Last update: 2025-09-27 23:57:39 UTC
README
Library to simplify .phar build scripts.
Usage:
Create a new file, for example, build.php:
#!/usr/bin/env php
<?php
$composer = (new \Symfony\Component\Finder\Finder())
->files()
->ignoreVCS(true)
->name('*.php')
->exclude(['test', 'tests', 'spec'])
->in(__DIR__ . '/vendor/');
$src = (new \Symfony\Component\Finder\Finder())
->files()
->ignoreVCS(true)
->name('*.php')
->in(__DIR__ . '/src/');
$builder = (new \Addvilz\Pharaoh\Builder('myapp.phar', __DIR__, __DIR__))
->addFinder($composer)
->addFinder($src)
// ->addFile('LICENSE')
// ->addFile('README.md')
->build('index.php') // file that contains the "index" code of your app
;