-
-
Notifications
You must be signed in to change notification settings - Fork 436
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 7.5 via composer #4113
base: main
Are you sure you want to change the base?
Conversation
* Rector: CQ - UnusedForeachValueToArrayKeysRector See Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector * fixes + phpstan See fix at rector: rectorphp/rector-src#6164
This reverts commit 3d7eaf6.
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? |
@addison74 i have seen no changes made to TinyMCE itself, so the files are the same as currently used. |
@addison74 note: when you install OM as composer dependency, you have to install that plugin too. |
Waiting for final response from TinyMCE, but it looks like we CAN use v7 ... Maybe some is really familiar with licensing ... answer so far.
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 ... |
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. |
# Conflicts: # composer.lock
@sreichel - Did you get any reply from TinyMCE regarding using v7 in OpenMage? |
@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). |
# Conflicts: # composer.lock
Has someone time to test? |
I will do a test in the next days. We can change the title to 7.5. |
I wasn't using OpenMage versions installed with Composer, so I did the following steps to test, based on the information I found in the README file.
{
"name": "ubuntu/openmage",
"authors": [
{
"name": "DDEV User",
"email": "[email protected]"
}
],
"require": {
"aydin-hassan/magento-core-composer-installer": "^2.1.0",
"openmage/magento-lts": "^20.10.2",
"mklkj/tinymce-i18n": "^24.11",
"sreichel/composer-plugin-file-copy": "^1.1",
"tinymce/tinymce": "^7.5"
},
"extra": {
"enable-patching": true,
"magento-core-package-type": "magento-source",
"magento-root-dir": "/var/www/html",
"file-copy" : [{
"source": "tinymce/tinymce",
"target": "js/tinymce"
}, {
"source": "mklkj/tinymce-i18n/langs7",
"target": "js/tinymce/langs"
}]
},
"config": {
"allow-plugins": {
"aydin-hassan/magento-core-composer-installer": true,
"cweagans/composer-patches": true,
"magento-hackathon/magento-composer-installer": true,
"sreichel/composer-plugin-file-copy": true
}
}
}
Looking into js/tinymce directory there are the old files, the ones that ship with OpenMage. Based on the Composer file they should be replaced by the files from these two directories:
I renamed js/tinymce then copied the files from the directories above. I managed to run the latest version 7.5.1. |
I used the TinyMCE shows in the browser console this warning
but you already fixed it. You need to update the composer.lock file. From what I remember, if we use a pub directory in the root and make it as the webserver docroot, the js directory will not be found there. It is created when installing for the first time with Composer. If it is found, then you will need to rethink your copying. |
Your 3rd step was wrong ...
Its either "magento-root-dir" (aka pub ???) should work ... latest release was for that (see sreichel/composer-plugin-file-copy@3a8b635#diff-2ad49435633825bde92b4b94271cc2fc62fd87bcd27e50215c3b6679f8471cdfL107-R113) |
As per our agreement with Tiny, the custom license file needs to be included with distributions of the source code so here was my proposal:
Can you devise a method to inject the notice in section 3.ii into the vendor/tinymce/tinymce directory after a Here is the notice text:
Please also add the following to LICENSE_TINYMCE.txt to the project root:
|
# Conflicts: # composer.lock
Composers "post-update-cmd" does not work when OpenMage is installed as composer dependency. I have added a 2nd file to root that get copied to vendor/tinymce/tinymce. |
@colinmollenhour solved issues. Ive replaced file copier plugin with new openmage composer plugin.
Not tested with composer installed OpenMage yet. |
@addison74 sorry for late reply. The old files are there because you started with v.20.10.2. They are removed with this PR. Example composer.json for tests ... {
"name": "sr/test-om-composer-tinymce",
"type": "project",
"description": "Test for TinyMCE 7.5",
"license": "proprietary",
"require": {
"openmage/magento-lts": "dev-tinymce",
"aydin-hassan/magento-core-composer-installer": "~2.0.0 || ^2.1.0"
},
"extra": {
"magento-root-dir": "public_test",
"enable-patching": true,
"magento-core-package-type": "magento-source"
},
"config": {
"allow-plugins": {
"cweagans/composer-patches": true,
"magento-hackathon/magento-composer-installer": true,
"aydin-hassan/magento-core-composer-installer": true,
"openmage/composer-plugin": true
}
},
"repositories": {
"sreichel": {
"type": "git",
"url": "[email protected]:sreichel/magento-lts.git"
}
},
"minimum-stability": "dev",
"prefer-stable": true
} Plugin is now also tested with composer + |
I dont think its required to test TinyMCE itself, as Tiny-Support told that there are no BC-breaking changes. If install works correctly, please move do a quick check and approve! |
Description (*)
I've updated the copy-plugin to work if you install OpenMage as composer dependency.
Related Pull Requests
Update
Todo