Skip to content

Commit 7d600ed

Browse files
committed
Merge branch 'release/1.10.41'
2 parents 3b88214 + 15f73cd commit 7d600ed

File tree

8 files changed

+60
-38
lines changed

8 files changed

+60
-38
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v1.10.41
2+
## 05/09/2023
3+
4+
1. [](#new)
5+
* Updated to use new `BaconQRCode` version `2.0.8` for new SVG features + PHP 8.2+ fixes
6+
1. [](#improved)
7+
* Require Grav `v1.7.41`
8+
* Fixed a deprecated message where `Admin::$routes` was being dynamically defined
9+
* Fixes to use non-deprecated methods in `ScssCompiler`
10+
111
# v1.10.40
212
## 03/22/2023
313

blueprints.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Admin Panel
22
slug: admin
33
type: plugin
4-
version: 1.10.40
4+
version: 1.10.41
55
description: Adds an advanced administration panel to manage your site
66
icon: empire
77
author:
@@ -15,7 +15,7 @@ docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md
1515
license: MIT
1616

1717
dependencies:
18-
- { name: grav, version: '>=1.7.32' }
18+
- { name: grav, version: '>=1.7.41' }
1919
- { name: form, version: '>=6.0.1' }
2020
- { name: login, version: '>=3.7.0' }
2121
- { name: email, version: '>=3.1.6' }

classes/plugin/Admin.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ class Admin
102102
/** @var array */
103103
public $languages_enabled = [];
104104
/** @var Uri $uri */
105+
106+
/** @var array */
107+
public $routes = [];
105108
protected $uri;
106109
/** @var array */
107110
protected $pages = [];

classes/plugin/ScssCompiler.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Grav\Plugin\Admin;
1111

1212
use ScssPhp\ScssPhp\Compiler;
13+
use ScssPhp\ScssPhp\ValueConverter;
1314

1415
class ScssCompiler
1516
{
@@ -31,7 +32,13 @@ public function reset()
3132

3233
public function setVariables(array $variables)
3334
{
34-
$this->compiler()->setVariables($variables);
35+
// $parsed = ValueConverter::fromPhp($variables);
36+
$parsed = [];
37+
foreach ($variables as $key => $value) {
38+
$parsed[$key] = ValueConverter::parseValue($value);
39+
}
40+
41+
$this->compiler()->addVariables($parsed);
3542
return $this;
3643
}
3744

@@ -55,7 +62,7 @@ public function compileAll(array $input_paths, string $output_file)
5562
foreach ($input_paths as $input_file) {
5663
$input .= trim(file_get_contents($input_file)) . "\n\n";
5764
}
58-
$output = $this->compiler()->compile($input);
65+
$output = $this->compiler()->compileString($input)->getCss();
5966
file_put_contents($output_file, $output);
6067
return $this;
6168
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"require": {
2323
"php": "^7.3.6 || ^8.0",
2424
"ext-json": "*",
25-
"scssphp/scssphp": "^1.7",
25+
"scssphp/scssphp": "^1.11",
2626
"laminas/laminas-zendframework-bridge": "^1.4",
2727
"p3k/picofeed": "@stable"
2828
},

composer.lock

Lines changed: 21 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/composer/InstalledVersions.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
9898
{
9999
foreach (self::getInstalled() as $installed) {
100100
if (isset($installed['versions'][$packageName])) {
101-
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
101+
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
102102
}
103103
}
104104

@@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
119119
*/
120120
public static function satisfies(VersionParser $parser, $packageName, $constraint)
121121
{
122-
$constraint = $parser->parseConstraints($constraint);
122+
$constraint = $parser->parseConstraints((string) $constraint);
123123
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
124124

125125
return $provided->matches($constraint);
@@ -328,7 +328,9 @@ private static function getInstalled()
328328
if (isset(self::$installedByVendor[$vendorDir])) {
329329
$installed[] = self::$installedByVendor[$vendorDir];
330330
} elseif (is_file($vendorDir.'/composer/installed.php')) {
331-
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
331+
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
332+
$required = require $vendorDir.'/composer/installed.php';
333+
$installed[] = self::$installedByVendor[$vendorDir] = $required;
332334
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
333335
self::$installed = $installed[count($installed) - 1];
334336
}
@@ -340,12 +342,17 @@ private static function getInstalled()
340342
// only require the installed.php file if this file is loaded from its dumped location,
341343
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
342344
if (substr(__DIR__, -8, 1) !== 'C') {
343-
self::$installed = require __DIR__ . '/installed.php';
345+
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
346+
$required = require __DIR__ . '/installed.php';
347+
self::$installed = $required;
344348
} else {
345349
self::$installed = array();
346350
}
347351
}
348-
$installed[] = self::$installed;
352+
353+
if (self::$installed !== array()) {
354+
$installed[] = self::$installed;
355+
}
349356

350357
return $installed;
351358
}

vendor/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => 'getgrav/grav-plugin-admin',
44
'pretty_version' => 'dev-develop',
55
'version' => 'dev-develop',
6-
'reference' => '5f1b3e1e4a413bf5e45e99b8d5aa174b6806c12c',
6+
'reference' => 'be85fb4194474700fbd8fe60b48b27613b47ce59',
77
'type' => 'grav-plugin',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'getgrav/grav-plugin-admin' => array(
1414
'pretty_version' => 'dev-develop',
1515
'version' => 'dev-develop',
16-
'reference' => '5f1b3e1e4a413bf5e45e99b8d5aa174b6806c12c',
16+
'reference' => 'be85fb4194474700fbd8fe60b48b27613b47ce59',
1717
'type' => 'grav-plugin',
1818
'install_path' => __DIR__ . '/../../',
1919
'aliases' => array(),

0 commit comments

Comments
 (0)