-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Minimizing JArrayHelper by using Joomla\Utilities\ArrayHelper internally #7782
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
Conversation
…lly with appropriate deprecation warnings. All functionality of JArrayHelper is already available there, so no point keeping duplicate code.
|
@izharaazmi Does this PR need to wait for your fix in joomla-framework/utilities#12 ? |
|
@roland-d No. The fix in joomla-framework/utilities#12 is independent of this PR. |
Added the missing return statement that caused fromObject method to fail.
|
Kindly let me know If there is something awaited from my part. |
|
@izharaazmi Please provide test instructions that touches this code so users can test that nothing is broken. Code review looks good but that is not enough in this case. Thanks. |
|
@roland-d There is no special instruction for this change as I have not made any logical change. No feature added or removed or fixed or improved. The normal tests that applies to However, I might be wrong in saying so, please enlighten me with your perspective. |
|
Please advise if I need to make any changes/improvements to this. |
|
@izharaazmi Finally I had some time to test and the proxies are working fine. Only issue I did find is you changed in the logs the names to FUNCTION and this is not working. The value of FUNCTION is always empty, so I would suggest to revert this change. So your point that the existing unit test cases are sufficient is not correct because they do not test the logging. To test this issue, you will need to enable debugging mode with XDebug for example to see the changes at work. Editing a category will trigger most changed methods except for the pivot and arrayUnique methods, these are only unit tested. |
|
I have tested this item 🔴 unsuccessfully on 7f9ff9d This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782. |
|
This PR has received new commits. CC: @roland-d This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782. |
|
I just tested the 5 methods in #Fields: datetime priority clientip category message
2015-10-03T08:47:20+00:00 WARNING ::1 deprecated This method is typehinted to be an array in \Joomla\Utilities\ArrayHelper::toObject.
2015-10-03T08:47:21+00:00 WARNING ::1 deprecated This method is typehinted to be an array in \Joomla\Utilities\ArrayHelper::toString.
2015-10-03T08:47:21+00:00 WARNING ::1 deprecated This method is typehinted to be an array in \Joomla\Utilities\ArrayHelper::getColumn.
2015-10-03T08:47:21+00:00 WARNING ::1 deprecated This method is typehinted to be an array in \Joomla\Utilities\ArrayHelper::pivot.
2015-10-03T08:47:21+00:00 WARNING ::1 deprecated This method is typehinted to be an array in \Joomla\Utilities\ArrayHelper::sortObjects.However, I have still changed those 5 lines to fixed string for the method names. |
|
I have tested this item 🔴 unsuccessfully on ad48dac This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782. |
|
@wilsonge Can you have a look at this too? Looks good to go for me. |
|
@roland-d In your last comment you say 'looks good to me', but your recent test status says: tested unsuccessfully on ad48dac. Was there any issue? |
|
@izharaazmi Look at the issue and the test results, I have set the test to successful after your last change. |
|
Sorry, but I see the 2nd test too marked as 'tested unsuccessfully' only. May be I'm missing something! This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782. |
|
I have tested this item ✅ successfully on ad48dac This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782. |
|
Now it is successful :) |
|
Thanks! |
|
I have tested this item ✅ successfully on ad48dac This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782. |
|
RTC. for 3.5.0 Thanks. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782. |
Minimizing JArrayHelper by using Joomla\Utilities\ArrayHelper internally
…using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455.
…using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455.
* re-arrayhelper-min: (2467 commits) Minimize JArrayHelper methods `toInteger`, `pivot`, `arrayUnique` by using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455. remove platform include (joomla#11615) [GitHub Templates] Make headings bigger (joomla#11607) [com_contact] Make ACL core.edit.own work (PR for 11466) (joomla#11503) Small review on docs & code structure in JModelLegacy library classes (joomla#11057) Obviously, this should be an array. (joomla#11610) Don't manually import JPlatform anymore (joomla#10841) Parse preprocess rules from component routers (joomla#8986) Add the correct exception after 11593 merge (was waiting for that merrge) (joomla#11606) Add missing clean line after joomla#9277 (joomla#11605) Deprecate the _PROFILER global var (joomla#10845) Spelling errors (joomla#11604) Moved travis javascript bash file to build/travis like joomla#11600 (joomla#11603) Regression: Fix edit check in backend articles manager, always denying edit after soft deny (joomla#11511) [com_plugins] User not allowed to core.manage? Use 403 php custom exception (instead of a 404 JError) (joomla#11593) [com_newsfeeds] Make ACL core.edit.own work (PR for 11466) (joomla#11502) $result-variable-undefined-given-default-value (joomla#9277) com_banners use exceptions. and not allowed is a 403 (joomla#11418) Frontend & plugins using the autoloader (joomla#10882) New version of PR 6788 (JText::_() Optimizations) (joomla#11235) ...
) * Minimize JArrayHelper methods `toInteger`, `pivot`, `arrayUnique` by using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from #7782) other four methods as is for b/c reasons as mentioned in #8455. * Minimize JArrayHelper methods `toInteger`, `pivot`, `arrayUnique` by using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from #7782) other four methods as is for b/c reasons as mentioned in #8455.
…omla#8479) * Minimize JArrayHelper methods `toInteger`, `pivot`, `arrayUnique` by using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455. * Minimize JArrayHelper methods `toInteger`, `pivot`, `arrayUnique` by using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455.
…omla#8479) * Minimize JArrayHelper methods `toInteger`, `pivot`, `arrayUnique` by using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455. * Minimize JArrayHelper methods `toInteger`, `pivot`, `arrayUnique` by using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455.
Minimizing
JArrayHelperby usingJoomla\Utilities\ArrayHelperinternally with appropriate deprecation warnings. All functionality ofJArrayHelperis already available there, so no point keeping duplicate code.