1

Let's say I'm working on a PHP application and I want to integrate some PHP packages like TWIG. Using Composer or some other automated management or code assisting technologies is irrelevant here. All included packages will have the MIT license, plus a couple of packages with the LGPL license.

Let's assume I'm gonna have my own folder structure for allocating third-party packages. For this example, it will be /libraries.

A regular installation of TWIG looks like this:

/doc
/lib
/src
/test
.editorconfig
.gitignore
.php_cs.dist
.travis.yml
CHANGELOG
LICENSE
README.rst
composer.json
phpunit.xml.dist

What I would like to do is to have the src folder contents allocated in /libraries/twig or even /libraries/twig/twig (if I want to mimic the package naming convention onto the folder structure, so I could integrate the TWIG extensions package into something like /libraries/twig/extensions and so on...).

But I don't know if I must retain ALL files and folders (like Composer does when you add twig/twig as a dependency) or just the bare minimum (maybe the bare minimum plus the LICENSE file). I'm not going to modify any of the source files, just use them.

Is this possible or does this conflicts with the licensing terms for the package?

2
  • 5
    Both MIT and LGPL allow you to modify the source code before you redistribute it. If I made that change I would say I "modified the directory layout" of TWIG to suit my project. I'm not sure whether the physical layout really counts as part of the copyrighted work, but even if it does, you are already allowed to change it.
    – Brandin
    Commented Nov 13, 2017 at 10:49
  • @Brandin you should post this as an answer! Commented Nov 13, 2017 at 14:47

1 Answer 1

2

Both MIT and the (Lesser) General Public License explicitly allow modifying the software. So if you want to remove files, rename or rearrange them, you are allowed to do this. Treat your changes the same as any other modification.

I'm not going to modify any of the source files, just use them.

A modification means reproducing something other than an exact copy. This means renaming, removing, or changing the directory structure of the project is a modification, since the result is no longer an exact copy. From the General Public License:

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy.

https://www.gnu.org/licenses/gpl-3.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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