Yii2: Please add license in GitHub settings

Created on 15 Apr 2018  路  14Comments  路  Source: yiisoft/yii2

Please add license in GitHub settings of the repository.

Currently, GitHub could not identify Your project licence, and it's not shown in interface, and not available via Github's API also.

Ref : https://help.github.com/articles/adding-a-license-to-a-repository/

Most helpful comment

I prefer something like:

/*
 * This file is part of the Yii Framework.
 *
 * Copyright (c) 2008 Yii Software LLC
 *
 * Licensed under BSD 3-Clause License. For the full copyright and license information, 
 * please view the LICENSE.md file that was distributed with this source code.
 */

All 14 comments

Hi !

I just get the answer from GitHub support team. Basically, GitHub uses automatic license detector : https://github.com/benbalter/licensee

I just installed it locally and get following results :

bundle exec bin/licensee detect https://github.com/yiisoft/yii2 --remote --license bsd-3-clause
License:        
Matched files:  LICENSE.md, package.json
LICENSE.md:
  Content hash:  587d7a2a466c4862573ba3d29864b18f80d764f8
  License:       
  Closest licenses:
    BSD-3-Clause similarity:        92.00%
    BSD-3-Clause-Clear similarity:  90.35%
    BSD-2-Clause similarity:        84.62%
package.json:
  Confidence:  90.00%
  Matcher:     Licensee::Matchers::NpmBower
  License:     BSD-3-Clause
Comparing to BSD 3-Clause "New" or "Revised" License:
Input Length:      1583
License length:    1410
Similarity:      92.00%
diff --git a/LICENSE b/LICENSE
index 73e3883..f5630b7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,19 +1,21 @@
{+the yii framework is free software. it is released under the terms of the+}
{+following bsd license. copyright 漏 2008 by yii software llc+}
{+http://www.yiisoft.com all rights reserved.+} redistribution and use in source and
binary forms, with or without modification, are permitted provided that the
following conditions are met: redistributions of source code must retain the
above copyright notice, this list of conditions and the following disclaimer.
redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution. neither the name of [-the copyright holder-]{+yii software+}
{+llc+} nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission. this
software is provided by the copyright holders and contributors "as is" and any
express or implied warranties, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose are
disclaimed. in no event shall the copyright [-holder-]{+owner+} or contributors be liable for
any direct, indirect, incidental, special, exemplary, or consequential damages
including, but not limited to, procurement of substitute goods or services; loss
of use, data, or profits; or business interruption however caused and on any
theory of liability, whether in contract, strict liability, or tort including
negligence or otherwise arising in any way out of the use of this software, even
if advised of the possibility of such damage.

All of the sections surrounded by {+ and +} are additions that that tool detected. GitHub has 98% confidence requirement, so with those changes GitHub not meeting that threshold to detect this license.

If the project removes those additions, then the license will be detected properly.

Of course, it's author's and community choice, which version of license the project should use.

Would be nice if GitHub could learn to read this from composer.json files.

@schmunk42 In a legal sense, the text of the license is more important, not mentions in composer.json.

Removing first line of license file should be enough - it is redundant to the rest of license content anyway:

The Yii framework is free software. It is released under the terms of the following BSD License.

Let's see if it helps.

I see BSD-3-Clause here:

bildschirmfoto von 2018-04-27 10-44-27

This was working before and imo should be reported as a bug to github instead of changed here. Imo it's important to state in the file that it is a BSD license. When checking for the license file seeing BSD will tell enough you need to know in most cases.

That's because I've changed it. Before it wasn't there.

A few month ago it definitively was there. So it seems github has changed something.

When checking for the license file seeing BSD will tell enough you need to know in most cases.

If you know what BSD license is, you will recognize it at first glance.

IMO the bigger problem is current file header - you need to click a link to know a license:

/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

BTW: this is still not fixed at https://github.com/yiisoft/yii2-framework

Please do not add the full license text to every file, that's overkill.

But it should be updated to something like:

@license http://www.yiiframework.com/license/bsd-3-clause

So it's clear which license is meant and just in case this will be changed sometime in the future.

I prefer something like:

/*
 * This file is part of the Yii Framework.
 *
 * Copyright (c) 2008 Yii Software LLC
 *
 * Licensed under BSD 3-Clause License. For the full copyright and license information, 
 * please view the LICENSE.md file that was distributed with this source code.
 */

Closing since:

  1. License is now identified/linked.
  2. For 3.0 we're removing excessive headers.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

schmunk42 picture schmunk42  路  47Comments

alexraputa picture alexraputa  路  53Comments

rosancoderian picture rosancoderian  路  46Comments

njasm picture njasm  路  44Comments

cebe picture cebe  路  53Comments