Skip to content

Simplified page level docblock #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 27, 2014

Conversation

ivanlanin
Copy link
Contributor

I think the current page level docblock is too long. I've look at some other projects to see how they implement this part. I propose a simplified docblock as follow:

/**
 * PHPWord
 *
 * PHP version 5.3
 *
 * @copyright   2014 PHPWord
 * @license     http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
 * @version     0.9.0
 */

If agreed, I'll make the changes.

@Progi1984 Progi1984 added this to the 0.9.1 milestone Mar 26, 2014
@Progi1984 Progi1984 added the QA label Mar 26, 2014
@gabrielbull
Copy link
Member

Do we even need it? The license is included with the project.

@ivanlanin
Copy link
Contributor Author

I think we stil need a short note about the license, either as link or something like "see LICENSE.md".

@Progi1984
Copy link
Member

I agree with @ivanlanin. That will reduce the size of files and the package, and that will simplify the reading of files.

@gabrielbull
Copy link
Member

Maybe we can remove the version at least? So we don't have to update EVERY file for EVERY release?

@Progi1984
Copy link
Member

We must simplify the header :

/**
 * @copyright   2014 PHPWord
 * @license     http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
 */

@ivanlanin
Copy link
Contributor Author

phpdoc needs a summary line. I also think that we should "advertise" ourself. How about this:

/**
 * PHPWord
 *
 * @link        https://github.com/PHPOffice/PHPWord
 * @copyright   2014 PHPWord
 * @license     http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
 */

@Progi1984
Copy link
Member

I agree with this one...
What do you think about it, @gabrielbull ?

@gabrielbull
Copy link
Member

It's fine by me.

@ivanlanin ivanlanin self-assigned this Mar 27, 2014
@ivanlanin
Copy link
Contributor Author

Ok. Thanks. I'll make the changes.

ivanlanin added a commit that referenced this pull request Mar 27, 2014
@ivanlanin ivanlanin merged commit 10df072 into PHPOffice:develop Mar 27, 2014
@ivanlanin ivanlanin deleted the simplified-docblock branch March 27, 2014 17:21
@ghost
Copy link

ghost commented May 4, 2014

It seems that we have to include copyright notice in each source file. Please, find the details here.

@ivanlanin
Copy link
Contributor Author

I've just read the page that you pointed. You're right. The page said:

"... the process involves adding two elements to each source file of your program: a copyright notice ..., and a statement of copying permission ..."

I looked at some popular FOSS and I found that most of the FOSS that use short header are using MIT license. I also found that they put individual names instead of team name.

@ghost
Copy link

ghost commented May 4, 2014

Moreover, we need to use date range instead of 2014, because the project wasn't born this year.

@ivanlanin
Copy link
Contributor Author

I've consulted my friend, an IPR consultant, and here's the simplest form that we're proposing:

/**
 * This file is part of PHPWord - A pure PHP library for reading and writing
 * word processing documents.
 *
 * PHPWord is free software distributed under the terms of the GNU Lesser
 * General Public License as published by the Free Software Foundation.
 * For the full copyright and license information, please read the LICENSE
 * file that was distributed with this source code.  For the full list of
 * contributors, visit https://github.com/PHPOffice/PHPWord/contributors
 *
 * @copyright   2010-2014 PHPWord contributors
 * @license     http://www.gnu.org/licenses/lgpl.txt LGPL version 3
 * @link        https://github.com/PHPOffice/PHPWord
 */

That form complies with FSF requirements.

Update: I've updated the recommendation to reflect the role of our contributors.

@ghost
Copy link

ghost commented May 5, 2014

OK. Thanks to you and to your friend. Let's stick with this one.

/**
 * This file is part of PHPWord - A pure PHP library for reading and writing
 * word processing documents.
 *
 * PHPWord is free software distributed under the terms of the GNU Lesser
 * General Public License version 3 as published by the Free Software Foundation.
 *
 * For the full copyright and license information, please read the LICENSE
 * file that was distributed with this source code. For the full list of
 * contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
 *
 * @copyright   2010-2014 PHPWord contributors
 * @license     http://www.gnu.org/licenses/lgpl.txt LGPL version 3
 * @link        https://github.com/PHPOffice/PHPWord
 */

I added the exact version of the license and made some minor corrections.

@ivanlanin
Copy link
Contributor Author

I agree. This format looks better. I think @Progi1984 and @gabrielbull will agree. What do you think, guys?

@Progi1984
Copy link
Member

Euh... Can I just answer : "Perfect" ?

@ivanlanin
Copy link
Contributor Author

Yes you can :) Can you implement the changes, @RomanSyroeshko? I'm using Windows and I haven't found a good tool to do bulk block changes easily. Thanks before.

@ghost
Copy link

ghost commented May 5, 2014

@ivanlanin, I'm on Windows too, but I'll do it later. :)

@ivanlanin
Copy link
Contributor Author

Ah, I see. Thanks. I can do bulk line changes easily but can't do that for block changes like this one. Do you have any tools for that?

@ghost
Copy link

ghost commented May 5, 2014

Nope.

@ivanlanin
Copy link
Contributor Author

Whew. 200+ manual block changes will be quite tiring :)

@ghost
Copy link

ghost commented May 5, 2014

My fingers are extremely fast. :)

@ivanlanin
Copy link
Contributor Author

We're counting on them :) Thanks.

ghost pushed a commit that referenced this pull request May 5, 2014
ghost pushed a commit that referenced this pull request May 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants