Skip to content

Commit

Permalink
Merge branch 'release/1.10.41'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 9, 2023
2 parents 3b88214 + 15f73cd commit 7d600ed
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 38 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# v1.10.41
## 05/09/2023

1. [](#new)
* Updated to use new `BaconQRCode` version `2.0.8` for new SVG features + PHP 8.2+ fixes
1. [](#improved)
* Require Grav `v1.7.41`
* Fixed a deprecated message where `Admin::$routes` was being dynamically defined
* Fixes to use non-deprecated methods in `ScssCompiler`

# v1.10.40
## 03/22/2023

Expand Down
4 changes: 2 additions & 2 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Admin Panel
slug: admin
type: plugin
version: 1.10.40
version: 1.10.41
description: Adds an advanced administration panel to manage your site
icon: empire
author:
Expand All @@ -15,7 +15,7 @@ docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md
license: MIT

dependencies:
- { name: grav, version: '>=1.7.32' }
- { name: grav, version: '>=1.7.41' }
- { name: form, version: '>=6.0.1' }
- { name: login, version: '>=3.7.0' }
- { name: email, version: '>=3.1.6' }
Expand Down
3 changes: 3 additions & 0 deletions classes/plugin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ class Admin
/** @var array */
public $languages_enabled = [];
/** @var Uri $uri */

/** @var array */
public $routes = [];
protected $uri;
/** @var array */
protected $pages = [];
Expand Down
11 changes: 9 additions & 2 deletions classes/plugin/ScssCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace Grav\Plugin\Admin;

use ScssPhp\ScssPhp\Compiler;
use ScssPhp\ScssPhp\ValueConverter;

class ScssCompiler
{
Expand All @@ -31,7 +32,13 @@ public function reset()

public function setVariables(array $variables)
{
$this->compiler()->setVariables($variables);
// $parsed = ValueConverter::fromPhp($variables);
$parsed = [];
foreach ($variables as $key => $value) {
$parsed[$key] = ValueConverter::parseValue($value);
}

$this->compiler()->addVariables($parsed);
return $this;
}

Expand All @@ -55,7 +62,7 @@ public function compileAll(array $input_paths, string $output_file)
foreach ($input_paths as $input_file) {
$input .= trim(file_get_contents($input_file)) . "\n\n";
}
$output = $this->compiler()->compile($input);
$output = $this->compiler()->compileString($input)->getCss();
file_put_contents($output_file, $output);
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"require": {
"php": "^7.3.6 || ^8.0",
"ext-json": "*",
"scssphp/scssphp": "^1.7",
"scssphp/scssphp": "^1.11",
"laminas/laminas-zendframework-bridge": "^1.4",
"p3k/picofeed": "@stable"
},
Expand Down
47 changes: 21 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions vendor/composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}

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

return $provided->matches($constraint);
Expand Down Expand Up @@ -328,7 +328,9 @@ private static function getInstalled()
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
/** @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 */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
Expand All @@ -340,12 +342,17 @@ private static function getInstalled()
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
/** @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 */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;

if (self::$installed !== array()) {
$installed[] = self::$installed;
}

return $installed;
}
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'getgrav/grav-plugin-admin',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '5f1b3e1e4a413bf5e45e99b8d5aa174b6806c12c',
'reference' => 'be85fb4194474700fbd8fe60b48b27613b47ce59',
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'getgrav/grav-plugin-admin' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '5f1b3e1e4a413bf5e45e99b8d5aa174b6806c12c',
'reference' => 'be85fb4194474700fbd8fe60b48b27613b47ce59',
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down

0 comments on commit 7d600ed

Please sign in to comment.