Download the PHP package gino-pane/composer-package-template without Composer
On this page you can find all versions of the php package gino-pane/composer-package-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download gino-pane/composer-package-template
More information about gino-pane/composer-package-template
Files in gino-pane/composer-package-template
Download gino-pane/composer-package-template
More information about gino-pane/composer-package-template
Files in gino-pane/composer-package-template
Vendor gino-pane
Package composer-package-template
Short Description Basic composer package template for creating other packages.
License MIT
Homepage http://github.com/GinoPane/composer-package-template
Package composer-package-template
Short Description Basic composer package template for creating other packages.
License MIT
Homepage http://github.com/GinoPane/composer-package-template
Please rate this library. Is it a good library?
Informations about the package composer-package-template
Composer Package Template
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.
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:
- /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.
Useful Tools
Running Tests:
php vendor/bin/phpunit
or
composer test
Code Sniffer Tool:
php vendor/bin/phpcs --standard=PSR2 src/
or
composer psr2check
Code Auto-fixer:
php vendor/bin/phpcbf --standard=PSR2 src/
or
composer psr2autofix
Building Docs:
php vendor/bin/phpdoc -d "src" -t "docs"
or
composer docs
Changelog
To keep track, please refer to CHANGELOG.md.
Contributing
- Fork it.
- Create your feature branch (git checkout -b my-new-feature).
- Make your changes.
- Run the tests, adding new ones for your own code if necessary (phpunit).
- Commit your changes (git commit -am 'Added some feature').
- Push to the branch (git push origin my-new-feature).
- Create new pull request.
Also please refer to CONTRIBUTION.md.
License
Please refer to LICENSE.
All versions of composer-package-template with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.0
The package gino-pane/composer-package-template contains the following files
Loading the files please wait ....