jawira/skeleton
A collection of reusable Phing build targets for PHP projects. Install PHPUnit, generate .gitignore and other common files with simple commands like phing -f vendor/jawira/skeleton/build.xml phpunit, keeping your project setup consistent across repositories.
Installation:
composer require --dev jawira/skeleton
Add to composer.json under require-dev so it's only installed in development. Pin a version range (e.g. ^2.33) — target names have changed across minor releases (see Gotchas), so an unpinned install can silently break CI scripts.
Discover the current target names first:
phing -f vendor/jawira/skeleton/build.xml -l
This is the single most important step. Since v2.33.0 the former analysis:* targets have been renamed to check, and -l is the authoritative list for your installed version.
First Use Case:
Initialize a .gitignore file:
phing -f vendor/jawira/skeleton/build.xml gitignore -Dforce=true
Key Files:
vendor/jawira/skeleton/build.xml: the Phing build file with all targets.vendor/jawira/skeleton/build.properties: default property values you can override.README.md / release notes: quick reference for common targets (phpunit, cs:fix, check, composer:install).Code Quality & Linting:
Coding-standards targets are unchanged — cs:fix and cs:check still drive PHP-CS-Fixer:
phing -f vendor/jawira/skeleton/build.xml cs:check
cs:* for repos that already standardised on the package's rule set.Static Analysis (renamed in v2.33.0):
The analysis:* targets are now check targets. Update any CI step or script that referenced analysis:*:
# before (≤ v2.32.x)
phing -f vendor/jawira/skeleton/build.xml analysis
# after (v2.33.0+)
phing -f vendor/jawira/skeleton/build.xml check
check in CI and gate merges on it; it aggregates the static-analysis run rather than replacing cs:check.Testing:
Run PHPUnit via Phing as an alternative to php artisan test:
phing -f vendor/jawira/skeleton/build.xml phpunit
phpunit.config to point at a Laravel-specific config, or pass --testsuite=Unit.Dependency Management:
composer:install / composer:update for installs.composer:audit to fail the build on known vulnerabilities.phing -f vendor/jawira/skeleton/build.xml composer:outdated
composer install --prefer-dist for production and centralise flags in build.properties:
composer.flags=-n --prefer-dist
Docker & Deployment:
dc:open wraps Docker Compose for local development:
phing -f vendor/jawira/skeleton/build.xml dc:open
Git Operations:
Generate/overwrite .gitignore or .gitattributes with gitignore -Dforce=true, optionally wired into a Composer post-install hook.
build.properties (e.g. phpunit.config=phpunit.xml.dist).<exec> target:
<target name="laravel:migrate">
<exec command="php artisan migrate" />
</target>
analysis and switch to check:
- name: Static analysis
run: phing -f vendor/jawira/skeleton/build.xml check
Breaking rename: analysis:* → check (v2.33.0):
analysis or analysis:* will fail with an unknown-target error after upgrading.phing -l after the upgrade, replace analysis* with the corresponding check target, and grep the repo (rg 'analysis' composer.json .github/ Makefile) for stragglers.check vs cs:check are different things:
check covers coding standards.cs:check (style) and check (static analysis) as separate CI steps; keep both in the pipeline.Outdated-dependency check is informational:
composer:audit and lose vulnerability enforcement.composer:audit as the failing gate and use the outdated target for scheduled reports/renovation planning.Phing vs. Laravel Ecosystem:
composer exec for simple tool calls.Force Overwrites:
gitignore defaults to -Dforce=false and will skip existing files.-Dforce=true explicitly, or set the default in build.properties for the project.Docker Compatibility:
dc:open assumes Docker Compose v2 (docker compose).docker compose version; use docker-compose syntax in custom targets for legacy hosts.PHP-CS-Fixer Rules:
.editorconfig or Pint config.cs.path to app,config.phing -f ... -l — cheapest way to catch a rename like v2.33.0's before it hits CI.phing -f vendor/jawira/skeleton/build.xml -d check
phing -f vendor/jawira/skeleton/build.xml -v composer:install
phing -f vendor/jawira/skeleton/build.xml phpunit -Dphpunit.config=custom-phpunit.xml
check) chain others; inspect the <target depends="..."> declarations in build.xml when a nested task fails.build.xml to the project root and add your own, e.g.
<target name="laravel:optimize">
<exec command="php artisan optimize:clear" />
</target>
build.properties
phpunit.bootstrap=vendor/autoload.php
cs.path=app,config
composer.json
"scripts": {
"post-install-cmd": [
"phing -f vendor/jawira/skeleton/build.xml gitignore -Dforce=true"
]
}
captainhook:install) for pre-commit runs of cs:fix/check.Key Takeaway: v2.33.0 is a breaking rename — analysis:* is now check — so audit your scripts before upgrading, and keep composer:audit as your security gate while the new outdated-dependency check stays informational. Use jawira/skeleton as a scaffold for tooling and file operations, not a replacement for Laravel/Composer-native workflows.
How can I help you explore Laravel packages today?