Problem/Motivation

See the following Drupal core for the motivation: #2960522: Use root-namespaced native functions for better opcache'd performance.
This pattern was already adopted by Symfony and will be adopted by Drupal core at some point.
Here is a list of applicable functions: https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3048#issuecomment-32...

Proposed resolution

Add root namespace to native function calls in Rabbit Hole classes.

Remaining tasks

Open a merge request, review, commit.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Matroskeen created an issue. See original summary.

larisse made their first commit to this issue’s fork.

larisse’s picture

Status: Active » Needs review
matroskeen’s picture

Hi @larisse,
Thanks for the merge request.

Actually, I was hoping to keep this task for someone else on our local code sprint we're hosting this week.
Please watch out for "Assigned" field value before you start working on the issue because you might step out on someone toes :)

Cheers!

larisse’s picture

Hi @Matroskeen, so sorry! I saw the Assigned field when I created a fork.
Feel free to reject the merge request! :)

andypost’s picture

Other option is use function in_array

andypost’s picture

@Matroskeen would be great to link here core's issue

matroskeen’s picture

  • Matroskeen committed 6d8dbf8 on 8.x-1.x authored by larisse
    Issue #3232147 by Matroskeen, larisse: Use root-namespaced native...
matroskeen’s picture

Assigned: matroskeen » Unassigned
Status: Needs review » Fixed

I've restored some changes in *.module and *.post_update.php files, because they are already in the global namespace, so these changes has no affect there.

I was also using https://github.com/FriendsOfPHP/PHP-CS-Fixer tool to verify applied changes.
The tests are green, so let's get this in.

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.