PHPOffice / PhpSpreadsheet

A pure PHP library for reading and writing spreadsheet files
https://phpspreadsheet.readthedocs.io
MIT License
13.36k stars 3.47k forks source link

Change license from LGPL 2.1 to MIT ? #140

Closed PowerKiKi closed 5 years ago

PowerKiKi commented 7 years ago

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 https://github.com/PHPOffice/PHPWord/issues/211, but would your mind has changed in the last 3 years ?

maartenba commented 7 years ago

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 commented 7 years ago

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

maartenba commented 7 years ago

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

lanthaler commented 7 years ago

+1 for MIT

m8e commented 7 years ago

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

PowerKiKi commented 7 years ago

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 commented 7 years ago

Nice!

Croydon commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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

https://github.com/gtk-rs/gtk/issues/20

Croydon commented 7 years ago

@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

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 commented 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago

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

PowerKiKi commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

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

kamazee commented 7 years ago

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

Gemorroj commented 7 years ago

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

z38 commented 7 years ago

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

mingc00 commented 7 years ago

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

ddeboer commented 7 years ago

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

trvrnrth commented 7 years ago

Sure.

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

On 12 August 2017 at 17:59, David de Boer notifications@github.com wrote:

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

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PHPOffice/PhpSpreadsheet/issues/140#issuecomment-321992979, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWaEZz0o3Z0jnz_waYmpAi6wCnzGFQpks5sXdnqgaJpZM4M-jtD .

agopaul commented 7 years ago

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

cweiske commented 7 years ago

I do not agree with changing the license from LGPL 2.1 to MIT.

In PEAR we only have/had license that are fine to use in commercial environments, and LGPL was chosen when the author wanted to be sure that code changes had to be open sourced as well. With MIT, this is not required anymore - but I'd like to keep this.

The only "real" reason I find in this issue is getting rid of boilerplate header, which isn't such a big issue in my eyes.

titanrat commented 7 years ago

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

karak commented 7 years ago

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

ankitm123 commented 7 years ago

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

On 12 August 2017 at 21:43, karak notifications@github.com wrote:

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

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PHPOffice/PhpSpreadsheet/issues/140#issuecomment-322016371, or mute the thread https://github.com/notifications/unsubscribe-auth/AF8_-OB-jtRQQpFc6WrGNCMsb0xfUwEiks5sXlTegaJpZM4M-jtD .

dmelo commented 7 years ago

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

bolovincev commented 7 years ago

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

12.08.2017 18:42, Adrien Crivelli ΠΏΠΈΡˆΠ΅Ρ‚:

Hello everyone,

We would like to change PhpSpreadsheet (formerly PHPExcel) license from LGPL 2.1 to MIT https://choosealicense.com/licenses/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 the blue.

@agopaul https://github.com/agopaul @amironov https://github.com/amironov @ankitm123 https://github.com/ankitm123 @bolovincev https://github.com/bolovincev @c-schmitz https://github.com/c-schmitz @c960657 https://github.com/c960657 @c960657 https://github.com/c960657 @CloCkWeRX https://github.com/clockwerx @cocowool https://github.com/cocowool @cweiske https://github.com/cweiske @dbonsch https://github.com/dbonsch @ddeboer https://github.com/ddeboer @dmelo https://github.com/dmelo @frans-beech-it https://github.com/frans-beech-it @frost-nzcr4 https://github.com/frost-nzcr4 @Gemorroj https://github.com/gemorroj @helgi https://github.com/helgi @johndoejdg https://github.com/johndoejdg @k1LoW https://github.com/k1low @kamazee https://github.com/kamazee @karak https://github.com/karak @kea https://github.com/kea @Kurounin https://github.com/kurounin @mingc00 https://github.com/mingc00 @neclimdul https://github.com/neclimdul @nickypn https://github.com/nickypn @odbc https://github.com/odbc @Progi1984 https://github.com/progi1984 @Quix0r https://github.com/quix0r @roojs https://github.com/roojs @Slamdunk https://github.com/slamdunk @stevleibelt https://github.com/stevleibelt @techhead https://github.com/techhead @till https://github.com/till @titanrat https://github.com/titanrat @tomaszsita https://github.com/tomaszsita @trvrnrth https://github.com/trvrnrth @tsmsogn https://github.com/tsmsogn @tuupola https://github.com/tuupola @z38 https://github.com/z38

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PHPOffice/PhpSpreadsheet/issues/140#issuecomment-321988829, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSEdjs3BOlie4Bm3Ud7UAcRBDgbL4Cgks5sXcfygaJpZM4M-jtD.

Progi1984 commented 7 years ago

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

PowerKiKi commented 7 years ago

@cweiske, you are correct that this reflection started with an annoyance of license boilerplates. However boilerplate headers will be deleted regardless of the outcome of this discussion because LGPL 2.1 does not require them, but only suggest them (emphasis mine):

To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

But more importantly, LGPL is the source of a lot confusion when it comes to what is possible, as can be seen by a quick googling (here, here, here for a few).

Also, MIT happens to be, by far, the most used license in PHP ecosystem. I just extracted data from packagist on the 1500 most popular packages and the results are even more clear than what I was expecting:

License Count Percentage
MIT 930 62.00%
BSD 316 21.07%
Apache 74 4.93%
[[NOT FOUND]] 54 3.60%
LGPL 44 2.93%
GPL 39 2.60%
OSL-3.0 20 1.33%
WTFPL 5 0.33%
AGPL-3.0 2 0.13%
(Apache-2.0 or GPL-2.0) 2 0.13%
Facebook Platform 2 0.13%
All Rights Reserved 1 0.07%
Artistic-1.0 1 0.07%
CC-BY-3.0 1 0.07%
EPL-1.0 1 0.07%
ISC 1 0.07%
(MIT or GPL-3.0+) 1 0.07%
no usage restriction 1 0.07%
OFL-1.1 1 0.07%
Parse Platform License 1 0.07%
proprietary 1 0.07%
Public Domain 1 0.07%
unlicense 1 0.07%

b

I don't mean we should follow blindly what others do. But in practice I would prefer to have more users that use the lib with a complete peace of mind, and then maybe contribute back, rather than users wondering whether they can use it at all, or worse fear to contribute back because of the implication they think it might have on their proprietary product. While I totally agree with the ideas behind LGPL, I am not so sure of its effects in practice. I wouldn't be surprised if some users "hide" their usage of LGPL libs just to be sure to avoid possible consequences.

Also and more specific to you, I double check your contributions, and it appears we may have not needed to contact you after all. Your very first contribution to Spreadsheet_Excel_Writer on Mar 27, 2007 does not appear in the oldest, publicly available commit of PhpSpreadsheet (Aug 26, 2010). It seems very likely that Spreadsheet_Excel_Writer was integrated into PHPExcel before you started contributing. Especially when considering that PHPExcel first dated release is 2006-12-21. In fact I couldn't find any hints of your contributions in PhpSpreadsheet. So it seems that we actually won't require your permission for this change.

I'll keep your opinion in mind though, and we'll see what others say...

Finally, if any of you are interested to make their own stats, here are the raw data I used: 1500 most popular composer packages.zip

maartenba commented 7 years ago

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

techhead commented 7 years ago

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

On Aug 12, 2017 11:42 AM, "Adrien Crivelli" notifications@github.com wrote:

Hello everyone,

We would like to change PhpSpreadsheet (formerly PHPExcel) license from LGPL 2.1 to MIT https://choosealicense.com/licenses/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 the blue.

@agopaul https://github.com/agopaul @amironov https://github.com/amironov @ankitm123 https://github.com/ankitm123 @bolovincev https://github.com/bolovincev @c-schmitz https://github.com/c-schmitz @c960657 https://github.com/c960657 @c960657 https://github.com/c960657 @CloCkWeRX https://github.com/clockwerx @cocowool https://github.com/cocowool @cweiske https://github.com/cweiske @dbonsch https://github.com/dbonsch @ddeboer https://github.com/ddeboer @dmelo https://github.com/dmelo @frans-beech-it https://github.com/frans-beech-it @frost-nzcr4 https://github.com/frost-nzcr4 @Gemorroj https://github.com/gemorroj @helgi https://github.com/helgi @johndoejdg https://github.com/johndoejdg @k1LoW https://github.com/k1low @kamazee https://github.com/kamazee @karak https://github.com/karak @kea https://github.com/kea @Kurounin https://github.com/kurounin @mingc00 https://github.com/mingc00 @neclimdul https://github.com/neclimdul @nickypn https://github.com/nickypn @odbc https://github.com/odbc @Progi1984 https://github.com/progi1984 @Quix0r https://github.com/quix0r @roojs https://github.com/roojs @Slamdunk https://github.com/slamdunk @stevleibelt https://github.com/stevleibelt @techhead https://github.com/techhead @till https://github.com/till @titanrat https://github.com/titanrat @tomaszsita https://github.com/tomaszsita @trvrnrth https://github.com/trvrnrth @tsmsogn https://github.com/tsmsogn @tuupola https://github.com/tuupola @z38 https://github.com/z38

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PHPOffice/PhpSpreadsheet/issues/140#issuecomment-321988829, or mute the thread https://github.com/notifications/unsubscribe-auth/AAS_SFNdR4wZ82eERRTkOKtOXPBjgpxfks5sXcfwgaJpZM4M-jtD .

redchair123 commented 7 years ago

@PowerKiKi @Croydon just to clarify, unless a signed CLA released author copyright, you must get approval from all external committers for a shift like this. VLC went through a similar shift years ago, changing the core engine from GPLv2 to LGPLv2. Key points from the linked article:

VideoLAN does not require copyright assignment to the organization: instead the authors keep their copyright.

All the developers have agreed to the relicensing, but a famous one, who refused to answer. His code was therefore rewritten.

@PowerKiKi @MarkBaker A more interesting licensing issue regards the inclusion of other external code. The original PHPExcel embedded external code from unclear origins, and PHPSpreadsheet continues that tradition.

For example, take polynomialRegression: the original post for the code was on a domain phpmath.com which is currently down, but https://web.archive.org/web/20070224192417/http://www.phpmath.com:80/home?op=cat&cid=17 is the archived version. I cannot find any information in the archive regarding the licensing terms for that block of code. Based on a github search, it's highly likely that Paul Meagher is @php-math , so you may need his permission as well.

tomaszsita commented 7 years ago

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

-- Kind Regards Tomasz Sita

On 12 Aug 2017, at 18:27, z38 notifications@github.com wrote:

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

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Slamdunk commented 7 years ago

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

Il 12 ago 2017 5:42 PM, "Adrien Crivelli" notifications@github.com ha scritto:

Hello everyone,

We would like to change PhpSpreadsheet (formerly PHPExcel) license from LGPL 2.1 to MIT https://choosealicense.com/licenses/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 the blue.

@agopaul https://github.com/agopaul @amironov https://github.com/amironov @ankitm123 https://github.com/ankitm123 @bolovincev https://github.com/bolovincev @c-schmitz https://github.com/c-schmitz @c960657 https://github.com/c960657 @c960657 https://github.com/c960657 @CloCkWeRX https://github.com/clockwerx @cocowool https://github.com/cocowool @cweiske https://github.com/cweiske @dbonsch https://github.com/dbonsch @ddeboer https://github.com/ddeboer @dmelo https://github.com/dmelo @frans-beech-it https://github.com/frans-beech-it @frost-nzcr4 https://github.com/frost-nzcr4 @Gemorroj https://github.com/gemorroj @helgi https://github.com/helgi @johndoejdg https://github.com/johndoejdg @k1LoW https://github.com/k1low @kamazee https://github.com/kamazee @karak https://github.com/karak @kea https://github.com/kea @Kurounin https://github.com/kurounin @mingc00 https://github.com/mingc00 @neclimdul https://github.com/neclimdul @nickypn https://github.com/nickypn @odbc https://github.com/odbc @Progi1984 https://github.com/progi1984 @Quix0r https://github.com/quix0r @roojs https://github.com/roojs @Slamdunk https://github.com/slamdunk @stevleibelt https://github.com/stevleibelt @techhead https://github.com/techhead @till https://github.com/till @titanrat https://github.com/titanrat @tomaszsita https://github.com/tomaszsita @trvrnrth https://github.com/trvrnrth @tsmsogn https://github.com/tsmsogn @tuupola https://github.com/tuupola @z38 https://github.com/z38

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PHPOffice/PhpSpreadsheet/issues/140#issuecomment-321988829, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJSrKeSO9Q9O84XATIoLpUz2Y-g4t4cks5sXcfwgaJpZM4M-jtD .

Kurounin commented 7 years ago

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

amironov commented 7 years ago

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

PowerKiKi commented 7 years ago

@Niggler thank you for pointing this out. I just sent an email to @php-math.

Please let us know if we missed something else.

tuupola commented 7 years ago

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

redchair123 commented 7 years ago

@PowerKiKi I'm not entirely sure if PHPExcel was in compliance in the first place. This is probably the best time to get the license situation sorted out. @MarkBaker probably has the most familiarity with the origin of the code and should probably help with enumerating the third party codes.

The next example is BIFFwriter.php -- the comments suggest it was originally from @jmcnamara 's Spreadsheet::WriteExcel module. I could not find an obvious match for the github username of Xavier Noguer, but I found a commit mentioning a Xavier Noguer with email address [ REDACTED ] . It's probably better reach out to both people, especially since the original code was dual licensed under Perl Artistic License and GPL (not LGPL)

@m8e to be absolutely clear, the LGPL clause you referenced applies to a situation where your code can optionally link against the LGPL licensed code. It does not apply to vendoring dependencies (since those are shipped with your code) and it definitely does not apply to your actual code if you copied snippets from LGPL projects.