-
-
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
Make oldFields mapping hardcoded to speed up system #921
Conversation
@colinmollenhour can you take a look at the issue #920 |
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.
as mentioned in the related Issue, this is a serious BC break and should follow a certain process therefore.
I agree it's breaking (no configuration option any more) but I would not call it serious BC. I have not seen a project or module which would use this configuration options. |
FYI, there are few places more with getOldFieldMap: |
If its about 11Y old extensions ... just drop it. (IMHO) I guess with raising composer requirments to PHP7 we broke far more (users/agencies, that still rely on 5.x). If removal is a no-go I'd agree to hardcoded values .. |
@Flyingmana Can we agree on following: |
40808b6
to
e15d959
Compare
e15d959
to
0d2bb65
Compare
@Flyingmana @fballiano This patch is now less breaking:
However adding new through configuration will not work ($this->_oldFieldsMap = Mage::helper('sales')->getOldFieldMap). I'm ok with merging this patch to 1.9 branch as it's breaking potential is very limited, but If you prefer to have it only in v20, then lets' be it :) |
0d2bb65
to
aa16d98
Compare
I vote for: drop them all, everywhere. |
pre 1.6? let's kill them already! |
@luigifab @fballiano you mean to merge it to 1.9 or to 20? |
I think @luigifab and me wanted to say that if it's such an old functionality maybe we could remove it? |
@fballiano We can remove it in separate patch targetted for 20.x only. Not to make unnecessary upgrade hassle for merchants on 1.9 (which we declare backward compatible). |
Basically this patch makes some default Magento reports usable again with more data, so I consider it a good tradeoff for 1.9 |
I don't know, since it was discussed to have it in v20 I've no idea what to do then :-D |
Will I have your vote if we keep it for 20 only? |
I trust that if you say it's a good thing it is for sure, although I keep thinking that we should remove the funcionality completely from v20, for sure there's no pre1.6 code out there anymore. and if there is... this is the last of their problems :-D |
As far as I understand it would not be wanted in OM-19 because it would create (possible) trouble with a source code before Magento version 1.6, especially extensions. That means a very long time ago. Who else uses extensions before M1-1.6 that weren't updated later? Hard to say. I personally think that if the PR is a real improvement to go both versions and if it will create issues we will find out then. It can be quickly reverted for any version and is only a commit. I am also for OM-19 (even I don't use this version in production, OM-20 is concrete). |
I propose we leave it alone for v19 (the PR is already based on v20 so we're good) and add a note to the README.md section of change between v19 and v20 along the lines of:
Then this can be merged and this PR will be listed in the release notes so users of v20 should do a quick check of their code for |
I agree with the opinion expressed by @colinmollenhour. |
@tmotyl I can't add the note to the README since you locked the PR from modifications :-) |
@fballiano thats strange... consulting github documentation ... seems you can only enable "Allow edits from maintainers" on personal forks and not on organizational forks... see https://github.com/orgs/github-community/discussions/5634 |
I just wanted to add this line: Removed support for global/sales/old_fields_map defined in XML. #921 to the README in the "differences between v19 and v20" as suggested by Colin ;-) |
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
aa16d98
to
bec5c0a
Compare
here you go @fballiano |
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.
LGTM
Unit Test Results1 files 1 suites 0s ⏱️ Results for commit bafc48f. |
The mapping came with Magneto 1.6 to provide a backward compatibility
for old (pre 1.6) db field names.
Now the mapping is hardcoded in the class instead of saved
in the configuration.
This improves performance as Magento will not create tons of objects for
every new product/order/... entities.
Related: #920