Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Function create_function() is deprecated in PHP 7.2
Function create_function() is deprecated in PHP 7.2
Comments
Comment #2
GuillaumeDuveauIt has been fixed in the library geshi/geshi on 11 Dec 2017: https://github.com/GeSHi/geshi-1.0/commit/ed9f49a7c7a195f6ed2bc864f5ce03...
But there has been no new release since 15 May 2017: https://github.com/GeSHi/geshi-1.0/releases
A workaround could be to use the version of the specific commit on which the issue was fixed. It's not great but who knows if and when geshi/geshi will have a new release.
See attached patch.
Caution: this patch can not be applied on the fly if you use Composer to manage your codebase (https://github.com/cweagans/composer-patches#patches-containing-modifica...).
Comment #3
mikedotexe CreditAttribution: mikedotexe at Untold Studio commentedInteresting, thanks for making the patch. My
composer.json
file (based on drupal-composer/drupal-project)uses this:
"drupal/geshifilter": "^1.2"
where your patch is looking for:
"geshi/geshi": "^1.0"
The command I used to install the GeSHi filter was at the top of this module page.
Curious that one starts with
drupal/
and the other withgeshi/
I'll admit I haven't had to do much Composer fiddling.
Comment #4
mikedotexe CreditAttribution: mikedotexe at Untold Studio commentedDarn it, try as I might to not ask a dumb question, I now see that I have. You're discussing the
composer.json
in the module and I'm talking about my project. Please disregard and thanks for tracking this down @guixComment #5
yukare CreditAttribution: yukare commentedI had something like this in the past, but some people need to use only stable modules, not dev. See https://www.drupal.org/project/geshifilter/issues/2906413 so we can use another aproach, let the user choose which version want to use.
Require the stable version as it is now by default, but allow and show how to install the dev version. There is an issue in geshi to create a new version (https://github.com/GeSHi/geshi-1.0/issues/106).
Comment #6
GrienauerI gave an own "composer GeSHi hack" a try, to download GeSHi with commit… But I don't manage to get it working in the end. The "hack" was not "hacky" enough. Here the part of my composer. Maybe someone has another idea :)
Comment #7
jungleAnother workaround
put "geshi/geshi": "dev-master#ed9f49a7c7a195f6ed2bc864f5ce03b990b5867d as v1.0.9.0" into composer.json and run composer update
Comment #8
yukare CreditAttribution: yukare commentedThe current geshi stable version 1.0.9.1 has this fix(for PHP 7.2), so this is not an issue anymore.