Issues

ZF-507: Update all docblocks to use consistent copyright/license header.

Issue Type: Coding Standards Violation Created: 2006-11-08T12:54:57.000+0000 Last Updated: 2010-01-05T17:31:34.000+0000 Status: Resolved Fix version(s): - 1.8.4 (23/Jun/09)

Reporter: Bill Karwin (bkarwin) Assignee: Bill Karwin (bkarwin) Tags: Related issues: - ZF-691

Attachments:

Description

There are quite a few code files throughout the library, tests, and incubator that have an inconsistent header docblock.

We need to have a single canonical header docblock that correctly describes the copyright and license for the code, and we need to make that docblock present in all files for PHP code, tests, scripts, etc.

Comments

Posted by Bill Karwin (bkarwin) on 2006-11-13T15:08:10.000+0000

Changing fix version to unknown.

Posted by Ralph Schindler (ralph) on 2006-12-27T13:29:26.000+0000

We should aim to document this task at this location:

http://framework.zend.com/wiki/display/…

This should be stock, for copy and paste with minimal substitutions.., also year should be updated to 2007

Posted by Raphael Geissert (raphael) on 2007-08-01T10:59:00.000+0000

More information:

The file ZendFramework-1.0.1/library/Zend/Db/Adapter/Db2.php contains the next copyright line: * @copyright Copyright (c) 2005-2007 Zend Technologies Inc. (http://www.zend.com)

Where it should be like the others: * @copyright Copyright (c) 2005-2007 Zend Technologies USA, Inc

Similar to * @copyright 2005 Zend Technologies in file /ZendFramework-1.0.1/demos/Zend/Gdata/Blogger.php

And it would be much better if files with different copyrights aren't shipped. These include the xml samples located at ZendFramework-1.0.1/tests/Zend/Feed/_files/, parts of the PEAR manual located at ZendFramework-1.0.1/tests/Zend/Search/Lucene/_files/_indexSource and ZendFramework-1.0.1/demos/Zend/Search/Lucene/indexing/IndexSource/

Using grep[1] you will find more of those files not covered by the copyright information in LICENSE.txt

[1] grep -ir copyright ZendFramework-1.0.1 | grep -vi "Zend Technologies USA"

Posted by Ralph Schindler (ralph) on 2007-09-12T12:08:38.000+0000

  • smarter @package / @subpackage docblock items for better apidoc building
  • consistent require_once docblock
  • link to bug tracker (jira) so that its easy to know where to report bugs

-more to come

Posted by Darby Felton (darby) on 2007-09-18T07:33:06.000+0000

Affects version 1.0.1 (and prior).

Posted by Darby Felton (darby) on 2007-09-18T08:50:16.000+0000

Fixed @license tags in PHP files with SVN r6398.

Posted by Darby Felton (darby) on 2007-09-18T09:05:06.000+0000

Replaced references to old license location with current license location with SVN r6400.

Posted by Darby Felton (darby) on 2007-09-18T10:22:13.000+0000

Replaced references to LICENSE with current filename LICENSE.txt with SVN r6401.

Posted by Wil Sinclair (wil) on 2008-03-21T17:05:30.000+0000

This issue should have been fixed for the 1.5 release.

Posted by Wil Sinclair (wil) on 2008-04-18T13:12:04.000+0000

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Posted by Wil Sinclair (wil) on 2008-04-18T17:08:41.000+0000

Haven't you been working on this, Thomas? If so, please close when finished. If not, please feel free to unassign it from yourself.

Posted by Thomas Weidner (thomas) on 2008-05-07T06:16:38.000+0000

The file- and the classheader are checked within our new CodingStandard.

If it does not fit 100% a error will be thrown when checking for CS conformity. BUT: Actually more than 200.000 other errors are thrown and the testbed is not 100% finished.

Therefor I will hold this issue opened until the new CodingStandard has been accepted and is official.

Posted by Thomas Weidner (thomas) on 2008-05-24T03:21:11.000+0000

Docblocks have been updated.

Coding standard now checks and throws error if they are wrong.

Posted by Wil Sinclair (wil) on 2008-06-15T22:07:09.000+0000

Updating to comply with new IT component conventions.

Posted by Wil Sinclair (wil) on 2008-09-02T10:38:54.000+0000

Updating for the 1.6.0 release.

Posted by Bill Karwin (bkarwin) on 2009-07-03T08:52:40.000+0000

Reopening issue because there are still many discrepancies in the @copyright and @license headers. I will post some grep commands to find nonstandard or missing headers.

Posted by Thomas Weidner (thomas) on 2009-07-03T09:06:56.000+0000

Assigned to Bill as he reopened the issue and wants to work on it again.

Note: We will always have files which do not conform with their header. As long as we have no CI and this is not tested there is no way to have it 100% fixed as you would have to check after each commit or before each release.

Posted by Bill Karwin (bkarwin) on 2009-07-03T09:25:37.000+0000

Here is a command to find all @copyright headers, and count how many occur in each form:

<pre class="highlight">
egrep -r --include=\*.php -h '@copyright' library | sort | uniq -c | sort -nr | cat -v

Here is the result:

<pre class="highlight">
3033  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
 155  * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
  46  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc.
  39  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)^M
  15  * @copyright  Copyright (c) 22005-2009 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
  10  * @copyright  Copyright (C) 2008 - Present, Zend Technologies, Inc.
   8  * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   7  * @copyright  Copyright (c) 2009 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)^M
   7  * @copyright    Copyright (c) 2005-2009 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   4  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (<a href="http://www.zend.com/">http://www.zend.com/</a>)
   4  * @copyright  Copyright (c) 2005-2009 Zend Technologies Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   4  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   3  * @copyright  Copyright (c) 2005-2008, Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   2  * @copyright  Copyright (c) 2009 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   2  * @copyright  Copyright (c) 2008 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   1  * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   1  * @copyright  Copyright (c) 2009, Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
   1  * @copyright  Copyright (C) 2007 - Present, Zend Technologies, Inc.

Likewise, replacing @copyright with @license in the previous search finds these distinct forms of the @license header:

<pre class="highlight">
3124  * @license    <a href="http://framework.zend.com/license/new-bsd">http://framework.zend.com/license/new-bsd</a>     New BSD License
 156  * @license   <a href="http://framework.zend.com/license/new-bsd">http://framework.zend.com/license/new-bsd</a>     New BSD License
  46  * @license    <a href="http://framework.zend.com/license/new-bsd">http://framework.zend.com/license/new-bsd</a>     New BSD License^M
  16  * @license    New BSD {@link <a href="http://framework.zend.com/license/new-bsd">http://framework.zend.com/license/new-bsd</a>}

Here is a command to find all files missing a @copyright header:

<pre class="highlight">
egrep -r --include=\*.php -L '@copyright' library 

Here is the result (these same files are also missing the @license header):

<pre class="highlight">
library/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php
library/Zend/Tool/Framework/Client/Interactive/InputHandler.php
library/Zend/Tool/Framework/Client/Interactive/InputInterface.php
library/Zend/Tool/Framework/Client/Interactive/InputRequest.php
library/Zend/Tool/Framework/Client/Interactive/InputResponse.php
library/Zend/Tool/Framework/Client/Interactive/OutputInterface.php
library/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php
library/Zend/Tool/Framework/Manifest/Interface.php
library/Zend/Tool/Framework/Provider/DocblockManifestable.php
library/Zend/Tool/Framework/Provider/Interactable.php
library/Zend/Tool/Framework/Registry/Exception.php
library/Zend/Tool/Framework/Registry/Interface.php
library/Zend/Tool/Framework/System/Provider/Phpinfo.php
library/Zend/Tool/Framework/System/Provider/Version.php
library/Zend/Tool/Project/Context/Exception.php
library/Zend/Tool/Project/Context/Interface.php
library/Zend/Tool/Project/Context/Repository.php

This result is based on revision 16450, in the ZF trunk.

Posted by Bill Karwin (bkarwin) on 2009-07-07T09:37:05.000+0000

Fixed in revision 16541, which may have made it into the 1.8.4pl1 release.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts