PHPackages                             parf/composer-php8-template - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. parf/composer-php8-template

ActiveProject[Templating &amp; Views](/categories/templating)

parf/composer-php8-template
===========================

PHP8/8.1 Template for composer/packagist

1.0.2(4y ago)04MITPHPPHP &gt;=8.0

Since Apr 5Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/parf/composer-php8-template)[ Packagist](https://packagist.org/packages/parf/composer-php8-template)[ RSS](/packages/parf-composer-php8-template/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

PHP8/8.1 composer/packagist package template
============================================

[](#php881-composerpackagist-package-template)

UNSUPPORTED / OLD TEMPLATE
==========================

[](#unsupported--old-template)

This repository is no longer supported.

Please use the current template instead:

-

INSTALL / How to Use:
=====================

[](#install--how-to-use)

- `composer create-project parf/composer-php8-template` **your-project-name**
- edit `composer.json`
- run `composer install`

Provides:
---------

[](#provides)

- ready to use Composer Package Template for php 8/8.1 projects
- commonly used php tools (see list below)
- default tools configurations
- useful scripts

Provided Php-Tools
==================

[](#provided-php-tools)

- php code linter
- [psalm](https://psalm.dev/docs/annotating_code/supported_annotations/) static code analyzer and fixer
- [php-stan](https://phpstan.org/writing-php-code/phpdocs-basics) static code analyzer
- [rector](https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md) code analyzer &amp; refactoring tool
- [phpDocumentor](https://docs.phpdoc.org/3.0/guide/guides/running-phpdocumentor.html#quickstart) documentation application for PHP projects
- [php-cs-fixer](https://mlocati.github.io/php-cs-fixer-configurator/) Coding Standards Fixer
- [php-unit](https://phpunit.readthedocs.io/en/9.5/writing-tests-for-phpunit.html) Unit Testing
- [spartan-test](https://github.com/parf/spartan-test) (phpunit alternative) + automated web-test framework
- [psysh](https://developpaper.com/psysh-php-interactive-console/) - php cli shell

Shared tools setup
------------------

[](#shared-tools-setup)

This template expects a `tools` symlink that points at the shared `php-tools` `bin/` directory.

Example setup:

```
mkdir -p ~/src
cd ~/src
git clone https://github.com/homebase/php-tools.git
cd php-tools
./php-tools install all

cd /path/to/your-project
ln -s ~/src/php-tools/bin tools
```

See [setup-tools.howto](setup-tools.howto) for the full notes.

Scripts
=======

[](#scripts)

> `composer test`
> run [unit tests](https://github.com/parf/spartan-test). use `test-q` to run tests silently (show errors only)

> `composer psalm`
> check code with [psalm](https://psalm.dev/docs/annotating_code/supported_annotations/)

> `composer stan`
> check code with [php-stan](https://phpstan.org/writing-php-code/phpdocs-basics) (default level is 6)

> `composer lint`
> php syntax check

> `composer psalm-dry` / `composer psalm-fix` (aka [psalter](https://psalm.dev/docs/manipulating_code/fixing/))
> review/apply suggested code changes by psalm, be careful always do *dry-run* first

> `composer cs-dry` / `composer cs-fix`
> review/apply suggested code changes by [php-cs-fixer](https://mlocati.github.io/php-cs-fixer-configurator/), be careful always do *dry-run* first

> `composer doc`
> generate [phpDocumentor](https://docs.phpdoc.org/3.0/guide/guides/running-phpdocumentor.html#quickstart) documentation in `doc` folder

> `./check`
> do all checks: lint, unit tests, psalm, php-stan; stops when any of them failed

> `./check-commit`, `./check-push`
> do `./check`, add all new files to git, do `git commit -v -s` and `git push --tags`

> `./psysh` [php cli shell](https://developpaper.com/psysh-php-interactive-console/)
> notable commands: `wtf`, `doc Class`, `doc Class::method`, `show Class::method`, `ls -l ClassName`, `help`

see [composer.json](./composer.json) scripts section for more scripts shortcuts

###  Health Score

31

—

LowBetter than 65% of packages

Maintenance51

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

1594d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1048670?v=4)[Sergey Parf](/maintainers/parf)[@parf](https://github.com/parf)

---

Tags

template

### Embed Badge

![Health badge](/badges/parf-composer-php8-template/health.svg)

```
[![Health](https://phpackages.com/badges/parf-composer-php8-template/health.svg)](https://phpackages.com/packages/parf-composer-php8-template)
```

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.6k40.7M265](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

418153.8M67](/packages/rize-uri-template)[mopa/bootstrap-sandbox-bundle

Seperate live docs from code

246.8k](/packages/mopa-bootstrap-sandbox-bundle)[larablocks/pigeon

A more flexible email message builder for Laravel 5 including chained methods, reusable message configurations, and message layout and template view management.

143.7k](/packages/larablocks-pigeon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
