Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install TinyMCE 6.x via composer #4113

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Jul 24, 2024

Description (*)

I've updated the copy-plugin to work if you install OpenMage as composer dependency.

Related Pull Requests

@github-actions github-actions bot added composer Relates to composer.json JavaScript Relates to js/* labels Jul 24, 2024
@sreichel sreichel changed the title Install TinyMCE to 6.x via composer Install TinyMCE 6.x via composer Jul 24, 2024
@ADDISON74
Copy link
Contributor

Very good idea, but @fballiano, @empiricompany and I worked on a custom version for TinyMCE which is now available in version 20. Installing TinyMCE with Composer will benefit the version we have already in OpenMage or do we need some patches for Composer?

@sreichel
Copy link
Contributor Author

@ADDISON74 i have seen no changes made to TinyMCE itself, so the files are the same as currently used.

@ADDISON74
Copy link
Contributor

@sreichel - This is good. I will come back with a feedback after testing.

@sreichel
Copy link
Contributor Author

@ADDISON74 note: when you install OM as composer dependency, you have to install that plugin too.

@sreichel
Copy link
Contributor Author

Waiting for final response from TinyMCE, but it looks like we CAN use v7 ...

Maybe some is really familiar with licensing ... answer so far.

GPL Version 2 or later grants users the freedom to use, modify, and distribute software, as long as any derivative works are also distributed under the same license and the source code is made available to recipients.

In simplified terms, this means that when distributing an app containing GPL licensed code, the whole app will inherit the GPL license and the source code must be made available to the community. This is usually a no-go in a commercial use case.

OM is no derivative work from TinyMCE, so we dont have to put it under GPL itself.

We use it in a non-commercial project. We follow (inherit?) GPL and all code is available to the community.

From my understanding ... if someone uses a OM-fork as commercial product, HE had to put it under GPL - not we.

Waiting for response, but v7 seems to work ...

@ADDISON74
Copy link
Contributor

I didn't think to contact them, but what you say there seems to make sense. If we get an official answer that we can use version 7, that would be wonderful. If I'm not mistaken, Magento 2 is still at version 5.

@ADDISON74
Copy link
Contributor

@sreichel - Did you get any reply from TinyMCE regarding using v7 in OpenMage?

@sreichel
Copy link
Contributor Author

sreichel commented Aug 22, 2024

@ADDISON74 i dont know ... my email-account is currently locked and seems not so easy to get it unlocked.

With this PR we are prepared for a possible 6.8.5 release that will come "for sure" (6.8 is supported till next year).

@github-actions github-actions bot removed the phpstan label Sep 6, 2024
@sreichel
Copy link
Contributor Author

sreichel commented Sep 6, 2024

No answer till now ...

Ready to review?

Copy link
Member

@colinmollenhour colinmollenhour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but what release should it go in?

@sreichel
Copy link
Contributor Author

sreichel commented Sep 9, 2024

It would only replace current tinymce 6.8.4 we already have ... main branch/release?

@empiricompany
Copy link
Contributor

I like the idea of this PR, but there are two critical issues that come to mind that need to be resolved:

  1. The composer plugin "sreichel/composer-plugin-file-copy" is a dev-develop version, but what concerns me more is that it's not under the OpenMage umbrella. What if this gets removed in the future? This remains a critical issue for any additional tools created by the community, such as documentation and others.

  2. More importantly, the license of the new TinyMCE version is GPL, which is not compatible with our OSL. This issue has been raised multiple times by @fballiano in the past.

IMHO The best thing in the future is to remove TinyMCE in favor of a minimal editor with only bold, italic, underline, etc.
My clients have never used all the 'word-style' tools in TinyMCE, and when they did, they only created messes in the code. Every modern e-commerce platform is moving in this direction.

@sreichel
Copy link
Contributor Author

  1. Make a release is not a problem, but till then you can also add the hash for a specific commit.

OpenMage can fork it, but I don't want to move it. It's not tied to OpenMage.

  1. We can't use v7, but v6 is supported till mid next year. Using composer has the advantage composer audit warns about security issues and we can "vendor patches" to fix them.

However ... you're right. Removing or replacing or make TinyMce optional is something we have to think about.

@empiricompany
Copy link
Contributor

  1. It is currently used only on OpenMage and is a tool specifically created for OpenMage. This sets it apart from other packages we have in Composer. The core is tightly dependent on this package; in my opinion, it should be officially supported by OpenMage.

  2. The issue is not about the support but the GPL license, which is incompatible with the OSL.

Below are some points raised by an LLM such as Claude:

Integrating GPL (GNU General Public License) licensed code into an OSL (Open Software License) project can lead to several complications due to the differences in these licenses. Here are the main issues:

  1. License incompatibility: GPL and OSL are generally considered incompatible licenses. This means that combining code under these licenses in the same project can create legal conflicts.
  2. Copyleft nature of GPL: GPL is a strong copyleft license, which means that any derivative work must also be distributed under the GPL. This could force the entire OSL project to adopt the GPL license, which may not be desired or possible.
  3. Distribution requirements: GPL requires that the source code of the entire program be made available when distributing the software. This might conflict with the OSL's distribution terms.
  4. Contributor agreements: If your project has contributor agreements based on the OSL, introducing GPL code could invalidate or complicate these agreements.
  5. Legal uncertainty: The lack of clear legal precedents on mixing these specific licenses can lead to uncertainty about the legal status of the resulting software.
  6. Commercial use restrictions: GPL can impose restrictions on commercial use that may not align with the goals of an OSL-licensed project.
  7. Difficulty in future licensing changes: Once GPL code is incorporated, it becomes very difficult to change the license of the project in the future.
  8. Potential need for code segregation: To avoid these issues, you might need to strictly segregate the GPL code, which can lead to architectural complications and maintenance challenges.

I encourage all of you to focus particularly on point 2

@ADDISON74
Copy link
Contributor

This is what GNU recommends on its website "We urge you not to use the Open Software License for software you write. However, there is no reason to avoid running programs that have been released under this license."

I don't know if Magento 1 was licensed to use TinyMCE, but OpenMage inherited it. At this moment TinyMCE v6 runs in OpenMage and can be removed at the request of the developer.

Being a discussion with legal implications, it would be necessary to consult some lawyers. If there is an explicit agreement to use TinyMCE in Magento 1, there should be no problems. If there is none, an agreement from TinyMCE should be requested by our maintainers.

@sreichel
Copy link
Contributor Author

@empiricompany that plug-in has a few hundred downloads and I doubt it comes from Openmage users. It has only 3 lines of code that are related to Openmage (check for magento-root-dir).

TinyMCE v6 is released under MIT license, so it should be safe to use.

Only v7 changed to GPL3 that's not compatible.

I got no reply from customer support till now and made an official request some minutes ago.

@empiricompany
Copy link
Contributor

empiricompany commented Sep 11, 2024

There was some confusion in the Tinymce community about the license change.

A few days ago there was a thread about it, this is the last official comment where they tried to clarify:

tinymce/tinymce#9453 (comment)

It seems that the versions before 7 maintain the old licenses, even if the repository is the same and shows the GPL license

@sreichel
Copy link
Contributor Author

sreichel commented Sep 11, 2024

Request already made there ... https://pi.tiny.cloud/l/2202/2024-04-25/dgy4qt

Thank you for your interest in the TinyMCE for Open Source Program! Our team is currently evaluating your application and will be in touch via email within 5 business days to discuss your project’s compatibility with our Program.

We look forward to learning more about your project and working with you to determine the best way to support it.

Best,
The Tiny Team

@ADDISON74
Copy link
Contributor

The discussions that I read in the TinyMCE repository will not remain without result. Magento 2 still uses version 5, we can continue to use version 6 in OpenMage without problems even after its EOL. In addition, there will be forks if the license policy is not changed. At this moment I would say let others decide, because things will not stay like this regarding v7, TinyMCE risks losing many supporters very fast. If they didn't block the conversation, opinions would still flow today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composer Relates to composer.json JavaScript Relates to js/*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants