Issues

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

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

Changing fix version to unknown.

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

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"

  • 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

Affects version 1.0.1 (and prior).

Fixed {{@license}} tags in PHP files with SVN r6398.

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

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

This issue should have been fixed for the 1.5 release.

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

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

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.

Docblocks have been updated.

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

Updating to comply with new IT component conventions.

Updating for the 1.6.0 release.

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.

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.

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


egrep -r --include=\*.php -h '@copyright' library | sort | uniq -c | sort -nr | cat -v

Here is the result:


3033  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
 155  * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  46  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc.
  39  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)^M
  15  * @copyright  Copyright (c) 22005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  10  * @copyright  Copyright (C) 2008 - Present, Zend Technologies, Inc.
   8  * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
   7  * @copyright  Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)^M
   7  * @copyright    Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
   4  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com/)
   4  * @copyright  Copyright (c) 2005-2009 Zend Technologies Inc. (http://www.zend.com)
   4  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
   3  * @copyright  Copyright (c) 2005-2008, Zend Technologies USA Inc. (http://www.zend.com)
   2  * @copyright  Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
   2  * @copyright  Copyright (c) 2008 Zend Technologies USA Inc. (http://www.zend.com)
   1  * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
   1  * @copyright  Copyright (c) 2009, Zend Technologies USA Inc. (http://www.zend.com)
   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:


3124  * @license    http://framework.zend.com/license/new-bsd     New BSD License
 156  * @license   http://framework.zend.com/license/new-bsd     New BSD License
  46  * @license    http://framework.zend.com/license/new-bsd     New BSD License^M
  16  * @license    New BSD {@link http://framework.zend.com/license/new-bsd}

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


egrep -r --include=\*.php -L '@copyright' library 

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


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.

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