2017 © Pedro PelĂĄez
 

library license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

image

aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  • Saturday, March 3, 2018
  • by aedart
  • Repository
  • 1 Watchers
  • 0 Stars
  • 543 Installations
  • PHP
  • 35 Dependents
  • 2 Suggesters
  • 1 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Abandoned - License File Manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a "glorified" wrapper for PHP's copy function, but it makes managing license files a bit easier, when you are developing multiple packages., (*2)

Contents

When to use this

How many composer-based packages are you working on? Do any of them contain a small file, named LICENSE? How do you manage that file, across all of your packages?, (*3)

If you wish to maintain your license files from a single repository (or package) and just fetch the latest released version-file, then perhaps this small package might be able to help you., (*4)

How to install


composer require aedart/license-file-manager 1.*

This package uses composer. If you do not know what that is or how it works, I recommend that you read a little about, before attempting to use this package., (*5)

Quick start

Prerequisite

You should know how to work with git-scm, (*6)

You should have some knowledge of how to create, publish and work with composer based projects, (*7)

Step 1: Create a repository (with a composer file)

Create a new repository that must contain your various license files., (*8)

Remember to also create a composer file for that package, with a custom name, e.g. Acme/License, (*9)

If you need inspiration for how you could organise your files, please review the folder structure of Aedart/License, (*10)

Step 2: Create your license file

In your new repository, create a license file., (*11)

Tip: If you know that you are going to work with multiple types of licenses, then perhaps you should name each of your license-files according to their type, e.g. Apache-2-license, (*12)

Step 3: Publish your license repository / package

You can publish repository, once your license-file(s) are ready to be used in one of your projects., (*13)

However, please note that composer does also allow loading directly from repositories, if you do not wish to publish it on Packagist. For additional information, review the Repositories section on composer’s documentation., (*14)

Step 4: Require your license package and License Manager dependencies

In you require or require-dev, state your license package dependency, as well as this manager’s dependency;, (*15)

{
  "require-dev": {
    "acme/license": "1.*",
    "aedart/license-file-manager": "1.*"
  }
}

Run composer update
, (*16)

Tip: Unless there is a good reason why your entire license package should end up in the vendor folder, for those that are using it, then you should just require it for development – specify your dependency in the ‘require-dev’ section of your composer file., (*17)

Step 5: Copy the desired license file

Invoke the following command, and your license file will be copied from your package into the root of your current project;, (*18)

php vendor/bin/license-manager license:copy vendor/acme/license/Apache-2-license

A LICENSE file should be added into the root of your project., (*19)

NOTE: If there already exists a file named LICENSE in your project root, it will only be overwritten if its SHA1 checksum is not the same as the license file from the vendor folder., (*20)

Alternative: composer post-update-cmd script

If you wish to let composer do the work for you, each time that you work on your project, then you can specify a post update script, in your composer file;, (*21)

{
  "scripts": {
    "post-update-cmd": "vendor/bin/license-manager license:copy vendor/acme/license/Apache-2-license"
  }
}

Please note, this script will only be triggered when you are working on your package; thus, when it is being declared inside your root level composer file. Read more about composer’s scripts, in order to get a better understanding of how this works., (*22)

Onward

This package offers you a way to organise your various license files into a single repository and fetch the one that you need. However, on the down side, your license file is only updated when you are working with your package. Nevertheless, it might still be a better way of managing license files, rather than manually having to copy, paste and maintain them across multiple packages., (*23)

License

BSD-3-Clause, Read the LICENSE file included in this package, (*24)

The Versions

03/03 2018

dev-master

9999999-dev https://github.com/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

03/03 2018

2.0.0

2.0.0.0 https://github.com/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

08/01 2017

1.8.0

1.8.0.0 https://github.com/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

27/08 2016

1.7.0

1.7.0.0 https://github.com/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

07/05 2016

1.6.1

1.6.1.0 https://github.com/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

07/05 2016

1.6.0

1.6.0.0 https://github.com/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

03/01 2016

1.5.0

1.5.0.0 https://github.com/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

17/10 2015

1.4.0

1.4.0.0 https://github.com/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

04/10 2015

1.3.0

1.3.0.0 https://bitbucket.org/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

21/06 2015

1.2.0

1.2.0.0 https://bitbucket.org/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

25/04 2015

1.1.1

1.1.1.0 https://bitbucket.org/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

03/04 2015

1.1.0

1.1.0.0 https://bitbucket.org/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license

03/04 2015

1.0.0

1.0.0.0 https://bitbucket.org/aedart/license-file-manager

A simple LICENSE-file manager for you composer packages. Allows you to store / organise your various licenses into a single package, fetch it and update your current project’s license file with the desired one. At its core, this package is nothing more than a ‘glorified’ wrapper for PHP’s copy function, but it makes managing license files a bit easier, when you are developing multiple packages.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alin Eugen Deac

manager license