jawira/skeleton
Project skeleton/scaffolding for PHP or Laravel-style packages by Jawira. Includes a ready-to-use structure and boilerplate to kickstart new packages quickly, with common configs, tests, and tooling so you can focus on features instead of setup.
Installation:
composer require --dev jawira/skeleton
Add to composer.json under require-dev to ensure it’s only installed in development environments.
First Use Case: Run a basic target to verify functionality:
phing -f vendor/jawira/skeleton/build.xml -l
This lists all available targets without executing them.
Execute a Target: Example: Run PHPUnit tests:
phing -f vendor/jawira/skeleton/build.xml phpunit
Code Quality Checks: Integrate into your CI pipeline to enforce standards:
phing -f vendor/jawira/skeleton/build.xml cs:fix # Auto-fix code style
phing -f vendor/jawira/skeleton/build.xml cs:check # Validate without fixing
Dependency Management:
Use composer:outdated to audit dependencies:
phing -f vendor/jawira/skeleton/build.xml composer:outdated
Git Operations:
Generate or update .gitignore:
phing -f vendor/jawira/skeleton/build.xml gitignore -Dforce=true
Docker Integration:
Start containers with dc:open (includes wait-for conditions):
phing -f vendor/jawira/skeleton/build.xml dc:open
Customization:
Extend build.xml by copying it to your project root and modifying targets. Example:
<project name="my-project" default="build" basedir=".">
<import file="vendor/jawira/skeleton/build.xml"/>
<target name="custom-task">
<echo>Running custom task!</echo>
</target>
</project>
composer.json for convenience:
"scripts": {
"test": "phing -f vendor/jawira/skeleton/build.xml phpunit",
"fix-cs": "phing -f vendor/jawira/skeleton/build.xml cs:fix"
}
.github/workflows/ci.yml:
- name: Run PHP-CS-Fixer
run: phing -f vendor/jawira/skeleton/build.xml cs:check
// app/Console/Commands/RunPhing.php
public function handle()
{
Artisan::call('vendor.bin.phing', [
'-f', 'vendor/jawira/skeleton/build.xml',
$this->argument('target')
]);
}
Phing Dependency:
Ensure phing/phing is installed globally or via Composer:
composer require --dev phing/phing
Without it, targets will fail with phing command not found.
Target Conflicts:
If you define custom targets with the same names as jawira/skeleton, they may override the package’s defaults. Use unique names or namespace them.
Docker Compatibility:
The dc:open target assumes Docker Compose v2+. Older versions may fail. Test locally before CI integration.
File Overwrites:
Targets like gitignore use -Dforce=true to overwrite files. Be cautious in shared environments (e.g., CI caches).
Future-Dated Releases: The package’s last release is dated 2026, which may indicate:
-v to Phing commands for debugging:
phing -f vendor/jawira/skeleton/build.xml -v target-name
-d to see what Phing would do without executing:
phing -f vendor/jawira/skeleton/build.xml -d target-name
build.log in the project root for errors.Custom Configs:
Override package defaults by copying config files (e.g., .php-cs-fixer.dist.php) to your project root and referencing them in build.xml:
<property name="cs.fixer.config" value=".php-cs-fixer.dist.php"/>
Psalm Integration:
Use psalm targets with Laravel’s psalm.xml:
phing -f vendor/jawira/skeleton/build.xml psalm
Performance: Cache Phing’s build file for faster repeated runs:
phing -f vendor/jawira/skeleton/build.xml -B target-name
Extension Points:
build.xml by appending new <target> blocks.phpunit.config) before importing the package’s build file:
<property name="phpunit.config" value="phpunit.xml.dist"/>
<import file="vendor/jawira/skeleton/build.xml"/>
Laravel-Specific: For Laravel projects, prefer Artisan commands or Composer scripts over Phing for tasks like migrations or queue workers. Example:
phing -f vendor/jawira/skeleton/build.xml artisan:migrate # Avoid; use `php artisan migrate` instead
How can I help you explore Laravel packages today?