Download the PHP package rafrsr/licenser without Composer

On this page you can find all versions of the php package rafrsr/licenser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package licenser

Licenser

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version Total Downloads License

SensioLabsInsight

Automates the prepending of a license header doc block to your directory(ies) of source files.

Install

You can grab a copy of rafrsr/licenser in either of the following ways.

As a phar

You can simply download a pre-compiled and ready-to-use version as a Phar to any directory. Simply download the latest licenser.phar file from our releases page:

Latest release

Verify everything works by running this:

`

Now can copy this tool when you need to use in any project

Updating phar

There's no separate update procedure, simply download the latest release again and overwrite the existing phar.

Installation using Composer

Alternatively, you can also install Licenser as part of your development dependencies. You will likely want to use the require-dev section to exclude rafrsr/licenser in your production environment.

  1. Install composer
  2. Execute: require rafrsr/licenser --dev
  3. Run ./vendor/bin/licenser --version

Updating dependency

Just run composer update rafrsr/licenser to update to the latest release.

Usage

Using a built-in license type

Licenser supports the following built-in licenses and headers:

To use one of these built-in licenses you just replace the path to your custom licenses file with the name of the built-in license instead. For example if you wanted to use the MIT license then you would run something like:

`

The default header is used when run something like this: `

Value replacement in built-in licenses

When using a built-in license the Licenser will replace special placeholders with custom values. Placeholder can vary according to license:

license placeholders
default author, package, version
mit author
apache2.0 author
symfony author, package
e.g.

`

Creating your custom license template

License template can be created using a simple text file. License templates are processed using Twig, then can use any twig feature.

e.g.

`

To process this license: `

NOTE: parameters passed in the commandline can be used in the license template

Checking files for correct license

Licenser also allows you to check your source files for correct license information. It will warn you if there are any source files that do not have a license header that matches the options you provide.

`

By default the check only return if all files are ok or not, bu can use verbosity levels to view more details.

`

Verbosity levels are available in all actions

Dry-run

Licenser also allows you to verify all available changes using a dry-run. Is a mix between normal process and only-check, verify all changes to see affected files before adding headers.

`

YML configuration per project

Licenser support create a .yml file for each project with custom settings. Is helpful to use a global installation of Licenser and same commandline for all projects.

Create a yml file under your project directory

e.g:

`

and execute

or In the second example the finder is overwritten and apply the given config to given file or directory.

YML Settings

To see all available options and usage refer to: Finder. All options given in this configuration are used to build a instance of Finder.

NOTE: can reference to a constant in parameters using @ before the name of the constant, e.g: @Rafrsr\Licenser\Licenser::VERSION

Usage in others files types like javascript source files

By default licenser only find for files named *.php can change this behavior in the finder configuration.

e.g:

`

Muti-finder for each type of file

Licenser support configure more than one finder in order to find different files types on different folders, use finders instead of finder to enable this.

e.g:

`

The above example find for default*.php files in src folder, and *.js files in web/js folder ignoring jquery and bootstrap folders in this location

Caution

It is recommended that you have your source files under version control when running the tool as it is still experimental.

Copyright

This project is licensed under the MIT license.


All versions of licenser with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
symfony/console Version ~2.8|~3.0
symfony/filesystem Version ~2.8|^3.1
symfony/stopwatch Version ~2.8|^3.1
symfony/finder Version ~2.8|~3.0
symfony/yaml Version ~2.8|~3.0
twig/twig Version ~1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rafrsr/licenser contains the following files

Loading the files please wait ....