Download the PHP package nibra/fix-copyright without Composer

On this page you can find all versions of the php package nibra/fix-copyright. 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 fix-copyright

fix-copyright

This tool is a one-shot project created to convert the copyright statements in the Joomla project to a standardised format. It might be useful for other projects as well.

Why bother

Until 2020, Joomla used to use this format:

Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved.

The ending year of the range had to be updated each year for each file. Although this update was done by a script, this process kept polluting the file history all the time without any benefit.

Thus, the Production Department leadership of Joomla decided in mid-2020 to follow the advice in this excellent article about how and why to properly write copyright statements.

Some people consider this change pointless, but, as Michael Babker nailed it,

This might come across as a pointless change, but the other pointless change is modifying every file in every Joomla owned repository in January to amend the ending date of the copyright claim. Additionally, a copyright claim is being made on every file in most every Joomla owned repository of a copyright dating back to 2005, which is clearly not factual.

How it works

The original approach to determine the creation date for a file was

However, the results were disappointing. git itself uses content similarity to find renames, which led to unexpected results.

The Git > Show History function of PhpStorm, on the other hand, gave very plausible results for the first commit, and some research revealed the implementation in IntelliJ (which is the base for PhpStorm). The people at JetBrains found that

git log --follow does detect renames, but it has a bug - merge commits aren't handled properly: they just disappear from the history. See http://kerneltrap.org/mailarchive/git/2009/1/30/4861054 and the whole thread about that: --follow is buggy, but maybe it won't be fixed.

The solution, which is re-implemented here, is to

  1. Get the first commit of the file with that name
  2. Get the status (Added, Copied or Renamed) of that commit
  3. Stop, if status is Added or Copied, this really is the first commit.
  4. Status is Renamed, so get the first commit of the file with the previous name before the current commit.
  5. Continue with step 2.

How to adopt the scripts for your environment

In fix-copyright.sh, change lines 4-7 to suit your settings:

Be aware of the different kinds of escaping for grep rsp. sed.

You might want to adjust the default year in lines 18 and 20 (here the default year is 2005):

ToDo


All versions of fix-copyright with dependencies

PHP Build Version
Package Version
No informations.
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 nibra/fix-copyright contains the following files

Loading the files please wait ....