duon / dev
Shared development settings and tools for all Duon projects
Installs: 223
Dependents: 13
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/duon/dev
Requires
- php: ^8.5
- ernst/coverlyzer: ^0.2
- friendsofphp/php-cs-fixer: ~3.93.0
- phpunit/phpunit: ^12.0
- psy/psysh: *
- vimeo/psalm: ^6.15
README
Installation
composer require duon/dev
Usage
Documentation snippets test runner
./vendor/bin/docs-test-runner path/to/docs/snippets
php-cs-fixer
Add the following to your .php-cs-fixer.dist.php:
<?php declare(strict_types=1); $finder = PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/tests']); $config = new Duon\Development\PhpCsFixer\Config(); return $config->setFinder($finder);
Automatically installed development tools
psy/psyshA REPL for PHP
Shared Configuration Sync
This package provides a centralized way to manage configuration files (like .editorconfig, .markdownlint.jsonc, etc.) across all projects. Instead of manual copying, use the built-in Config helper via Composer.
1. Project Setup
Add the sync command to your project's composer.json file. It will install the default configs whenever composer install or composer update is run.
{
"scripts": {
"post-install-cmd": [
"Duon\\Development\\Config::sync"
],
"post-update-cmd": [
"Duon\\Development\\Config::sync"
]
}
}
2. Add Prettier Config (Optional)
To also install .prettierrc, add the prettier script alongside sync.
{
"scripts": {
"post-install-cmd": [
"Duon\\Development\\Config::sync",
"Duon\\Development\\Config::prettier"
],
"post-update-cmd": [
"Duon\\Development\\Config::sync",
"Duon\\Development\\Config::prettier"
]
}
}
Note: Config does not overwrite existing files. Delete the file you want to re-deploy and re-run Composer.
3. Recommended .gitignore
To ensure the "Source of Truth" remains within this package, add the synced files to your project's .gitignore:
/.editorconfig
/.markdownlint.jsonc
/.prettierrc
License
This project is licensed under the MIT license.