Skip to content
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

Change license from LGPL 2.1 to MIT ? #140

Closed
PowerKiKi opened this issue Apr 16, 2017 · 119 comments
Closed

Change license from LGPL 2.1 to MIT ? #140

PowerKiKi opened this issue Apr 16, 2017 · 119 comments
Milestone

Comments

@PowerKiKi
Copy link
Member

From what I understand, notably from a similar move from jQuery, it would technically be legal to change our license from LGPL to MIT. The reasons for such a move would to get rid of the boilerplate header in all files (which is not always consistent in our case), and make the end-user life easier by choosing a well-known, very permissive and broadly used license.

But I am not a lawyer, and I may be missing something. Is it really doable ? is there anything else to do than edit the files ? should we contact previous contributors ?

@MarkBaker, @maartenba as the two most prominent contributors, would you have any opinion on the matter ?

Also @Progi1984 what was the rationale for choosing LGPL 3 for PhpWord ? I see it was talked about in PHPOffice/PHPWord#211, but would your mind has changed in the last 3 years ?

@PowerKiKi PowerKiKi added this to the 1.0 milestone Apr 16, 2017
@maartenba
Copy link
Member

I for one am open to going for a more permissive license. Back when I started this thing ten years ago, LGPL was the license many chose, but since the world has changed a lot.

@PowerKiKi
Copy link
Member Author

Thanks for your input. Would you know anything about how we should do it ?

@maartenba
Copy link
Member

@MarkBaker @Progi1984 what do you think? Should we go to a different license?

@lanthaler
Copy link
Contributor

+1 for MIT

@m8e
Copy link

m8e commented Apr 17, 2017

+1 MIT, then I will be allowed to use PHPSpreadsheet at my daytime job :-)

@PowerKiKi
Copy link
Member Author

Mark confirmed via Twitter that he agreed to switch to MIT, so we can go ahead with this as soon as #147 is merged.

@maartenba
Copy link
Member

Nice!

@Croydon
Copy link

Croydon commented May 10, 2017

jQuery's situation was different since they already did dual-licensing under GPL and MIT and they simply dropped GPL for any further versions.

PhpSpreadsheet is not dual-licensed and you want to change the license in a not compatible way. More permissive licenses are after compatible with more restrictive licenses, but not the other way around.

You either need to ask every single contributor to relicense their contribution or you need to remove their contribution (replacing it with something new) or you can't change from GPL to MIT without violating the rights of the contributors.

You could start adding a checkbox to your pull request template asking new contributors to dual-license under LGPL and MIT, then starting to contact previous contributors and/or rewriting smaller contributions.

Once done you can drop LGPL and move to MIT.

@PowerKiKi
Copy link
Member Author

@Croydon do you have any source for that? Maybe specific extract of some license?

It sounds likely but I'd rather be as sure as possible before doing something either way. Also I am not sure whether getting a reply from every single contributors is actually possible :-/

@PowerKiKi
Copy link
Member Author

@maartenba (and @MarkBaker), I had a look for this license change and stumbled upon the BIFF writing part (now living in PhpOffice\PhpSpreadsheet\Writer\Xls) which was originally taken from Spreadsheet_Excel_Writer a long time ago. The files still have a header mentioning the original license which was LGPL 2.1.

I am unsure what to do with those. Should the original header be deleted, assuming the code was heavily modified by you when it was integrated ? Or should we keep it intact, meaning that the project would have a mix of MIT and LGPL files ?

For some minor, sporadic contributions from random contributor I may imagine making a leap of faith and changing the license "juste like that", but for this kind of case, where an important part of this project is concerned, I am much less sure on what to do.

Do you have any advice on the matter ? Maybe you had some kind of agreement way back when you integrated that project into PHPExcel ? Or would you have any contact with maintainer of back then ?

@PowerKiKi
Copy link
Member Author

There actually is a similar case for PhpOffice\PhpSpreadsheet\Shared\OLE things which licensed under the PHP license 2.02. Any opinion on what to do with that ?

@m8e
Copy link

m8e commented May 26, 2017

@PowerKiKi for the LGPL being included as a library license (for BIFF writing), it should NOT affect the MIT status of the overall project, iff nobody ever modify the LGPL code of the included library. Because quoting the LGPL:


"A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License."


Maybe same for PHP license?

@m8e
Copy link

m8e commented May 26, 2017

Also here is a project that moved forwards from LGPL to MIT and asked all the major contributors to publicly agree in the disussion thread they are happy to modify the license to MIT for the ongoing future versions

gtk-rs/gtk#20

@Croydon
Copy link

Croydon commented May 26, 2017

@Croydon do you have any source for that? Maybe specific extract of some license?

Source for what part exactly? You really need the agreement from everyone who has done more like fixing a typo. Why? Because fixing a typo hasn't created enough value to be protected by basically every single copyright law world wide. Creating new features are covered, therefore you need their permission to use their copyright protected work under new terms.

You could start a

  • checkbox list. ping everyone, start with the strongest contributors and ask if they agree putting their work under the term of the MIT license.

See how it is going, if most agree you can see which parts would need to be redone in order to fully switch to MIT.

@maartenba
Copy link
Member

@PowerKiKi not sure what the decision was on that one, I think we had a good day back then and just integrated it into the library.

@PowerKiKi
Copy link
Member Author

PowerKiKi commented May 27, 2017

@m8e, I either don't understand what you quoted, or it does does not apply to our case. Because PhpSpreadsheet copy-pasted (7+ years ago) Spreadsheet_Excel_Writer and then significantly modified it over the years. So I believe it created a "derivative" and as such the license should be applied.

@Croydon I assume you are right, but I guess I was trying to avoid contacting every contributors by asking you for a source that clearly states that a contributor only make a contribution under a specific license (LGPL in this case). As opposed to "donate" his contributions to the project regardless of current or future licenses.

I suppose the only thing left to do is to actually make a list and start contacting people...

@Indigo744
Copy link

@PowerKiKi if I may offer my help for listing/contacting all contributors? I am really interested in PhpSpreadsheet going from LGPL to MIT.

@PowerKiKi
Copy link
Member Author

PowerKiKi commented May 30, 2017

@Indigo744, that would be very much appreciated. We should start by listing all contributors to PhpSpreadsheet, Spreadsheet_Excel_Writer (at least until it was integrated into PHPExcel) and also OLE. I suppose we should collect their emails and/or their GitHub handles. And possibly also their "contribution importance" (as commits counts, or total lines modified). Maybe keep the list semi-private if it contains emails ?

@Indigo744
Copy link

I created the following Gists:

To get contributors for Github repos, I made a small Python script using the Github API (https://gist.github.com/Indigo744/1205db711dd9e12d2972b09715c6ca35)

The be considered as a "meaningful" contributor, I set the minimum addition to 10 lines (so we don't have to contact all contributors who just have fixed a typo). I don't know if it's enough / not enough?

@PowerKiKi
Copy link
Member Author

I consolidate the list into a single one and removed most duplicates, over there: https://docs.google.com/spreadsheets/d/1HTKVdAc2e9lqWJf78GfgQE7WqhFQO99JwpZRvCRTPrc.

Now we need to send a notification to all of those people...

@PowerKiKi
Copy link
Member Author

PowerKiKi commented Jun 30, 2017

Oh, one thing I'd like to do before sending message would be to keep only the contributors of Spreadsheet_Excel_Writer and OLE package at the time it was merged into PHPExcel. Since it does not seem to be necessary to ask permission to contributors that only contributed to those projects after the merge.

If anyone is able to dig into that, that would be nice...

@korvinko
Copy link

korvinko commented Jul 5, 2017

I just fixed small bug but would like to approve that agree to migrate, because I found myself in list of contributors. Should I do something else to confirm that?

@PowerKiKi
Copy link
Member Author

PowerKiKi commented Jul 6, 2017

@johndoejdg, yes we will need an agreement from everybody in that list. I still didn't get to write to those people, but we will have to...

@PowerKiKi
Copy link
Member Author

PowerKiKi commented Aug 12, 2017

Hello everyone,

We would like to change PhpSpreadsheet (formerly PHPExcel) license from LGPL 2.1 to MIT. So it would be more permissive and allow usage of the library in more contexts. This would ideally allow the community to grow further and hopefully see more contributions from more people.

Because you contributed to PhpSpreadsheet (or most likely PHPExcel back then), we would need your permission to change the license. All you have to do is reply here with the text: "I agree with re-licensing my contribution(s) under an MIT license.".

Thanks in advance, and sorry for pinging you out of the blue.

@agopaul @amironov @ankitm123 @bolovincev @c-schmitz @c960657 @c960657 @CloCkWeRX @cocowool @cweiske @dbonsch @ddeboer @dmelo @frans-beech-it @frost-nzcr4 @Gemorroj @helgi @johndoejdg @k1LoW @kamazee @karak @kea @Kurounin @mingc00 @neclimdul @nickypn @odbc @Progi1984 @Quix0r @roojs @Slamdunk @stevleibelt @techhead @till @titanrat @tomaszsita @trvrnrth @tsmsogn @tuupola @z38

@c960657
Copy link

c960657 commented Aug 12, 2017

👍 I agree with re-licensing my contribution(s) under an MIT license.

@kamazee
Copy link
Contributor

kamazee commented Aug 12, 2017

Even though my contribution was almost negligible,
I agree with re-licensing my contribution(s) under an MIT license.

@Gemorroj
Copy link
Contributor

I agree with re-licensing my contribution(s) under an MIT license. 🤓

@z38
Copy link
Contributor

z38 commented Aug 12, 2017

I agree with re-licensing my contribution(s) under an MIT license.

@ttoine
Copy link

ttoine commented Aug 29, 2019

OK so I checked the entire list of people who told that they accept the change for MIT:
agopaul, amironov, ankitm123, bolovincev, c-schmitz, c960657, dmelo, ewbi, frans-beech-it, frost-nzcr4, Gemorroj, helgi, jmcnamara, johndoejdg, kamazee, karak, kea, kifni41, korvinko, Kurounin, maartenba, mingc00, neclimdul, odbc, Progi1984, Slamdunk, stevleibelt, techhead, till, titanrat, tomaszsita, trvrnrth, tsmsogn, tuupola, z38, xnoger, cocowool, dbonsch, k1LoW, nickypn, cweiske, roojs

I removed the @ in order that they are not pinged again. Some of them are listed also for they added a license to some external code (blog post, ...)

People without answer or no clear answer:

So the big challenge is to identify the part of the code written by those people in the current version, or in the latest tag. And then, estimate the time needed to replace it.
Some of that work has been done in this comment
But maybe that could be worth a new check, the last one is quite old now.

update: remove from the no answer list when a new author tells he agrees to the change.

@PowerKiKi
Copy link
Member Author

till just agreed to MIT. I added him in the list.

@ttoine, I'll give you write access to the list if you ask for it

@ttoine
Copy link

ttoine commented Aug 30, 2019

@PowerKiKi from what I can see in the spreadsheet most of guys without answers don't that much contributions.
Maybe this could be possible to create one issue per missing github account with the list of things to rewrite, so the work can start ?

@till
Copy link

till commented Aug 30, 2019

TBH, I don't remember what my contributions were. I don't see myself in Contributors

@korvinko
Copy link

  • @johndoejdg

I confirmed changing a long time ago. #140 (comment)

Please drop me from this list.

@ttoine
Copy link

ttoine commented Aug 30, 2019

thanks !
are you johndoejdg?

@korvinko
Copy link

thanks !
are you johndoejdg?

Yes

@ttoine
Copy link

ttoine commented Sep 2, 2019

Thanks for confirmation. I have updated the list.

@Progi1984
Copy link
Member

@ttoine May be contact any missing person with an email ?

@ttoine
Copy link

ttoine commented Sep 2, 2019

It will not work if they didn't answer with the last ping.
My guess is that it's time to find if there is still in the current code something they wrote, and rewrite it. Hopefully, it can be done quickly if this is just small parts or a few lines.

@karak
Copy link
Contributor

karak commented Sep 4, 2019

I agree if I didn't confirm.

@ttoine
Copy link

ttoine commented Sep 4, 2019

thanks for your message. I updated the list in my previous comment.

@odbc
Copy link
Contributor

odbc commented Sep 6, 2019

I agree with re-licensing my contribution(s) under an MIT license.

@Progi1984 Progi1984 reopened this Sep 6, 2019
@neclimdul
Copy link
Contributor

IANAL either but I know I can't grab somebody's code and "rewrite it" and put my own license on it. The descriptions of say my change "Moves two } characters, adds a = character" is technically correct but that fixed a real bug and I spent several hours stepping through the code and coming up with and documenting the problem. That's real non-trivial development no one else did and provided by me under the license at the time.

The same I'm sure applies to the other contributions or the code wouldn't have been accepted so I would not trivialize the need to get those developers sign-off.

Now I don't really care what license my code is under. Use MIT if you must. Its not the decision I would make but it's not my project so I guess I agree.

@PowerKiKi
Copy link
Member Author

@neclimdul thank you for reconsidering your decision.

I agree that a copyleft license is better in theory, but in practice in this specific case we barely have the resource to maintain the code. We would never be able to enforce a copyleft license, so we might as well formally give more freedom (and peace of mind).

@stevleibelt
Copy link

I agree with the licence changes.

@ttoine
Copy link

ttoine commented Sep 17, 2019

@Progi1984 thank you for reopening.
Can a developer establish the list of code to rewrite in order to change the license? (I am not skilled for that myself). The list of authors to check is up to date in this comment
Then, I volunteer to open issues for that.

@PowerKiKi
Copy link
Member Author

I cannot find where @Quix0r said he refused anymore, instead he most recently was helping to move to MIT. I take that as an implicit agreement.

Also as explained in that comment, @cweiske contributions to Spreadsheet_Excel_Writer were never integrated into PhpSpreadsheet. So I removed him from the list entirely.

Similar situation for @CloCkWeRX who contributed to Spreadsheet_Excel_Writer between 2010-2015 but PHPExcel first release was 2006-12-21, pre-dating any of his contributions.

By @roojs own admission, he would prefer not to change, but agree to change to MIT.

The very few people left mostly have very small contributions. MIT license seems likely after all...

@ttoine
Copy link

ttoine commented Sep 19, 2019

That's good news!
So only cocowool, dbonsch, k1LoW, nickypn contributions are to be rewritten.

Can someone manage to identify the code they wrote that is still in the current development version ?

@Progi1984
Copy link
Member

@ttoine @PowerKiKi Done ! Thanks StackOverflow !

The problem is that they have used their nickname as commit author.

[me@here PhpSpreadsheet]$ for file in $(git ls-files); do git blame $file | grep "cocowool"; done
fatal: no such path 'samples/Basic/data/continents/North' in HEAD
fatal: no such path 'America.txt' in HEAD
fatal: no such path 'samples/Basic/data/continents/South' in HEAD
fatal: no such path 'America.txt' in HEAD
fatal: no such path 'src/PhpSpreadsheet/Chart/Renderer/PHP' in HEAD
fatal: no such path 'Charting' in HEAD
fatal: no such path 'Libraries.txt' in HEAD
[me@here PhpSpreadsheet]$ for file in $(git ls-files); do git blame $file | grep "dbonsch"; done
bd9eb1959 (Adrien Crivelli 2017-04-14 17:38:40 +0900  151) - Restructuring of PHPExcel Exceptions - @dbonsch
fatal: no such path 'samples/Basic/data/continents/North' in HEAD
fatal: no such path 'America.txt' in HEAD
fatal: no such path 'samples/Basic/data/continents/South' in HEAD
fatal: no such path 'America.txt' in HEAD
fatal: no such path 'src/PhpSpreadsheet/Chart/Renderer/PHP' in HEAD
fatal: no such path 'Charting' in HEAD
fatal: no such path 'Libraries.txt' in HEAD
[me@here PhpSpreadsheet]$ for file in $(git ls-files); do git blame $file | grep "k1LoW"; done
bd9eb1959 (Adrien Crivelli 2017-04-14 17:38:40 +0900  166) - Support SheetView `view` attribute (Excel2007) - @k1LoW
fatal: no such path 'samples/Basic/data/continents/North' in HEAD
fatal: no such path 'America.txt' in HEAD
fatal: no such path 'samples/Basic/data/continents/South' in HEAD
fatal: no such path 'America.txt' in HEAD
fatal: no such path 'src/PhpSpreadsheet/Chart/Renderer/PHP' in HEAD
fatal: no such path 'Charting' in HEAD
fatal: no such path 'Libraries.txt' in HEAD
d24e64080 Classes/PHPExcel/Worksheet/SheetView.php   (k1LoW            2012-08-09 10:13:05 +0900  46) 
[me@here PhpSpreadsheet]$ for file in $(git ls-files); do git blame $file | grep "nickypn"; done
fatal: no such path 'samples/Basic/data/continents/North' in HEAD
fatal: no such path 'America.txt' in HEAD
fatal: no such path 'samples/Basic/data/continents/South' in HEAD
fatal: no such path 'America.txt' in HEAD
fatal: no such path 'src/PhpSpreadsheet/Chart/Renderer/PHP' in HEAD
fatal: no such path 'Charting' in HEAD
fatal: no such path 'Libraries.txt' in HEAD

@SheetJSDev
Copy link
Contributor

Has anyone looked at the actual contributions?

The @cocowool contribution was 8c58385 . The non-test part is the following line in src/PhpSpreadsheet/Style/NumberFormat.php:

-        $format = preg_replace('/^(\[\$[A-Z]*-[0-9A-F]*\])/i', '', $format);
+        // strip off chinese part like [DBNum1][$-804]
+        $format = preg_replace('/^(\[[0-9A-Za-z]*\])*(\[\$[A-Z]*-[0-9A-F]*\])/i', '', $format);

There are two issues:

  1. "Language tags" can be specified, but neither the old nor new regexes match them. As an example, using Chinese, =TEXT(12345,"[$-zh-CN]dddd") is 星期三 and that string is definitely not matched in the provided regular expression. The full list of valid entries is in [MS-LCID] Appendix A (they use the phrase "Language Tag" to refer to the locale strings)

  2. the code will strip absolute hours and minutes (the code change actually introduced this bug). The number format [hh] corresponds to the absolute hours of a date code, which the regex currently matches and removes. However, that contributes to the value as seen in =TEXT(1,"[hh][$-zh-CN]dddd") which is 24星期日. Not a PHP expert but it seems like @cocowool 's change would actually strip out the absolute hours.

At the very least, point (2) is enough to merit reverting the contribution entirely. More broadly, the entire regex has to be rewritten.

PS @Progi1984 the -e flag to git blame displays the email address rather than the author, making it easier to find the affected lines

$ for file in $(git ls-files); do git blame -e $file | grep cocowool; done 2>/dev/null

(it still undercounts the contributions since others may have edited lines afterwards)

@PowerKiKi
Copy link
Member Author

I believe we made a honest effort to contact as many contributors as possible. Everybody who responded agreed.

I think it's fair to say that we gave ample time for people who disagree to speak up. Since nobody did, it's time to take a leap of faith.

@nickypn
Copy link
Contributor

nickypn commented Nov 21, 2019

I agree with the licence changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests