Roots Discourse

Sage 9 illuminate/support conflicts with custom plugin trying to use latest illuminate/support

I’m currently working on a site that will be using Sage 9 as it’s theme, on a Bedrock container, and a plugin I am developing, I am trying to use the latest version of illuminate/support.

This constantly triggers errors with PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined function array_except() when I’m in the wp-admin on a New Post page.

If I drop my plugins illuminate/support version to 5.6 no errors are reported. Is there something I can do or look into, to get this to work correctly, or am I stuck with using 5.6 in my plugin due to the theme.

Laravel deprecated that array_except function in favour of a different naming convention:

So this means that you are using some incompatible dependencies.
My two cents here: The latest illuminate/support package doesn’t offer the array_except anymore, hence other libraries have issues now.

You may also be interested in the Sage 9.x update branch:

Yeah, as mentioned I’m trying to use the latest version of illuminate/support in my WP Plugin. I think what I’ll need to do is try to find a package that’ll isolate the plugins composer packages to it’s instance, so as to not conflict with Sage 9’s.

1 Like

Using php-scoper worked perfectly.

Link to the composer package

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.