Skip to content

A simple PHP script to generate a (PHPPackage) package structure.

License

Notifications You must be signed in to change notification settings

phppackage/package-generator

 
 

Repository files navigation

Composer Package Generator (.phar tool)

Tweeked for organisation (PHPPackage), if you want a more generic version use this.

This very simple PHP script will generate the following structure, ready to start creating your composer package.

 ┐
 ├── src
 │   ├── MyPackage.php (generated based upon your package name)
 ├── tests
 │   ├── fixtures
 │   ├── PHPPackageMyPackageTest.php (generated based upon your namespace)
 │   └── bootstrap.php
 ├── .gitignore
 ├── .scrutinizer.yml
 ├── .styleci.yml
 ├── .travis.yml
 ├── CONTRIBUTING.md
 ├── LICENSE
 ├── phpunit.xml
 ├── README.md
 └── composer.json

Download

You can find prebuilt versions in releases, or simply do wget as shown below:

get https://github.com/phppackage/package-generator/releases/download/0.0.1/package-generator.phar

Install

Git clone this project or download a prebuilt verion:

$ git clone git@github.com:phppackage/package-generator.git . && composer install

Build

To build the package-generator.phar run:

bash /usr/bin/php -c /etc/php/7.0/cli/php.ini -f box.phar build -v

Run

/usr/bin/php package-generator.phar -w

Badges:

Markdown links and images will have been added to the README.md and should work once you push your project and enable the project on these 3rd party sites.

Boxing with box2

To box up you must have box installed:

curl -LSs https://box-project.github.io/box2/installer.php | php

Then you need to enable phar.readonly = 0 in cli's php.ini:

Sometimes no php.ini file is loaded when run in cli so its simpler to just define the php.ini when running build...

So build like so:

/usr/bin/php -c /etc/php/7.0/cli/php.ini -f box.phar build -v

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

A simple PHP script to generate a (PHPPackage) package structure.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 85.0%
  • Shell 15.0%