PHPackages                             rizzen/composer-package-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rizzen/composer-package-template

ActivePackage[Utility &amp; Helpers](/categories/utility)

rizzen/composer-package-template
================================

A simple Composer template for starting a library package using Git for versioning control.

v0.0.3(6y ago)08mitPHPPHP &gt;=5.3.0

Since Sep 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/rizzen-yazston/composer-package-template)[ Packagist](https://packagist.org/packages/rizzen/composer-package-template)[ RSS](/packages/rizzen-composer-package-template/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (3)Used By (0)

composer-package-template
=========================

[](#composer-package-template)

Description
-----------

[](#description)

A simple Composer template for starting a library package using Git for versioning control.

Requirements
------------

[](#requirements)

- Composer installed
- Git host account (where your project's repository will reside)
- \[Optional\] Packagist account (convenient way to share your project via Composer)

Installation
------------

[](#installation)

From a console prompt enter the following command and press . Replace the *path* of the command with the path of your project, even if the directory does not exist as it will be created by the command.

```
composer create-project rizzen/composer-package-template path

```

Usage
-----

[](#usage)

Once the template is installed, make the necessary changes to the existing files, add a few source code files (and directories) for your project.

### Edit meta data files

[](#edit-meta-data-files)

Edit the *date* and *name* in the LICENSE file (MIT license), or simple replace the LICENSE file with another license that is suitable for the project.

The included README.md provides a good start for your project's README.md file, as it contains the common sections typically found in many projects' README.md file. Edit the README.md file as needed to reflect your project.

Edit the composer.json file to reflect your project, such as vendor identifier, project package name, author(s) details, descriptions, etc.

Remember to use your vendor identifier in the namespace of your project files.

### Update project source files

[](#update-project-source-files)

Once satisfied with the above meta files editing, it is time to to add your project's source code. Begin with removing, or renaming and editing, the example class file in *src* directory. Create additional sub directories as required, and add the source files.

If planning to do unit testing, create a directory in package directory outside the src directory, and place all your unit testing files there, this way you can keep your src directory clean.

### Hosted Git repository

[](#hosted-git-repository)

No need to add the entire project before setting up Git in your package. Even one class file in src directory is enough to start off with.

On your hosted Git repository website, create repository of the *same name* as your package. Ensure the repository is *public*, and there is no need to add README.md or LICENSE as you already have edited them from the above section.

At console prompt, enter the following commands, each followed by pressing . Adjust the commands as needed, but particular the *email*, *git-username*, and *package-name* with your project's details.

```
git init
git remote add origin email:git-username/package-name.git
git add --all
git commit -m "Initial project setup."
git tag -a v0.0.1 -m "Initial project setup."
git push -u origin master

```

### Register package in Packagist

[](#register-package-in-packagist)

Even though not a requirement, it is recommended to register your package on Packagist, and have it linked to your hosted Git repository. By registering your package on Packagist, you are enabling easier usage of your package, as Packagist will use the Git repository tags to determine which version of your package to deliver to the user's project via Composer. Here the term *user* means application user, or developer of application, or another library package dependent on your project.

On Packagist website  login with your account, if not create an account. Then head over to *Submit* page, which just has a single URL field to be filled in with the URL to your project's Git repository, and a Submit button.

At this point you should see a warning: *This package is not auto-updated. Please set up the GitHub Hook for Packagist so that it gets updated whenever you push!*

The easiest way of keeping your package up to date is to allow your Git repository send notification to Packagist. Else you can manually update your package on Packagist using the green Update button.

#### For GitHub

[](#for-github)

Simple process:

1. Navigate to your repository in Github and click on *Settings*.
2. In this document select the *Webhooks* option from the left menu.
3. Click on *Add webhook* and search for Packagist and then click on it.
4. On the Webhooks / Add webhook page, fill in the 4 fields:
    - Payload URL with , where GitHubUsername is your GitHub account username.
    - Content Type as application/json
    - Secret is your Packagist API Token, obtained from your Packagist profile page.
    - Which events, just *push* events is good enough.
5. Click Add webhook to complete the process.

Authors and Contributors
------------------------

[](#authors-and-contributors)

Rizzen Yazston

License
-------

[](#license)

This Composer template is released under the MIT license, see included LICENSE file.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

2

Last Release

2418d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a622ab82f29910d80bec7e9b5ef418ae12a0039389e2d5381e027cb1b9d0ce12?d=identicon)[rizzen](/maintainers/rizzen)

---

Top Contributors

[![rizzen-yazston](https://avatars.githubusercontent.com/u/36046469?v=4)](https://github.com/rizzen-yazston "rizzen-yazston (3 commits)")

### Embed Badge

![Health badge](/badges/rizzen-composer-package-template/health.svg)

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

###  Alternatives

[phenx/php-font-lib

A library to read, parse, export and make subsets of different types of font files.

1.8k154.8M51](/packages/phenx-php-font-lib)[hubertnnn/laravel-nova-field-dynamic-select

A Laravel Nova field.

22148.1k](/packages/hubertnnn-laravel-nova-field-dynamic-select)

PHPackages © 2026

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