2017 © Pedro Peláez
 

project composer-package-template

Basic composer package template for creating other packages.

image

gino-pane/composer-package-template

Basic composer package template for creating other packages.

  • Tuesday, December 12, 2017
  • by GinoPane
  • Repository
  • 1 Watchers
  • 1 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 0 Open issues
  • 20 Versions
  • 0 % Grown

The README.md

Composer Package Template

Latest Stable Version License composer.lock Total Downloads, (*1)

If you are trying to create a new PHP Composer package, whether it is going to be submitted to packagist.org or just to exist in your Github account, this template package of files will surely help you make the process a lot easier and faster., (*2)

Requirements

  • PHP >= 7.0;
  • composer.

Features

  • PSR-4 autoloading compliant structure;
  • PSR-2 compliant code style;
  • Unit-Testing with PHPUnit 6;
  • Comprehensive guide and tutorial;
  • Easy to use with any framework or even a plain php file;
  • Useful tools for better code included.

Installation

composer create-project gino-pane/composer-package-template yourproject

This will create a basic project structure for you:, (*3)

  • /build is used to store code coverage output by default;
  • /src is where your codes will live in, each class will need to reside in its own file inside this folder;
  • /tests each class that you write in src folder needs to be tested before it was even "included" into somewhere else. So basically we have tests classes there to test other classes;
  • .gitignore there are certain files that we don't want to publish in Git, so we just add them to this fle for them to "get ignored by git";
  • CHANGELOG.md to keep track of package updates;
  • CONTRIBUTION.md Contributor Covenant Code of Conduct;
  • LICENSE terms of how much freedom other programmers is allowed to use this library;
  • README.md it is a mini documentation of the library, this is usually the "home page" of your repo if you published it on GitHub and Packagist;
  • composer.json is where the information about your library is stored, like package name, author and dependencies;
  • phpunit.xml It is a configuration file of PHPUnit, so that tests classes will be able to test the classes you've written;
  • .travis.yml basic configuration for Travis CI with configured test coverage reporting for code climate.

Please refer to original article for more information., (*4)

Useful Tools

Running Tests:

php vendor/bin/phpunit

or, (*5)

composer test

Code Sniffer Tool:

php vendor/bin/phpcs --standard=PSR2 src/

or, (*6)

composer psr2check

Code Auto-fixer:

php vendor/bin/phpcbf --standard=PSR2 src/ 

or, (*7)

composer psr2autofix

Building Docs:

php vendor/bin/phpdoc -d "src" -t "docs"

or, (*8)

composer docs

Changelog

To keep track, please refer to CHANGELOG.md., (*9)

Contributing

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Make your changes.
  4. Run the tests, adding new ones for your own code if necessary (phpunit).
  5. Commit your changes (git commit -am 'Added some feature').
  6. Push to the branch (git push origin my-new-feature).
  7. Create new pull request.

Also please refer to CONTRIBUTION.md., (*10)

License

Please refer to LICENSE., (*11)

The Versions

12/12 2017

dev-master

9999999-dev http://github.com/GinoPane/composer-package-template

Basic composer package template for creating other packages.

  Sources   Download

MIT dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package composer template package template composer package template

12/12 2017

v1.2.5

1.2.5.0 http://github.com/GinoPane/composer-package-template

Basic composer package template for creating other packages.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package composer template package template composer package template

12/12 2017

v1.2.4

1.2.4.0 http://github.com/GinoPane/composer-package-template

Basic composer package template for creating other packages.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package composer template package template composer package template

12/12 2017

v1.2.3

1.2.3.0 http://github.com/GinoPane/composer-package-template

Basic composer package template for creating other packages.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package composer template package template composer package template

11/12 2017

v1.2.2

1.2.2.0 http://github.com/GinoPane/composer-package-template

Basic composer package template for creating other packages.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package composer template package template composer package template

11/12 2017

v1.2.1

1.2.1.0 http://github.com/GinoPane/composer-package-template

Basic composer package template for creating other packages.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package composer template package template composer package template

01/12 2017

v1.2

1.2.0.0 http://github.com/GinoPane/composer-package-template

Template composer package for creating other packages

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

22/11 2017

v1.1.9

1.1.9.0 http://github.com/GinoPane/composer-package-template

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

20/11 2017

v1.1.8

1.1.8.0 http://github.com/GinoPane/composer-package-template

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

19/11 2017

v1.1.7

1.1.7.0 http://github.com/GinoPane/composer-package-template

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

19/11 2017

v1.1.6

1.1.6.0 http://github.com/GinoPane/composer-package-template

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

19/11 2017

v1.1.5

1.1.5.0 http://github.com/GinoPane/composer-package-template

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

17/11 2017

v1.1.4

1.1.4.0 http://github.com/GinoPane/composer-package-template

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

17/11 2017

v1.1.3

1.1.3.0

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

17/11 2017

v1.1.2

1.1.2.0

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

17/11 2017

v1.1.1

1.1.1.0

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

17/11 2017

v1.1.0

1.1.0.0

Template composer package for creating other packages

  Sources   Download

dbad

The Requires

  • php ^7.0

 

The Development Requires

by Darwin Biler

template composer boilerplate skeleton package

17/11 2017

v1.0.2

1.0.2.0

Boilerplate package for creating other packages.

  Sources   Download

dbad

The Requires

  • php >=5.4

 

The Development Requires

by Darwin Biler

template composer package

17/11 2017

v1.0.1

1.0.1.0

Boilerplate package for creating other packages.

  Sources   Download

dbad

The Requires

  • php >=5.4

 

The Development Requires

by Darwin Biler

template composer package

28/02 2016

v1.0.0

1.0.0.0

Boilerplate package for creating other packages.

  Sources   Download

dbad

The Requires

  • php >=5.4

 

The Development Requires

by Darwin Biler

template composer package