From 36d27d7554804e070b16d3240724cb2cb2ea678f Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 2 Jul 2024 23:45:29 +0100 Subject: [PATCH] Update to wikimedia/less.php 5.0 Fix Less_Parser::AllParsedFiles -> getParsedFiles(). This was previously calling the static method Less_Parser::AllParsedFiles, but using a non-standard casing for the method name, and via the instance rather than static access to the static function. This has been deprecated in 4.x and removed in 5.0 in favour of getParsedFiles, which does what the code previously expected already. --- composer.json | 2 +- wp_enqueue_less.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 6125f32..3928626 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "ed-itsolutions/wp_enqueue_less", "description": "Enqueue Less stylesheets in your WordPress code. ", "require": { - "wikimedia/less.php": "^3.1" + "wikimedia/less.php": "^5.0" }, "license": "MIT", "authors": [ diff --git a/wp_enqueue_less.php b/wp_enqueue_less.php index df67cf8..05f3732 100644 --- a/wp_enqueue_less.php +++ b/wp_enqueue_less.php @@ -59,7 +59,7 @@ function wp_enqueue_less($key, $file, $variables){ $details->hash = $hash; $details->fileHashes = array(); - foreach($parser->allParsedFiles() as $fileName){ + foreach($parser->getParsedFiles() as $fileName){ $details->fileHashes[$fileName] = md5_file($fileName); } @@ -90,4 +90,4 @@ function wp_enqueue_less($key, $file, $variables){ } } }); -} \ No newline at end of file +}