-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Replace prototype-light.js #3106
Replace prototype-light.js #3106
Conversation
Let's continue the discussion here.
|
Having trouble reproducing that, how did you trigger the error? |
Just for reference: |
@dpfaffenbauer is a solution for that simply providing an optional backwards compat shim? (It would literally just be a small variation on the previous prototype-light.js file) |
@kirjavascript well, but Pimcore needs to require that shim, just providing it doesn't help, it would still be a BC break. |
@dpfaffenbauer in that case requiring the shim would have the same effect as not removing prototype-light at all I'm not sure it's possible to complete this task without breaking BC for plugins then :/ |
I think first of all we should get it working, then we can discuss about the BC :-) @kirjavascript the error occurs when opening a document page |
@kirjavascript are you able to reproduce it? |
@brusch yeah, I don't know why it wasn't breaking before - it's actually easy to reproduce in the conversion process I seemingly lost the context at some point in the addMethods function - should be fixed now |
@kirjavascript Did a lot of testing and it seems it's all done now. Good job! |
added upgrade notes regarding BC breaks |
- `Object.toQueryString()` ( `Ext.Object.toQueryString` ) | ||
- `Object.clone()` ( `Object.assign({}, object)` ) | ||
- `Object.toHTML()` | ||
- `Object.is[Element|Array|Hash|Function|String|Number|Undefined]()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacement could partly come from ExtJS.
Ext.isArray, Ext.isFunction, Ext.isString, Ext.isDefined and so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint, added them in detail
I still don't like the BC break, but it is not too bad and it is documented. So there is nothing more to add from my side. |
@kirjavascript can you try to resolve the conflicts? Thanks! |
Conflicts resolved. Added alternatives for Array methods into the docs. As for the Function prototype methods I'm not able to recreate some of the things in a concise way, so if alternatives cannot be found in Ext we could possibly point to another library that contains them? This might not be important though, since I imagine these methods are rarely if ever used |
@kirjavascript I've changed the base of this PR to the Thank you very much! |
@brusch added v5.4.0-dev to my fork - do I need to merge from v5.4.0-dev to replace_prototype-light.js too? |
Yep, I think thats necessary to resolve the conflicts. |
# Conflicts: # pimcore/lib/Pimcore/Bundle/AdminBundle/Resources/views/Admin/Index/index.html.php # pimcore/lib/Pimcore/Bundle/CoreBundle/EventListener/Frontend/EditmodeListener.php # web/pimcore/static6/js/pimcore/layout/portlets/customreports.js # web/pimcore/static6/js/pimcore/startup.js
@kirjavascript Thanks, I was now able to merge it - so nothing else to do for you. |
Changes in this pull request
Resolves #2974
Additional info
Work in progress - additional bugfixes to follow
See the previous PR for more information