Skip to content

Conversation

@izharaazmi
Copy link
Contributor

Minimizing JArrayHelper by using Joomla\Utilities\ArrayHelper internally with appropriate deprecation warnings. All functionality of JArrayHelper is already available there, so no point keeping duplicate code.

…lly with appropriate deprecation warnings. All functionality of JArrayHelper is already available there, so no point keeping duplicate code.
@roland-d
Copy link
Contributor

roland-d commented Sep 4, 2015

@izharaazmi Does this PR need to wait for your fix in joomla-framework/utilities#12 ?

@izharaazmi
Copy link
Contributor Author

@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.
@izharaazmi
Copy link
Contributor Author

Kindly let me know If there is something awaited from my part.

@roland-d
Copy link
Contributor

@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.

@izharaazmi
Copy link
Contributor Author

@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 JArrayHelper (without this patch) or Joomla\Utilities\ArrayHelper is applicable for this PR as well.
This means the existing unit test cases are well sufficient for this purpose.

However, I might be wrong in saying so, please enlighten me with your perspective.

@izharaazmi
Copy link
Contributor Author

Please advise if I need to make any changes/improvements to this.
Thanks.

@roland-d
Copy link
Contributor

roland-d commented Oct 3, 2015

@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.

@roland-d
Copy link
Contributor

roland-d commented Oct 3, 2015

I have tested this item 🔴 unsuccessfully on 7f9ff9d


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782.

@joomla-cms-bot
Copy link

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.

@izharaazmi
Copy link
Contributor Author

I just tested the 5 methods in JArrayHelper with object type arguments. I got these lines in my log file. I see the __FUNCTION__ is not empty.

#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.
Thanks.

@roland-d
Copy link
Contributor

roland-d commented Oct 3, 2015

I have tested this item 🔴 unsuccessfully on ad48dac


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782.

@roland-d
Copy link
Contributor

roland-d commented Oct 3, 2015

@wilsonge Can you have a look at this too? Looks good to go for me.

@izharaazmi
Copy link
Contributor Author

@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?

@roland-d
Copy link
Contributor

roland-d commented Oct 3, 2015

@izharaazmi Look at the issue and the test results, I have set the test to successful after your last change.

@izharaazmi
Copy link
Contributor Author

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.

@roland-d
Copy link
Contributor

roland-d commented Oct 3, 2015

I have tested this item ✅ successfully on ad48dac


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782.

@roland-d
Copy link
Contributor

roland-d commented Oct 3, 2015

Now it is successful :)

@izharaazmi
Copy link
Contributor Author

Thanks!

@anibalsanchez
Copy link
Contributor

I have tested this item ✅ successfully on ad48dac

Applied the patch and worked for a while, no issues so far. Ok


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782.

@zero-24 zero-24 added this to the Joomla! 3.5.0 milestone Nov 6, 2015
@zero-24
Copy link
Contributor

zero-24 commented Nov 6, 2015

RTC. for 3.5.0 Thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7782.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 6, 2015
rdeutz added a commit that referenced this pull request Nov 16, 2015
Minimizing JArrayHelper by using Joomla\Utilities\ArrayHelper internally
@rdeutz rdeutz merged commit 62c24a3 into joomla:staging Nov 16, 2015
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 16, 2015
izharaazmi added a commit to izharaazmi/joomla-cms that referenced this pull request Nov 18, 2015
…using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455.
izharaazmi added a commit to izharaazmi/joomla-cms that referenced this pull request Aug 15, 2016
…using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455.
izharaazmi added a commit to izharaazmi/joomla-cms that referenced this pull request Aug 15, 2016
* 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)
  ...
rdeutz pushed a commit that referenced this pull request Aug 22, 2016
)

* 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.
@izharaazmi izharaazmi deleted the arrayhelper-3 branch August 23, 2016 06:17
roland-d pushed a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…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.
roland-d pushed a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants