2017 © Pedro Peláez
 

library laravel-packager

A cli tool for creating Laravel packages.

image

jeroen-g/laravel-packager

A cli tool for creating Laravel packages.

  • Thursday, June 21, 2018
  • by JeroenG
  • Repository
  • 29 Watchers
  • 517 Stars
  • 106,685 Installations
  • PHP
  • 10 Dependents
  • 0 Suggesters
  • 91 Forks
  • 0 Open issues
  • 20 Versions
  • 8 % Grown

The README.md

Laravel Packager

Latest Version on Packagist ![Total Downloads][ico-downloads] Build Status StyleCI, (*1)

This package provides you with a simple tool to set up a new package and it will let you focus on the development of the package instead of the boilerplate. If you like a visual explanation check out this video by Jeffrey Way on Laracasts., (*2)

Installation

Via Composer, (*3)

composer require jeroen-g/laravel-packager --dev

If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:, (*4)

JeroenG\Packager\PackagerServiceProvider::class,

If you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider. Be aware that the auto-discovery also means that this package is loaded in your production environment. Therefore you may disable auto-discovery and instead put in your AppServiceProvider something like this:, (*5)

if ($this->app->environment('local')) {
    $this->app->register('JeroenG\Packager\PackagerServiceProvider');
}

Optional you can publish the configuration to provide a different service provider stub. The default is here., (*6)

php artisan vendor:publish --provider="JeroenG\Packager\PackagerServiceProvider"

Available commands

New

Command:, (*7)

php artisan packager:new my-vendor my-package

Result: The command will handle practically everything for you. It will create a packages directory, creates the vendor and package directory in it, pulls in a skeleton package, sets up composer.json and creates a service provider., (*8)

Options:, (*9)

php artisan packager:new my-vendor my-package --i
php artisan packager:new --i

The package will be created interactively, allowing to configure everything in the package's composer.json, such as the license and package description., (*10)

php artisan packager:new my-vendor/my-package

Alternatively you may also define your vendor and name with a forward slash instead of a space., (*11)

Remarks: The new package will be based on this custom skeleton. If you want to use a different package skeleton, you can either: - (A) publish the configuration file and change the default skeleton that will be used by all packager:new calls. - (B) use the flag --skeleton="http://github.com/path/to/archive/master.zip" with your own skeleton to use the given skeleton for this one run instead of the one in the configuration., (*12)

Get & Git

Command:, (*13)

php artisan packager:get https://github.com/author/repository
php artisan packager:git https://github.com/author/repository

Result: This will register the package in the app's composer.json file. If the packager:git command is used, the entire Git repository is cloned. If packager:get is used, the package will be downloaded, without a repository. This also works with Bitbucket repositories, but you have to provide the flag --host=bitbucket for the packager:get command., (*14)

Options:, (*15)

php artisan packager:get https://github.com/author/repository --branch=develop
php artisan packager:get https://github.com/author/repository my-vendor my-package
php artisan packager:git https://github.com/author/repository my-vendor my-package

It is possible to specify a branch with the --branch option. If you specify a vendor and name directly after the url, those will be used instead of the pieces of the url., (*16)

Tests

Command:, (*17)

php artisan packager:tests

Result: Packager will go through all maintaining packages (in packages/) and publish their tests to tests/packages. Add the following to phpunit.xml (under the other testsuites) in order to run the tests from the packages:, (*18)

<testsuite name="Packages">
    <directory suffix="Test.php">./tests/packages</directory>
</testsuite>

Options:, (*19)

php artisan packager:tests my-vendor my-package

Remarks: If a tests folder exists, the files will be copied to a dedicated folder in the Laravel App tests folder. This allows you to use all of Laravel's own testing functions without any hassle., (*20)

List

Command:, (*21)

php artisan packager:list

Result: An overview of all packages in the /packages directory., (*22)

Options:, (*23)

php artisan packager:list --git

The packages are displayed with information on the git status (branch, commit difference with origin) if it is a git repository., (*24)

Remove

Command:, (*25)

php artisan packager:remove my-vendor my-package

Result: The my-vendor\my-package package is deleted, including its references in composer.json and config/app.php., (*26)

Publish

Command:, (*27)

php artisan packager:publish my-vendor my-package https://github.com/my-vendor/my-package

Result: The my-vendor\my-package package will be published to Github using the provided url., (*28)

Check

Command:, (*29)

php artisan packager:check my-vendor my-package

Result: The my-vendor\my-package package will be checked for security vulnerabilities using SensioLabs security checker., (*30)

Remarks You first need to run, (*31)

composer require sensiolabs/security-checker

Issues with cURL SSL certificate

It turns out that, especially on Windows, there might arise some problems with the downloading of the skeleton, due to a file regarding SSL certificates missing on the OS. This can be solved by opening up your .env file and putting this in it:, (*32)

CURL_VERIFY=false

Of course this means it will be less secure, but then again you are not supposed to run this package anywhere near a production environment., (*33)

Issues with timeout

If you are having problems with timeouts when creating new packages, you can now change the config variable timeout in config/packager.php to fix this., (*34)

Changelog

Please see changelog.md for what has changed recently., (*35)

Contributing

Please see contributing.md for details and a todolist., (*36)

Credits

License

The EU Public License. Please see license.md for more information., (*37)

The Versions

21/06 2018

dev-master

9999999-dev https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

laravel skeleton package github packager

07/06 2018

V2.0.1

2.0.1.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

laravel skeleton package packager

12/05 2018

2.0

2.0.0.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

laravel skeleton package packager

12/05 2018

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

laravel skeleton package packager

01/09 2017
26/06 2017
04/06 2017

dev-laravel55

dev-laravel55 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

11/03 2017
16/02 2017

v1.5.3

1.5.3.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

10/02 2017

v1.5.2

1.5.2.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

03/11 2016

V1.5.1

1.5.1.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

25/04 2016

v1.5

1.5.0.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

13/03 2016

v1.4

1.4.0.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

17/11 2015

v1.3

1.3.0.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

14/11 2015

v1.2

1.2.0.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

13/11 2015

v1.1

1.1.0.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

27/06 2015

v1.0

1.0.0.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

20/06 2015

v0.2.1

0.2.1.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

EUPL-1.1

The Requires

 

laravel skeleton package github packager

10/06 2015

v0.2

0.2.0.0 https://github.com/Jeroen-G/laravel-packager

A cli tool for creating Laravel packages.

  Sources   Download

MIT

The Requires

 

laravel skeleton package github packager

10/06 2015

v0.1

0.1.0.0 https://github.com/Jeroen-G/packager

A cli tool for creating Laravel packages.

  Sources   Download

MIT

The Requires

 

laravel skeleton package github packager