Skip to content

🛠️ Atomic PHP package scaffold: generate repos matching http-kernel/router conventions (CI, QA, PSR-first).

License

Notifications You must be signed in to change notification settings

atomic-php/package-scaffold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

atomic-php/package-scaffold

Quickly scaffold a PHP package that follows the Atomic style (as used by atomic-php/http-kernel and atomic-php/router).

  • Structure: src/, tests/, benchmarks/, .github/workflows/ci.yml
  • QA: .editorconfig, .php-cs-fixer.php, psalm.xml, phpunit.xml.dist
  • Docs: README.md, LICENSE (MIT), CONTRIBUTING.md, SECURITY.md, CHANGELOG.md
  • Composer scripts: test, test-coverage, psalm, cs-check, cs-fix, benchmark, qa
  • Optional PSR requirements: PSR-7, PSR-15, PSR-11

Requirements

  • bash
  • git + GitHub CLI (gh auth login)
  • PHP 8.4+, Composer (for the generated package)

Usage

# Basic
scripts/scaffold-php-package.sh http-foundation "PSR-7 utilities and factories" --with-psr7

# With PSR-15 and Container
scripts/scaffold-php-package.sh events "Lightweight event dispatcher" --with-psr15 --with-container

# Customize vendor, org, keywords
scripts/scaffold-php-package.sh cache "Simple cache library" \
  --vendor atomic --org atomic-php --keywords "php cache performance library"

Options:

  • --org (default: atomic-php): GitHub organization used in README badges
  • --vendor (default: atomic): Composer vendor name
  • --name-slug: override the Composer package name (defaults to directory name)
  • --keywords: space‑separated keywords for composer.json
  • --with-psr7: add psr/http-message
  • --with-psr15: add psr/http-server-handler and psr/http-server-middleware
  • --with-container: add psr/container

What it generates

  • Composer metadata aligned with Atomic repos
  • CI workflow mirroring the Atomic style (tests, coverage, psalm, cs, validate)
  • Standard code quality and docs files

After scaffolding

cd <dir>
composer install
git init && git add . && git commit -m "chore: initial scaffold"
# Create GitHub repo and push
gh repo create atomic-php/<dir> --public --source=. --remote=origin --push

License

MIT

About

🛠️ Atomic PHP package scaffold: generate repos matching http-kernel/router conventions (CI, QA, PSR-first).

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages