Involic Posted June 28, 2022 Share Posted June 28, 2022 (edited) Hey people, today during review of our addons marketplace module version we was asked to change license of our module source code to one of Open Source licenses. So we must select AFL, EUPL, BSD, MIT, ISC and Apache V2 According to all this licenses any of users obtained copy of our code will be fully allowed to: - publish it on github - Sell it with separate name on Addons marketplace (removing all trademarks) in some cases. But at least in many prestashop stores as much as they would like. What we are missing there? What license you should select for your addons modules? Quote from TOC: Quote Sellers also bear sole responsibility for the development of Addons and in particular their upgrade in line with different versions of the Solution in accordance with the provisions of Article 5.8. The Seller shall be informed that any obfuscation of the source code of its Addons is prohibited. The Seller must choose an open source software license for the distribution of its Modules on PrestaShop Addons, their use by the Customers and the compatibility with the PrestaShop open source software. Edited June 28, 2022 by Involic (see edit history) Link to comment Share on other sites More sharing options...
Matt75 Posted June 28, 2022 Share Posted June 28, 2022 Your module will use some classes (Module, Tools, Context, ObjectModel etc...) from PrestaShop Core that's is under OSL licence so you have to be compliant with OSL. It means you have to use a compliant open source licence with OSL likes AFL, EUPL, BSD, MIT, ISC or Apache V2. Generally modules are under AFL for example. If you have some piece of code using another licence, likes a commercial licence, this code has to be isolated from all pieces of code under an open source licence. Code under commercial licence must be on a separate folder, with a proper namespace, licence header on each file, LICENSE text file at root of this folder. You can use an hexagonal architecture thanks to ports and adapters to isolate this code from others pieces of code under open source licence, it means you cannot have a direct dependancy to a class under open source licence and must pass through a Port or Adapter. 1 Link to comment Share on other sites More sharing options...
Involic Posted June 28, 2022 Author Share Posted June 28, 2022 (edited) 4 minutes ago, Matt75 said: Your module will use some classes (Module, Tools, Context, ObjectModel etc...) from PrestaShop Core that's is under OSL licence so you have to be compliant with OSL. It means you have to use a compliant open source licence with OSL likes AFL, EUPL, BSD, MIT, ISC or Apache V2. Generally modules are under AFL for example. If you have some piece of code using another licence, likes a commercial licence, this code has to be isolated from all pieces of code under an open source licence. Code under commercial licence must be on a separate folder, with a proper namespace, licence header on each file, LICENSE text file at root of this folder. You can use an hexagonal architecture thanks to ports and adapters to isolate this code from others pieces of code under open source licence, it means you cannot have a direct dependancy to a class under open source licence and must pass through a Port or Adapter. Awesome! Thanks for response. This clearly explainable requirements. Can you please teach your support team and developers doing technical review also to reply like this? Or maybe you can publish something like this inside PrestaShop development blog. Edited June 28, 2022 by Involic (see edit history) Link to comment Share on other sites More sharing options...
Matt75 Posted June 28, 2022 Share Posted June 28, 2022 To be clear here an example (non exhaustive) of what is allowed. For a module named MyModule, this situation is allowed : mymodule/mymodule.php extends Module class or another class based on Module from PrestaShop Core (PaymentModule, CarrierModule, etc...) mymodule/classes/MyObjectModel.php extends ObjectModel class from PrestaShop Core mymodule/controllers/front/myfrontcontroller.php extends ModuleFrontController class from PrestaShop Core mymodule/controllers/admin/MyModuleAdminController.php extends ModuleAdminController class from PrestaShop Core mymodule/src/Adapters/MyLibAdapter.php implements MyInterface class but use dependancies from PrestaShop Core (Context, Tools, ObjectModel...) => this files must be under a compliant licence with OSL likes AFL, EUPL, BSD, MIT, ISC or Apache V2. mymodule/lib/myinterface.php interface without open source dependencies mymodule/lib/MyClass.php class that use MyInterface without open source dependencies => this files can be under another licence likes a commercial licence but has to be clearly identified and isolated on a specific folder. For all files into "lib" folder ("lib" is only an example, it can be "vendor" for example), it's recommended for each files to have a proper namespace, licence header on each file, LICENSE text file at root of this folder. For all others files, they must be under open source licence AFL, EUPL, BSD, MIT, ISC or Apache V2. 1 Link to comment Share on other sites More sharing options...
idnovate.com Posted June 29, 2022 Share Posted June 29, 2022 Hi @Matt75, I have a question regarding this issue but it seems that I can't send you a PM 🤔 How can I reach you? Thanks. Link to comment Share on other sites More sharing options...
Matt75 Posted June 29, 2022 Share Posted June 29, 2022 Join us on Slack - PrestaShop Open Source Project Please note this is not a support channel 1 Link to comment Share on other sites More sharing options...
Recommended Posts