XaminProject / handlebars.php

Handlebars processor for php
331 stars 132 forks source link

The MIT license only has *one* condition… #57

Closed bobthecow closed 10 years ago

bobthecow commented 10 years ago

And somehow you managed to violate it.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Not cool, guys.

everplays commented 10 years ago

Talking about mustache.php? You're right, but mentioning that handlebars.php is based on mustache.php isn't enough? It's mentioned in every single file that is derived from mustache. I can assure you that it was a honest mistake and if mentioning the parent project isn't enough, we'll add the copyright notices back. On Mar 13, 2014 10:10 AM, "Justin Hileman" notifications@github.com wrote:

And somehow you managed to violate it.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Not cool, guys.

— Reply to this email directly or view it on GitHubhttps://github.com/XaminProject/handlebars.php/issues/57 .

bobthecow commented 10 years ago

I understand it was a mistake.

The point of the MIT license (and most open source licenses) is that the copyright holder licenses you to use it, under the MIT license. All you have to do is keep the MIT license and the copyright notice. You can't reassign the copyright to yourself, or to your own project. That's not now copyright works :)

everplays commented 10 years ago

:) thanks for pointing that out. I appreciate it. I'll fix it this weekend. On Mar 13, 2014 10:19 AM, "Justin Hileman" notifications@github.com wrote:

I understand it was a mistake.

The point of the MIT license (and most open source licenses) is that the copyright holder licenses you to use it, under the MIT license. All you have to do is keep the MIT license and the copyright notice. You can't reassign the copyright to yourself, or to your own project. That's not now copyright works :)

— Reply to this email directly or view it on GitHubhttps://github.com/XaminProject/handlebars.php/issues/57#issuecomment-37504723 .

bobthecow commented 10 years ago

Thank you :)

bobthecow commented 10 years ago

I actually wasn't sure of the best way to indicate multiple copyright holders using the MIT-license and copyright file header notice, so I looked into it, and I think it is probably best to restore the original notice, then add your copyright(s) below the original copyright for any file that has been substantially modified:

/*
 * This file is part of Handlebars.php.
 * 
 * Based on Mustache.php: https://github.com/bobthecow/mustache.php
 *
 * (c) 2010-2012 Justin Hileman
 * (c) 2012 ParsPooyesh Co
 * (c) 2013 Behrooz Shabani
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

Then restore the MIT LICENSE file, and include your copyright(s) there as well:

The MIT License (MIT)

Copyright (c) 2010 Justin Hileman
Copyright (c) 2012 ParsPooyesh Co
Copyright (c) 2013 Behrooz Shabani

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.

I've seen several other projects with similar copyright notices, and I found a couple of stackoverflow answers which indicate that this is the way to go.

everplays commented 10 years ago

As promised. Please review the changeset and lemme know, if something is missing.

I made the changes with the followin ruby script:

Dir.glob('./handlebars.php/src/**/*.php').each do |handlebars|
  mustache = handlebars + ""
  mustache = mustache.sub! 'handlebars.php', 'mustache.php'
  mustache = mustache.sub! "Handlebars", "Mustache"
  if File.exists? mustache
    puts "sed -i -s \"s/ * @copyright 2012 (c) ParsPooyesh Co/ @copyright 2010-2012 (c) Justin Hileman\\n * @copyright 2012 (c) ParsPooyesh Co/\" #{handlebars}"
  end 
end

then ran it like this ruby fix.rb | bash. So every file that has identical Mustache.php implementation should have your name.

bobthecow commented 10 years ago

I believe Cache.php is not based on Mustache, but Handlebars.php is (it was renamed from Engine.php). Other than that, :+1:

Thanks for taking care of this!