i would like to use some classes that are into lib/Varien
, my idea is to copy the classes into my project and put my classes to inherit from Varien's, actually i can do it, just using Ctrl-C and Ctrl-V. lol, what i really mean is if i do it, am i violating the copyright, law or maybe some license agreement of Magento?

- 18,519
- 10
- 84
- 137

- 7,623
- 13
- 63
- 97
-
4I'm voting to close this question as off-topic because it is about licensing or legal issues, not programming or software development. [See here](http://meta.stackoverflow.com/questions/274963/questions-about-licensing/274964#274964) and [here](http://meta.stackexchange.com/questions/139804/can-licensing-questions-ever-be-on-topic) for details, and the [help] for more. – JasonMArcher Jun 10 '15 at 17:13
3 Answers
Assuming you're talking about the Community Edition, all Magento code is released under the "Open Software License". This means you're free to use the code, so long as you give a full copy of your source code to whomever you distribute your application to, and accept that this copy of your source code is now licensed under the Open Software License as well.
That's the simple version. Open source licenses that put non-monetary restrictions on code re-use exists in a weird legal state, as most business related court cases are usually about, and settled on, money. OSL has a bunch of additional provisions which cloud how things can be distributed, so if you were doing this for a commercial project you should talk to a lawyer.

- 164,128
- 91
- 395
- 599
-
1Note the emphasis here is that any software you release that includes Magento's PHP code **MUST** be licensed OSL itself. – Jonathan Day Mar 08 '11 at 07:54
@Alan's answer is entirely correct with regard to Magento's PHP code in app/code
and lib/Varien
, however the theme files in app/design
, js/mage
and skin
are released under Apache Free License, which (as I understand it) allows you to distribute that code under whichever license you wish (including closed or proprietary licenses), requiring only attribution.
The official Magento statement is here, and Roy Rubin from Magento posted re this topic on the Magento boards.
As per @Joseph's disclaimer, I am not a lawyer and would recommend that you consult a lawyer. Do have a read of the wikipedia article on AFL if you wish. For reference, the OSL wikipedia article as well.
I recognize that this question specifically asked about Magento's classes, I'm merely adding the AFL status for completeness and future visitors' information.

- 18,519
- 10
- 84
- 137
EDIT: read Alan's post below. He is correct. While a profit-seeking venture should still consult a lawyer for any such project, there doesn't appear to be any issue with using the code for a personal project.
This isn't a programming question (rather, it is a legal question), but at least for the moment, let me say that those files are copyright of Magento Inc, and they reserve that copyright for those files. You do not have a legal right to copy those files into another project for you own use.
If you do copy them into your project, never try to sell it. Having taken their code, your code will have become a liability to any potential acquiring company.
Of course, I am not a lawyer, so if this is a big issue, feel free to contact one for more detailed information.

- 26,809
- 13
- 80
- 104
-
Joseph, Magento asserts copyright over those files, but does so under the OSL open source license, which means you're free to use them without paying a licensing fee. Magento asserts their copyright by saying you may use them, and using them comes with certain obligations. Anyone has a legal right to use those files in a project, that's open source. The need for a lawyer comes in because other lawyers could use the non-monetary restrictions/provisions to compel your business (through legal pressure) to do certain things with the source code of your application. – Alana Storm Mar 07 '11 at 22:37
-
On reflection, you are absolutely correct, Alan. Leaving this up for historical reasons, but editing to reflect. – Joe Mastey Mar 07 '11 at 23:45