Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Sep 2013 at 13:34 UTC
Updated:
29 Jul 2014 at 22:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunCorrection:
https://bugs.php.net/bug.php?id=34857 was fixed around the time of PHP 5.1, but is only available since PHP 5.4:
http://php.net/manual/en/function.array-combine.php#refsect1-function.ar...
So once #2152073: Bump Drupal core's PHP requirement to 5.4.2 is possible and done, we can eliminate
MapArrayentirely.The optional
$callbacksupport is completely obsolete since PHP 5.3 already, because that's the same as:Comment #2
ParisLiakos commentedComment #3
tstoecklerHmm... interesting that's very weird documentation then on the PHP site, because that clearly says "PHP Version: 5.1.0RC1"
Anyway, since I'm assigned to this anyway, taking a stab at this.
Comment #4
tstoecklerHere we go.
Unassigning for now, as this is not exactly very high on my hitlist right now.
Comment #6
tstoecklerOops.
Comment #8
sunComment #9
sunActually, this removes the @deprecated function, too. :)
Comment #10
ParisLiakos commentedwrong order of arguments:)
Comment #11
tstoecklerOh, wow, that was quite stupid. Thanks @ParisLiakos!!
Comment #12
ParisLiakos commentedNo, worries.. messing up order of arguments in PHP is a common fail..php--
Comment #13
sunWow, this looks awesome - great job!
I guess we need to prepare a draft change notice for the API change of removing
drupal_map_assoc(), describing how to achieve the same with native PHP (as demonstrated in this patch).Comment #14
ParisLiakos commenteddraft change record: https://drupal.org/node/2207453
Comment #15
tstoecklerChange record looks great. Added some links to the PHP functions and an example of the Drupal 8 MapArray version.
Comment #16
catchThat PHP bug isn't the reason we have MapArray, this is. Let's see if that's still valid first and whether we care or not.
https://drupal.org/comment/913381#comment-913381
Comment #17
catchIgnore me, I had another issue that got reverted, but the one linked above got in. So yes indeed that's the only reason, and we're on 5.4 now.
Committed/pushed to 8.x, thanks! Nice to see us finally get rid of this after trying six years ago.
Comment #18
MixologicFyi: drupal_map_assoc is used by drush currently, so if you'll have some drush problems with current d8 HEAD until its fixed.