If you use a library with LGPL 2.1 license (e.g., PHPMailer) in your also open source library, can you release your library as MIT license if you didn't actually modify PHPMailer?

E.g., All you did is use and extend PHPMailer as a dependency but its original code was not modified (E.g., class MyLib extends PHPMailer {})

My clarification is on this line on the LGPL 2.1 license:

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.

In the use case I described, is it considered "work that uses the Library" and is therefore okay to be released as MIT?

  • Down-voter: what's wrong with this? – IMB Feb 4 at 4:53
  • 1
    your question is fine; it seems like someone went through the front page and downvoted everything. Oh, well. – amon Feb 4 at 10:45

Note: I'm not a license expert. The following answer is based on general knowledge of the GPL and LGPL and the LGPL text as found here.

The section of the license provided in the question refers to works that don't contain derivatives of the LGPL library. For example, if I made a sorting library and you made an application for creating lists by reading file contents, your application could be designed to work with my library (create lists such that they are compatible with my sorting library). I believe, in this case, the given section would apply, as you don't have to make any alterations to my library or write any code that derives from it. Your application only needs to be linked to my library.

As specified in Section 0 of the LGPL (emphasis mine):

An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.

A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”.

Thus your library, by extending PHPMailer, is an Application that uses the library.

In Section 4, we see that you are allowed to share your library under any terms, as long as they do not restrict downstream users from using the original library under the terms of the LGPL.

You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work [...]

In other words, your library can be available under whatever terms you like, as long as the LGPL library is still available under the same terms determined by its original author.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.