Cleanup: isSaleable() vs. isSalable() inconsistency #2084
Replies: 5 comments 1 reply
-
Is one of the 2 not already an alias of the other? |
Beta Was this translation helpful? Give feedback.
-
I doubt this can be fixed completly w/o breaking stuff .... Look at ...
Fixing method names/adding aliases just fixes a part of the typos :( |
Beta Was this translation helpful? Give feedback.
-
It is an issue that creates confusion for the developer but at the level of functionality it does not produce errors. Such a PR is more than a change of letters and can cause problems with extensions already used and no longer maintained by developers. Indeed the solution would be to correct the functions and create aliases for backward compatibility but what are the benefits for the future? Is anyone interested in doing a PR? |
Beta Was this translation helpful? Give feedback.
-
we could add aliases but it's really a cosmetic change, at the end of the day everybody uses an IDE with autocompletion so... |
Beta Was this translation helpful? Give feedback.
-
I agree, only a programmer who uses a text editor such as Notepad could still fill in the methods from memory. I suggest to convert this issue to discussion. It will remain for further opinions in the future. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary (*)
There's seems to be a lot of inconsistencies around
isSaleable
functions.It seem's like function
isSalable()
was created first, then later an aliasisSaleable()
was created to fix the spelling error.But there's still defined functions with both names and calls to both functions in base code and templates.
In addition there is an alias
getIsSalable()
butgetIsSaleable()
does not exist.Examples (*)
https://github.com/OpenMage/magento-lts/search?q=isSaleable&unscoped_q=isSaleable
https://github.com/OpenMage/magento-lts/search?q=isSalable&unscoped_q=isSalable
https://github.com/OpenMage/magento-lts/search?q=getissalable&unscoped_q=getissalable
Proposed solution
Name functions consistently and create aliases for the spelling error where due.
Beta Was this translation helpful? Give feedback.
All reactions