admin vendor updates

Signed-off-by: Andy Miller <rhuk@mac.com>
This commit is contained in:
Andy Miller
2024-12-09 17:12:10 -07:00
parent 12bdb5af4b
commit d4d02029d0
41 changed files with 577 additions and 6053 deletions

View File

@@ -22,20 +22,18 @@
"require": {
"php": "^7.3.6 || ^8.0",
"ext-json": "*",
"scssphp/scssphp": "^1.11",
"laminas/laminas-zendframework-bridge": "^1.4",
"p3k/picofeed": "@stable"
"scssphp/scssphp": "^1.13",
"p3k/picofeed": "^1.0"
},
"require-dev": {
"codeception/codeception": "^2.4",
"fzaninotto/faker": "^1.8",
"codeception/codeception": "^2.5",
"fzaninotto/faker": "^1.9",
"symfony/yaml": "~4.4",
"symfony/console": "~4.4",
"symfony/finder": "~4.4",
"symfony/event-dispatcher": "~4.4"
},
"replace": {
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*"
},
"autoload": {

532
composer.lock generated

File diff suppressed because it is too large Load Diff

5
vendor/bin/pscss vendored
View File

@@ -112,9 +112,8 @@ if (PHP_VERSION_ID < 80000) {
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss');
exit(0);
return include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss');
}
}
include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss';
return include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss';

View File

@@ -1,10 +0,0 @@
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'7e9bd612cc444b3eed788ebbe46263a0' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/autoload.php',
);

View File

@@ -7,7 +7,6 @@ $baseDir = dirname($vendorDir);
return array(
'ScssPhp\\ScssPhp\\' => array($vendorDir . '/scssphp/scssphp/src'),
'Laminas\\ZendFrameworkBridge\\' => array($vendorDir . '/laminas/laminas-zendframework-bridge/src'),
'Laminas\\Xml\\' => array($vendorDir . '/laminas/laminas-xml/src'),
'Grav\\Plugin\\Admin\\' => array($baseDir . '/classes/plugin'),
);

View File

@@ -33,18 +33,6 @@ class ComposerAutoloaderInit98c98c1c3d67f21a128f935fe4a74897
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}
return $loader;
}
}

View File

@@ -6,10 +6,6 @@ namespace Composer\Autoload;
class ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897
{
public static $files = array (
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
);
public static $prefixLengthsPsr4 = array (
'S' =>
array (
@@ -17,7 +13,6 @@ class ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897
),
'L' =>
array (
'Laminas\\ZendFrameworkBridge\\' => 28,
'Laminas\\Xml\\' => 12,
),
'G' =>
@@ -31,10 +26,6 @@ class ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897
array (
0 => __DIR__ . '/..' . '/scssphp/scssphp/src',
),
'Laminas\\ZendFrameworkBridge\\' =>
array (
0 => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src',
),
'Laminas\\Xml\\' =>
array (
0 => __DIR__ . '/..' . '/laminas/laminas-xml/src',

View File

@@ -63,71 +63,6 @@
],
"install-path": "../laminas/laminas-xml"
},
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.4.1",
"version_normalized": "1.4.1.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
"reference": "88bf037259869891afce6504cacc4f8a07b24d0f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/88bf037259869891afce6504cacc4f8a07b24d0f",
"reference": "88bf037259869891afce6504cacc4f8a07b24d0f",
"shasum": ""
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"psalm/plugin-phpunit": "^0.15.1",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.6"
},
"time": "2021-12-21T14:34:37+00:00",
"type": "library",
"extra": {
"laminas": {
"module": "Laminas\\ZendFrameworkBridge"
}
},
"installation-source": "dist",
"autoload": {
"files": [
"src/autoload.php"
],
"psr-4": {
"Laminas\\ZendFrameworkBridge\\": "src//"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Alias legacy ZF class names to Laminas Project equivalents.",
"keywords": [
"ZendFramework",
"autoloading",
"laminas",
"zf"
],
"support": {
"forum": "https://discourse.laminas.dev/",
"issues": "https://github.com/laminas/laminas-zendframework-bridge/issues",
"rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom",
"source": "https://github.com/laminas/laminas-zendframework-bridge"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"install-path": "../laminas/laminas-zendframework-bridge"
},
{
"name": "p3k/picofeed",
"version": "1.0.0",
@@ -191,17 +126,17 @@
},
{
"name": "scssphp/scssphp",
"version": "v1.11.0",
"version_normalized": "1.11.0.0",
"version": "v1.13.0",
"version_normalized": "1.13.0.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "33749d12c2569bb24071f94e9af828662dabb068"
"reference": "63d1157457e5554edf00b0c1fabab4c1511d2520"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/33749d12c2569bb24071f94e9af828662dabb068",
"reference": "33749d12c2569bb24071f94e9af828662dabb068",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/63d1157457e5554edf00b0c1fabab4c1511d2520",
"reference": "63d1157457e5554edf00b0c1fabab4c1511d2520",
"shasum": ""
},
"require": {
@@ -218,21 +153,21 @@
"thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5"
"zurb/foundation": "~6.7.0"
},
"suggest": {
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
},
"time": "2022-09-02T21:24:55+00:00",
"time": "2024-08-17T21:02:11+00:00",
"bin": [
"bin/pscss"
],
"type": "library",
"extra": {
"bamarni-bin": {
"forward-command": false,
"bin-links": false
"bin-links": false,
"forward-command": false
}
},
"installation-source": "dist",
@@ -268,7 +203,7 @@
],
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/v1.11.0"
"source": "https://github.com/scssphp/scssphp/tree/v1.13.0"
},
"install-path": "../scssphp/scssphp"
}

View File

@@ -3,7 +3,7 @@
'name' => 'getgrav/grav-plugin-admin',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '8c17ca7d75e271ee2cf4e38ae54e75d2ce8b9224',
'reference' => '12bdb5af4bd10e30e24d191b7ea1a78602a583fb',
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -13,7 +13,7 @@
'getgrav/grav-plugin-admin' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '8c17ca7d75e271ee2cf4e38ae54e75d2ce8b9224',
'reference' => '12bdb5af4bd10e30e24d191b7ea1a78602a583fb',
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -28,15 +28,6 @@
'aliases' => array(),
'dev_requirement' => false,
),
'laminas/laminas-zendframework-bridge' => array(
'pretty_version' => '1.4.1',
'version' => '1.4.1.0',
'reference' => '88bf037259869891afce6504cacc4f8a07b24d0f',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-zendframework-bridge',
'aliases' => array(),
'dev_requirement' => false,
),
'miniflux/picofeed' => array(
'dev_requirement' => false,
'replaced' => array(
@@ -53,20 +44,14 @@
'dev_requirement' => false,
),
'scssphp/scssphp' => array(
'pretty_version' => 'v1.11.0',
'version' => '1.11.0.0',
'reference' => '33749d12c2569bb24071f94e9af828662dabb068',
'pretty_version' => 'v1.13.0',
'version' => '1.13.0.0',
'reference' => '63d1157457e5554edf00b0c1fabab4c1511d2520',
'type' => 'library',
'install_path' => __DIR__ . '/../scssphp/scssphp',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-php72' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '*',
),
),
'symfony/polyfill-php73' => array(
'dev_requirement' => false,
'replaced' => array(

View File

@@ -1 +0,0 @@
community_bridge: laminas-project

View File

@@ -1,32 +0,0 @@
name: "Continuous Integration"
on:
pull_request:
push:
branches:
- '[0-9]+.[0-9]+.x'
- 'refs/pull/*'
jobs:
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1
qa:
name: QA Checks
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}

View File

@@ -1,61 +0,0 @@
# Alternate workflow example.
# This one is identical to the one in release-on-milestone.yml, with one change:
# the Release step uses the ORGANIZATION_ADMIN_TOKEN instead, to allow it to
# trigger a release workflow event. This is useful if you have other actions
# that intercept that event.
name: "Automatic Releases"
on:
milestone:
types:
- "closed"
jobs:
release:
name: "GIT tag, release & create merge-up PR"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Release"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:release"
env:
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Create Merge-Up Pull Request"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Create and/or Switch to new Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
env:
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Create new milestones"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

View File

@@ -1,5 +0,0 @@
{
"ignore_php_platform_requirements": {
"8.1": true
}
}

View File

@@ -1 +0,0 @@
Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/)

View File

@@ -1,26 +0,0 @@
Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of Laminas Foundation nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,30 +0,0 @@
# laminas-zendframework-bridge
[![Build Status](https://github.com/laminas/laminas-zendframework-bridge/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-zendframework-bridge/actions?query=workflow%3A"Continuous+Integration")
This library provides a custom autoloader that aliases legacy Zend Framework,
Apigility, and Expressive classes to their replacements under the Laminas
Project.
This package should be installed only if you are also using the composer plugin
that installs Laminas packages to replace ZF/Apigility/Expressive packages.
This tool supports:
* Zend Framework MVC projects, all v2 and v3 releases
* Apigility projects, all stable versions
* Expressive versions, all stable versions
## Installation
Run the following to install this library:
```bash
$ composer require laminas/laminas-zendframework-bridge
```
## Support
* [Issues](https://github.com/laminas/laminas-zendframework-bridge/issues/)
* [Forum](https://discourse.laminas.dev/)

View File

@@ -1,61 +0,0 @@
{
"name": "laminas/laminas-zendframework-bridge",
"description": "Alias legacy ZF class names to Laminas Project equivalents.",
"license": "BSD-3-Clause",
"keywords": [
"autoloading",
"laminas",
"zf",
"zendframework"
],
"support": {
"issues": "https://github.com/laminas/laminas-zendframework-bridge/issues",
"source": "https://github.com/laminas/laminas-zendframework-bridge",
"rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom",
"forum": "https://discourse.laminas.dev/"
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"psalm/plugin-phpunit": "^0.15.1",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.6"
},
"autoload": {
"files": [
"src/autoload.php"
],
"psr-4": {
"Laminas\\ZendFrameworkBridge\\": "src//"
}
},
"autoload-dev": {
"files": [
"test/classes.php"
],
"psr-4": {
"LaminasTest\\ZendFrameworkBridge\\": "test/",
"LaminasTest\\ZendFrameworkBridge\\TestAsset\\": "test/TestAsset/classes/",
"Laminas\\ApiTools\\": "test/TestAsset/LaminasApiTools/",
"Mezzio\\": "test/TestAsset/Mezzio/",
"Laminas\\": "test/TestAsset/Laminas/"
}
},
"extra": {
"laminas": {
"module": "Laminas\\ZendFrameworkBridge"
}
},
"config": {
"sort-packages": true
},
"scripts": {
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"static-analysis": "psalm --shepherd --stats",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,372 +0,0 @@
<?php
return [
// NEVER REWRITE
'zendframework/zendframework' => 'zendframework/zendframework',
'zend-developer-tools/toolbar/bjy' => 'zend-developer-tools/toolbar/bjy',
'zend-developer-tools/toolbar/doctrine' => 'zend-developer-tools/toolbar/doctrine',
// NAMESPACES
// Zend Framework components
'Zend\\AuraDi\\Config' => 'Laminas\\AuraDi\\Config',
'Zend\\Authentication' => 'Laminas\\Authentication',
'Zend\\Barcode' => 'Laminas\\Barcode',
'Zend\\Cache' => 'Laminas\\Cache',
'Zend\\Captcha' => 'Laminas\\Captcha',
'Zend\\Code' => 'Laminas\\Code',
'ZendCodingStandard\\Sniffs' => 'LaminasCodingStandard\\Sniffs',
'ZendCodingStandard\\Utils' => 'LaminasCodingStandard\\Utils',
'Zend\\ComponentInstaller' => 'Laminas\\ComponentInstaller',
'Zend\\Config' => 'Laminas\\Config',
'Zend\\ConfigAggregator' => 'Laminas\\ConfigAggregator',
'Zend\\ConfigAggregatorModuleManager' => 'Laminas\\ConfigAggregatorModuleManager',
'Zend\\ConfigAggregatorParameters' => 'Laminas\\ConfigAggregatorParameters',
'Zend\\Console' => 'Laminas\\Console',
'Zend\\ContainerConfigTest' => 'Laminas\\ContainerConfigTest',
'Zend\\Crypt' => 'Laminas\\Crypt',
'Zend\\Db' => 'Laminas\\Db',
'ZendDeveloperTools' => 'Laminas\\DeveloperTools',
'Zend\\Di' => 'Laminas\\Di',
'Zend\\Diactoros' => 'Laminas\\Diactoros',
'ZendDiagnostics\\Check' => 'Laminas\\Diagnostics\\Check',
'ZendDiagnostics\\Result' => 'Laminas\\Diagnostics\\Result',
'ZendDiagnostics\\Runner' => 'Laminas\\Diagnostics\\Runner',
'Zend\\Dom' => 'Laminas\\Dom',
'Zend\\Escaper' => 'Laminas\\Escaper',
'Zend\\EventManager' => 'Laminas\\EventManager',
'Zend\\Feed' => 'Laminas\\Feed',
'Zend\\File' => 'Laminas\\File',
'Zend\\Filter' => 'Laminas\\Filter',
'Zend\\Form' => 'Laminas\\Form',
'Zend\\Http' => 'Laminas\\Http',
'Zend\\HttpHandlerRunner' => 'Laminas\\HttpHandlerRunner',
'Zend\\Hydrator' => 'Laminas\\Hydrator',
'Zend\\I18n' => 'Laminas\\I18n',
'Zend\\InputFilter' => 'Laminas\\InputFilter',
'Zend\\Json' => 'Laminas\\Json',
'Zend\\Ldap' => 'Laminas\\Ldap',
'Zend\\Loader' => 'Laminas\\Loader',
'Zend\\Log' => 'Laminas\\Log',
'Zend\\Mail' => 'Laminas\\Mail',
'Zend\\Math' => 'Laminas\\Math',
'Zend\\Memory' => 'Laminas\\Memory',
'Zend\\Mime' => 'Laminas\\Mime',
'Zend\\ModuleManager' => 'Laminas\\ModuleManager',
'Zend\\Mvc' => 'Laminas\\Mvc',
'Zend\\Navigation' => 'Laminas\\Navigation',
'Zend\\Paginator' => 'Laminas\\Paginator',
'Zend\\Permissions' => 'Laminas\\Permissions',
'Zend\\Pimple\\Config' => 'Laminas\\Pimple\\Config',
'Zend\\ProblemDetails' => 'Mezzio\\ProblemDetails',
'Zend\\ProgressBar' => 'Laminas\\ProgressBar',
'Zend\\Psr7Bridge' => 'Laminas\\Psr7Bridge',
'Zend\\Router' => 'Laminas\\Router',
'Zend\\Serializer' => 'Laminas\\Serializer',
'Zend\\Server' => 'Laminas\\Server',
'Zend\\ServiceManager' => 'Laminas\\ServiceManager',
'ZendService\\ReCaptcha' => 'Laminas\\ReCaptcha',
'ZendService\\Twitter' => 'Laminas\\Twitter',
'Zend\\Session' => 'Laminas\\Session',
'Zend\\SkeletonInstaller' => 'Laminas\\SkeletonInstaller',
'Zend\\Soap' => 'Laminas\\Soap',
'Zend\\Stdlib' => 'Laminas\\Stdlib',
'Zend\\Stratigility' => 'Laminas\\Stratigility',
'Zend\\Tag' => 'Laminas\\Tag',
'Zend\\Test' => 'Laminas\\Test',
'Zend\\Text' => 'Laminas\\Text',
'Zend\\Uri' => 'Laminas\\Uri',
'Zend\\Validator' => 'Laminas\\Validator',
'Zend\\View' => 'Laminas\\View',
'ZendXml' => 'Laminas\\Xml',
'Zend\\Xml2Json' => 'Laminas\\Xml2Json',
'Zend\\XmlRpc' => 'Laminas\\XmlRpc',
'ZendOAuth' => 'Laminas\\OAuth',
// class ZendAcl in zend-expressive-authorization-acl
'ZendAcl' => 'LaminasAcl',
'Zend\\Expressive\\Authorization\\Acl\\ZendAcl' => 'Mezzio\\Authorization\\Acl\\LaminasAcl',
// class ZendHttpClientDecorator in zend-feed
'ZendHttp' => 'LaminasHttp',
// class ZendModuleProvider in zend-config-aggregator-modulemanager
'ZendModule' => 'LaminasModule',
// class ZendRbac in zend-expressive-authorization-rbac
'ZendRbac' => 'LaminasRbac',
'Zend\\Expressive\\Authorization\\Rbac\\ZendRbac' => 'Mezzio\\Authorization\\Rbac\\LaminasRbac',
// class ZendRouter in zend-expressive-router-zendrouter
'ZendRouter' => 'LaminasRouter',
'Zend\\Expressive\\Router\\ZendRouter' => 'Mezzio\\Router\\LaminasRouter',
// class ZendViewRenderer in zend-expressive-zendviewrenderer
'ZendViewRenderer' => 'LaminasViewRenderer',
'Zend\\Expressive\\ZendView\\ZendViewRenderer' => 'Mezzio\\LaminasView\\LaminasViewRenderer',
'a\\Zend' => 'a\\Zend',
'b\\Zend' => 'b\\Zend',
'c\\Zend' => 'c\\Zend',
'd\\Zend' => 'd\\Zend',
'e\\Zend' => 'e\\Zend',
'f\\Zend' => 'f\\Zend',
'g\\Zend' => 'g\\Zend',
'h\\Zend' => 'h\\Zend',
'i\\Zend' => 'i\\Zend',
'j\\Zend' => 'j\\Zend',
'k\\Zend' => 'k\\Zend',
'l\\Zend' => 'l\\Zend',
'm\\Zend' => 'm\\Zend',
'n\\Zend' => 'n\\Zend',
'o\\Zend' => 'o\\Zend',
'p\\Zend' => 'p\\Zend',
'q\\Zend' => 'q\\Zend',
'r\\Zend' => 'r\\Zend',
's\\Zend' => 's\\Zend',
't\\Zend' => 't\\Zend',
'u\\Zend' => 'u\\Zend',
'v\\Zend' => 'v\\Zend',
'w\\Zend' => 'w\\Zend',
'x\\Zend' => 'x\\Zend',
'y\\Zend' => 'y\\Zend',
'z\\Zend' => 'z\\Zend',
// Expressive
'Zend\\Expressive' => 'Mezzio',
'ZendAuthentication' => 'LaminasAuthentication',
'ZendAcl' => 'LaminasAcl',
'ZendRbac' => 'LaminasRbac',
'ZendRouter' => 'LaminasRouter',
'ExpressiveUrlGenerator' => 'MezzioUrlGenerator',
'ExpressiveInstaller' => 'MezzioInstaller',
// Apigility
'ZF\\Apigility' => 'Laminas\\ApiTools',
'ZF\\ApiProblem' => 'Laminas\\ApiTools\\ApiProblem',
'ZF\\AssetManager' => 'Laminas\\ApiTools\\AssetManager',
'ZF\\ComposerAutoloading' => 'Laminas\\ComposerAutoloading',
'ZF\\Configuration' => 'Laminas\\ApiTools\\Configuration',
'ZF\\ContentNegotiation' => 'Laminas\\ApiTools\\ContentNegotiation',
'ZF\\ContentValidation' => 'Laminas\\ApiTools\\ContentValidation',
'ZF\\DevelopmentMode' => 'Laminas\\DevelopmentMode',
'ZF\\Doctrine\\QueryBuilder' => 'Laminas\\ApiTools\\Doctrine\\QueryBuilder',
'ZF\\Hal' => 'Laminas\\ApiTools\\Hal',
'ZF\\HttpCache' => 'Laminas\\ApiTools\\HttpCache',
'ZF\\MvcAuth' => 'Laminas\\ApiTools\\MvcAuth',
'ZF\\OAuth2' => 'Laminas\\ApiTools\\OAuth2',
'ZF\\Rest' => 'Laminas\\ApiTools\\Rest',
'ZF\\Rpc' => 'Laminas\\ApiTools\\Rpc',
'ZF\\Versioning' => 'Laminas\\ApiTools\\Versioning',
'a\\ZF' => 'a\\ZF',
'b\\ZF' => 'b\\ZF',
'c\\ZF' => 'c\\ZF',
'd\\ZF' => 'd\\ZF',
'e\\ZF' => 'e\\ZF',
'f\\ZF' => 'f\\ZF',
'g\\ZF' => 'g\\ZF',
'h\\ZF' => 'h\\ZF',
'i\\ZF' => 'i\\ZF',
'j\\ZF' => 'j\\ZF',
'k\\ZF' => 'k\\ZF',
'l\\ZF' => 'l\\ZF',
'm\\ZF' => 'm\\ZF',
'n\\ZF' => 'n\\ZF',
'o\\ZF' => 'o\\ZF',
'p\\ZF' => 'p\\ZF',
'q\\ZF' => 'q\\ZF',
'r\\ZF' => 'r\\ZF',
's\\ZF' => 's\\ZF',
't\\ZF' => 't\\ZF',
'u\\ZF' => 'u\\ZF',
'v\\ZF' => 'v\\ZF',
'w\\ZF' => 'w\\ZF',
'x\\ZF' => 'x\\ZF',
'y\\ZF' => 'y\\ZF',
'z\\ZF' => 'z\\ZF',
'ApigilityModuleInterface' => 'ApiToolsModuleInterface',
'ApigilityProviderInterface' => 'ApiToolsProviderInterface',
'ApigilityVersionController' => 'ApiToolsVersionController',
// PACKAGES
// ZF components, MVC
'zendframework/skeleton-application' => 'laminas/skeleton-application',
'zendframework/zend-auradi-config' => 'laminas/laminas-auradi-config',
'zendframework/zend-authentication' => 'laminas/laminas-authentication',
'zendframework/zend-barcode' => 'laminas/laminas-barcode',
'zendframework/zend-cache' => 'laminas/laminas-cache',
'zendframework/zend-captcha' => 'laminas/laminas-captcha',
'zendframework/zend-code' => 'laminas/laminas-code',
'zendframework/zend-coding-standard' => 'laminas/laminas-coding-standard',
'zendframework/zend-component-installer' => 'laminas/laminas-component-installer',
'zendframework/zend-composer-autoloading' => 'laminas/laminas-composer-autoloading',
'zendframework/zend-config-aggregator' => 'laminas/laminas-config-aggregator',
'zendframework/zend-config' => 'laminas/laminas-config',
'zendframework/zend-console' => 'laminas/laminas-console',
'zendframework/zend-container-config-test' => 'laminas/laminas-container-config-test',
'zendframework/zend-crypt' => 'laminas/laminas-crypt',
'zendframework/zend-db' => 'laminas/laminas-db',
'zendframework/zend-developer-tools' => 'laminas/laminas-developer-tools',
'zendframework/zend-diactoros' => 'laminas/laminas-diactoros',
'zendframework/zenddiagnostics' => 'laminas/laminas-diagnostics',
'zendframework/zend-di' => 'laminas/laminas-di',
'zendframework/zend-dom' => 'laminas/laminas-dom',
'zendframework/zend-escaper' => 'laminas/laminas-escaper',
'zendframework/zend-eventmanager' => 'laminas/laminas-eventmanager',
'zendframework/zend-feed' => 'laminas/laminas-feed',
'zendframework/zend-file' => 'laminas/laminas-file',
'zendframework/zend-filter' => 'laminas/laminas-filter',
'zendframework/zend-form' => 'laminas/laminas-form',
'zendframework/zend-httphandlerrunner' => 'laminas/laminas-httphandlerrunner',
'zendframework/zend-http' => 'laminas/laminas-http',
'zendframework/zend-hydrator' => 'laminas/laminas-hydrator',
'zendframework/zend-i18n' => 'laminas/laminas-i18n',
'zendframework/zend-i18n-resources' => 'laminas/laminas-i18n-resources',
'zendframework/zend-inputfilter' => 'laminas/laminas-inputfilter',
'zendframework/zend-json' => 'laminas/laminas-json',
'zendframework/zend-json-server' => 'laminas/laminas-json-server',
'zendframework/zend-ldap' => 'laminas/laminas-ldap',
'zendframework/zend-loader' => 'laminas/laminas-loader',
'zendframework/zend-log' => 'laminas/laminas-log',
'zendframework/zend-mail' => 'laminas/laminas-mail',
'zendframework/zend-math' => 'laminas/laminas-math',
'zendframework/zend-memory' => 'laminas/laminas-memory',
'zendframework/zend-mime' => 'laminas/laminas-mime',
'zendframework/zend-modulemanager' => 'laminas/laminas-modulemanager',
'zendframework/zend-mvc' => 'laminas/laminas-mvc',
'zendframework/zend-navigation' => 'laminas/laminas-navigation',
'zendframework/zend-oauth' => 'laminas/laminas-oauth',
'zendframework/zend-paginator' => 'laminas/laminas-paginator',
'zendframework/zend-permissions-acl' => 'laminas/laminas-permissions-acl',
'zendframework/zend-permissions-rbac' => 'laminas/laminas-permissions-rbac',
'zendframework/zend-pimple-config' => 'laminas/laminas-pimple-config',
'zendframework/zend-progressbar' => 'laminas/laminas-progressbar',
'zendframework/zend-psr7bridge' => 'laminas/laminas-psr7bridge',
'zendframework/zend-recaptcha' => 'laminas/laminas-recaptcha',
'zendframework/zend-router' => 'laminas/laminas-router',
'zendframework/zend-serializer' => 'laminas/laminas-serializer',
'zendframework/zend-server' => 'laminas/laminas-server',
'zendframework/zend-servicemanager' => 'laminas/laminas-servicemanager',
'zendframework/zendservice-recaptcha' => 'laminas/laminas-recaptcha',
'zendframework/zendservice-twitter' => 'laminas/laminas-twitter',
'zendframework/zend-session' => 'laminas/laminas-session',
'zendframework/zend-skeleton-installer' => 'laminas/laminas-skeleton-installer',
'zendframework/zend-soap' => 'laminas/laminas-soap',
'zendframework/zend-stdlib' => 'laminas/laminas-stdlib',
'zendframework/zend-stratigility' => 'laminas/laminas-stratigility',
'zendframework/zend-tag' => 'laminas/laminas-tag',
'zendframework/zend-test' => 'laminas/laminas-test',
'zendframework/zend-text' => 'laminas/laminas-text',
'zendframework/zend-uri' => 'laminas/laminas-uri',
'zendframework/zend-validator' => 'laminas/laminas-validator',
'zendframework/zend-view' => 'laminas/laminas-view',
'zendframework/zend-xml2json' => 'laminas/laminas-xml2json',
'zendframework/zend-xml' => 'laminas/laminas-xml',
'zendframework/zend-xmlrpc' => 'laminas/laminas-xmlrpc',
// Expressive packages
'zendframework/zend-expressive' => 'mezzio/mezzio',
'zendframework/zend-expressive-zendrouter' => 'mezzio/mezzio-laminasrouter',
'zendframework/zend-problem-details' => 'mezzio/mezzio-problem-details',
'zendframework/zend-expressive-zendviewrenderer' => 'mezzio/mezzio-laminasviewrenderer',
// Apigility packages
'zfcampus/apigility-documentation' => 'laminas-api-tools/documentation',
'zfcampus/statuslib-example' => 'laminas-api-tools/statuslib-example',
'zfcampus/zf-apigility' => 'laminas-api-tools/api-tools',
'zfcampus/zf-api-problem' => 'laminas-api-tools/api-tools-api-problem',
'zfcampus/zf-asset-manager' => 'laminas-api-tools/api-tools-asset-manager',
'zfcampus/zf-configuration' => 'laminas-api-tools/api-tools-configuration',
'zfcampus/zf-content-negotiation' => 'laminas-api-tools/api-tools-content-negotiation',
'zfcampus/zf-content-validation' => 'laminas-api-tools/api-tools-content-validation',
'zfcampus/zf-development-mode' => 'laminas/laminas-development-mode',
'zfcampus/zf-doctrine-querybuilder' => 'laminas-api-tools/api-tools-doctrine-querybuilder',
'zfcampus/zf-hal' => 'laminas-api-tools/api-tools-hal',
'zfcampus/zf-http-cache' => 'laminas-api-tools/api-tools-http-cache',
'zfcampus/zf-mvc-auth' => 'laminas-api-tools/api-tools-mvc-auth',
'zfcampus/zf-oauth2' => 'laminas-api-tools/api-tools-oauth2',
'zfcampus/zf-rest' => 'laminas-api-tools/api-tools-rest',
'zfcampus/zf-rpc' => 'laminas-api-tools/api-tools-rpc',
'zfcampus/zf-versioning' => 'laminas-api-tools/api-tools-versioning',
// CONFIG KEYS, SCRIPT NAMES, ETC
// ZF components
'::fromZend' => '::fromLaminas', // psr7bridge
'::toZend' => '::toLaminas', // psr7bridge
'use_zend_loader' => 'use_laminas_loader', // zend-modulemanager
'zend-config' => 'laminas-config',
'zend-developer-tools/' => 'laminas-developer-tools/',
'zend-tag-cloud' => 'laminas-tag-cloud',
'zenddevelopertools' => 'laminas-developer-tools',
'zendbarcode' => 'laminasbarcode',
'ZendBarcode' => 'LaminasBarcode',
'zendcache' => 'laminascache',
'ZendCache' => 'LaminasCache',
'zendconfig' => 'laminasconfig',
'ZendConfig' => 'LaminasConfig',
'zendfeed' => 'laminasfeed',
'ZendFeed' => 'LaminasFeed',
'zendfilter' => 'laminasfilter',
'ZendFilter' => 'LaminasFilter',
'zendform' => 'laminasform',
'ZendForm' => 'LaminasForm',
'zendi18n' => 'laminasi18n',
'ZendI18n' => 'LaminasI18n',
'zendinputfilter' => 'laminasinputfilter',
'ZendInputFilter' => 'LaminasInputFilter',
'zendlog' => 'laminaslog',
'ZendLog' => 'LaminasLog',
'zendmail' => 'laminasmail',
'ZendMail' => 'LaminasMail',
'zendmvc' => 'laminasmvc',
'ZendMvc' => 'LaminasMvc',
'zendpaginator' => 'laminaspaginator',
'ZendPaginator' => 'LaminasPaginator',
'zendserializer' => 'laminasserializer',
'ZendSerializer' => 'LaminasSerializer',
'zendtag' => 'laminastag',
'ZendTag' => 'LaminasTag',
'zendtext' => 'laminastext',
'ZendText' => 'LaminasText',
'zendvalidator' => 'laminasvalidator',
'ZendValidator' => 'LaminasValidator',
'zendview' => 'laminasview',
'ZendView' => 'LaminasView',
'zend-framework.flf' => 'laminas-project.flf',
// Expressive-related
"'zend-expressive'" => "'mezzio'",
'"zend-expressive"' => '"mezzio"',
'zend-expressive.' => 'mezzio.',
'zend-expressive-authorization' => 'mezzio-authorization',
'zend-expressive-hal' => 'mezzio-hal',
'zend-expressive-session' => 'mezzio-session',
'zend-expressive-swoole' => 'mezzio-swoole',
'zend-expressive-tooling' => 'mezzio-tooling',
// Apigility-related
"'zf-apigility'" => "'api-tools'",
'"zf-apigility"' => '"api-tools"',
'zf-apigility/' => 'api-tools/',
'zf-apigility-admin' => 'api-tools-admin',
'zf-content-negotiation' => 'api-tools-content-negotiation',
'zf-hal' => 'api-tools-hal',
'zf-rest' => 'api-tools-rest',
'zf-rpc' => 'api-tools-rpc',
'zf-content-validation' => 'api-tools-content-validation',
'zf-apigility-ui' => 'api-tools-ui',
'zf-apigility-documentation-blueprint' => 'api-tools-documentation-blueprint',
'zf-apigility-documentation-swagger' => 'api-tools-documentation-swagger',
'zf-apigility-welcome' => 'api-tools-welcome',
'zf-api-problem' => 'api-tools-api-problem',
'zf-configuration' => 'api-tools-configuration',
'zf-http-cache' => 'api-tools-http-cache',
'zf-mvc-auth' => 'api-tools-mvc-auth',
'zf-oauth2' => 'api-tools-oauth2',
'zf-versioning' => 'api-tools-versioning',
'ZfApigilityDoctrineQueryProviderManager' => 'LaminasApiToolsDoctrineQueryProviderManager',
'ZfApigilityDoctrineQueryCreateFilterManager' => 'LaminasApiToolsDoctrineQueryCreateFilterManager',
'zf-apigility-doctrine' => 'api-tools-doctrine',
'zf-development-mode' => 'laminas-development-mode',
'zf-doctrine-querybuilder' => 'api-tools-doctrine-querybuilder',
// 3rd party Apigility packages
'api-skeletons/zf-' => 'api-skeletons/zf-', // api-skeletons packages
'zf-oauth2-' => 'zf-oauth2-', // api-skeletons OAuth2-related packages
'ZF\\OAuth2\\Client' => 'ZF\\OAuth2\\Client', // api-skeletons/zf-oauth2-client
'ZF\\OAuth2\\Doctrine' => 'ZF\\OAuth2\\Doctrine', // api-skeletons/zf-oauth2-doctrine
];

View File

@@ -1,345 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.9.3@4c262932602b9bbab5020863d1eb22d49de0dbf4">
<file src="config/replacements.php">
<DuplicateArrayKey occurrences="3">
<code>'ZendAcl' =&gt; 'LaminasAcl'</code>
<code>'ZendRbac' =&gt; 'LaminasRbac'</code>
<code>'ZendRouter' =&gt; 'LaminasRouter'</code>
</DuplicateArrayKey>
</file>
<file src="src/Autoloader.php">
<MissingClosureParamType occurrences="2">
<code>$class</code>
<code>$class</code>
</MissingClosureParamType>
<MissingReturnType occurrences="1">
<code>load</code>
</MissingReturnType>
<MixedArgument occurrences="7">
<code>$class</code>
<code>$class</code>
<code>$class</code>
<code>$class</code>
<code>$class</code>
<code>$class</code>
<code>$class</code>
</MixedArgument>
<MixedArgumentTypeCoercion occurrences="2"/>
<MixedArrayOffset occurrences="1">
<code>$loaded[$class]</code>
</MixedArrayOffset>
<MixedOperand occurrences="2">
<code>$namespaces[$check]</code>
<code>$namespaces[$check]</code>
</MixedOperand>
</file>
<file src="src/ConfigPostProcessor.php">
<InvalidArgument occurrences="1">
<code>$keys</code>
</InvalidArgument>
<MissingClosureParamType occurrences="4">
<code>$value</code>
<code>$value</code>
<code>$value</code>
<code>$value</code>
</MissingClosureParamType>
<MissingClosureReturnType occurrences="4">
<code>function ($value) {</code>
<code>function ($value) {</code>
<code>function ($value, array $keys) {</code>
<code>function ($value, array $keys) {</code>
</MissingClosureReturnType>
<MissingReturnType occurrences="3">
<code>replaceDependencyConfiguration</code>
<code>replaceDependencyFactories</code>
<code>replaceDependencyServices</code>
</MissingReturnType>
<MixedArgument occurrences="5">
<code>$config</code>
<code>$newKey</code>
<code>$newKey</code>
<code>$newKey</code>
<code>$target</code>
</MixedArgument>
<MixedArgumentTypeCoercion occurrences="1">
<code>[$key]</code>
</MixedArgumentTypeCoercion>
<MixedArrayAssignment occurrences="4">
<code>$config[$key]</code>
<code>$config['aliases'][$alias]</code>
<code>$config['aliases'][$service]</code>
<code>$config['aliases'][$service]</code>
</MixedArrayAssignment>
<MixedArrayOffset occurrences="7">
<code>$aliases[$name]</code>
<code>$config[$key]</code>
<code>$keys[$key]</code>
<code>$rewritten[$newKey]</code>
<code>$rewritten[$newKey]</code>
<code>$rewritten[$newKey]</code>
<code>$this-&gt;exactReplacements[$value]</code>
</MixedArrayOffset>
<MixedArrayTypeCoercion occurrences="1">
<code>$aliases[$name]</code>
</MixedArrayTypeCoercion>
<MixedAssignment occurrences="26">
<code>$a[$key]</code>
<code>$a[$key]</code>
<code>$a[]</code>
<code>$config</code>
<code>$config</code>
<code>$config[$key]</code>
<code>$config['factories'][$replacedService]</code>
<code>$config['services'][$replacedService]</code>
<code>$data</code>
<code>$factory</code>
<code>$factory</code>
<code>$key</code>
<code>$key</code>
<code>$name</code>
<code>$newKey</code>
<code>$newValue</code>
<code>$notIn[]</code>
<code>$result</code>
<code>$rewritten[$key]</code>
<code>$rewritten[$newKey]</code>
<code>$rewritten[$newKey][]</code>
<code>$serviceInstance</code>
<code>$serviceInstance</code>
<code>$target</code>
<code>$value</code>
<code>$value</code>
</MixedAssignment>
</file>
<file src="src/Module.php">
<MissingReturnType occurrences="2">
<code>init</code>
<code>onMergeConfig</code>
</MissingReturnType>
<UndefinedDocblockClass occurrences="2">
<code>ModuleEvent</code>
<code>ModuleManager</code>
</UndefinedDocblockClass>
</file>
<file src="src/Replacements.php">
<MixedArgument occurrences="2">
<code>$replacement</code>
<code>$replacement</code>
</MixedArgument>
<MixedArgumentTypeCoercion occurrences="3">
<code>$original</code>
<code>$original</code>
<code>$original</code>
</MixedArgumentTypeCoercion>
<MixedAssignment occurrences="1">
<code>$replacement</code>
</MixedAssignment>
<MixedPropertyTypeCoercion occurrences="3">
<code>$this-&gt;replacements</code>
<code>$this-&gt;replacements</code>
</MixedPropertyTypeCoercion>
</file>
<file src="test/AutoloaderTest.php">
<InvalidStringClass occurrences="1">
<code>new $legacy()</code>
</InvalidStringClass>
<MissingReturnType occurrences="3">
<code>testLegacyClassIsAliasToLaminas</code>
<code>testReverseAliasCreated</code>
<code>testTypeHint</code>
</MissingReturnType>
<PossiblyInvalidArgument occurrences="1">
<code>testLegacyClassIsAliasToLaminas</code>
</PossiblyInvalidArgument>
</file>
<file src="test/ConfigPostProcessorTest.php">
<MissingReturnType occurrences="4">
<code>invalidServiceManagerConfiguration</code>
<code>testRewritesNestedKeys</code>
<code>testServiceManagerServiceInstancesCanBeHandled</code>
<code>testWillSkipInvalidConfigurations</code>
</MissingReturnType>
<MixedArgument occurrences="1">
<code>$config</code>
</MixedArgument>
<MixedAssignment occurrences="2">
<code>$config</code>
<code>$expected</code>
</MixedAssignment>
<MixedInferredReturnType occurrences="1">
<code>iterable</code>
</MixedInferredReturnType>
<UnresolvableInclude occurrences="2">
<code>require $configLocation</code>
<code>require $expectedResultLocation</code>
</UnresolvableInclude>
</file>
<file src="test/ModuleTest.php">
<InvalidArgument occurrences="2">
<code>$event</code>
<code>$moduleManager</code>
</InvalidArgument>
<MissingReturnType occurrences="2">
<code>testInitRegistersListenerWithEventManager</code>
<code>testOnMergeConfigProcessesAndReplacesConfigurationPulledFromListener</code>
</MissingReturnType>
<MixedArgument occurrences="1">
<code>$config</code>
</MixedArgument>
<MixedAssignment occurrences="2">
<code>$config</code>
<code>$expected</code>
</MixedAssignment>
<MixedInferredReturnType occurrences="1">
<code>iterable</code>
</MixedInferredReturnType>
<UnresolvableInclude occurrences="2">
<code>require $configFile</code>
<code>require $expectationsFile</code>
</UnresolvableInclude>
</file>
<file src="test/ReplacementsTest.php">
<MissingReturnType occurrences="1">
<code>testEdgeCases</code>
</MissingReturnType>
<MixedInferredReturnType occurrences="1">
<code>iterable</code>
</MixedInferredReturnType>
</file>
<file src="test/TestAsset/ConfigPostProcessor/AbstractFactories.php">
<UndefinedClass occurrences="4">
<code>ConfigAbstractFactory</code>
<code>ConfigAbstractFactory</code>
<code>InvokableFactory</code>
<code>InvokableFactory</code>
</UndefinedClass>
</file>
<file src="test/TestAsset/ConfigPostProcessor/CyclicalAliasing.php">
<DuplicateArrayKey occurrences="1">
<code>'Zend\Db\Adapter\Adapter' =&gt; 'ZF\Apigility\DbConnectedAdapter'</code>
</DuplicateArrayKey>
</file>
<file src="test/TestAsset/ConfigPostProcessor/ExpressiveSlimRouterConfig.php">
<UndefinedClass occurrences="2">
<code>Factory\SlimRouterFactory</code>
<code>RouterInterface</code>
</UndefinedClass>
</file>
<file src="test/TestAsset/ConfigPostProcessor/LazyServices.php">
<UndefinedClass occurrences="1">
<code>LazyServiceFactory</code>
</UndefinedClass>
</file>
<file src="test/TestAsset/ConfigPostProcessor/MwopNetAppConfig.php">
<UndefinedClass occurrences="42">
<code>CacheItemPoolInterface</code>
<code>ConfigFactory</code>
<code>ConfigFactory</code>
<code>ConfigFactory</code>
<code>ConfigFactory</code>
<code>ConfigFactory</code>
<code>ConfigFactory</code>
<code>Csp</code>
<code>DisplayPostHandler</code>
<code>Engine</code>
<code>EventDispatcherInterface</code>
<code>Factory\CachePoolFactory</code>
<code>Factory\EventDispatcherFactory</code>
<code>Factory\MailTransport</code>
<code>Factory\PlatesFunctionsDelegator</code>
<code>FeedReaderHttpClientInterface</code>
<code>Feed\HttpPlugClientFactory</code>
<code>Handler\ComicsPageHandler</code>
<code>Handler\ComicsPageHandlerFactory</code>
<code>Handler\HomePageHandler</code>
<code>Handler\HomePageHandlerFactory</code>
<code>Handler\PageHandlerFactory</code>
<code>Handler\PageHandlerFactory</code>
<code>Handler\ResumePageHandler</code>
<code>Handler\ResumePageHandler</code>
<code>Middleware\ContentSecurityPolicyMiddlewareFactory</code>
<code>Middleware\DisplayBlogPostHandlerDelegator</code>
<code>Middleware\RedirectAmpPagesMiddleware</code>
<code>Middleware\RedirectAmpPagesMiddlewareFactory</code>
<code>Middleware\RedirectsMiddleware</code>
<code>Middleware\RedirectsMiddleware</code>
<code>Middleware\XClacksOverheadMiddleware</code>
<code>Middleware\XClacksOverheadMiddleware</code>
<code>Middleware\XPoweredByMiddleware</code>
<code>Middleware\XPoweredByMiddleware</code>
<code>RequestFactory</code>
<code>RequestFactoryInterface</code>
<code>ResponseFactory</code>
<code>ResponseFactoryInterface</code>
<code>SessionCachePool</code>
<code>SessionCachePool</code>
<code>SessionCachePoolFactory</code>
</UndefinedClass>
</file>
<file src="test/TestAsset/Replacements/TestClass.php">
<UndefinedClass occurrences="1">
<code>\Zend\Expressive\Router</code>
</UndefinedClass>
</file>
<file src="test/TestAsset/Replacements/ZFOAuth2Client.php">
<UndefinedClass occurrences="1">
<code>OAuth2Client</code>
</UndefinedClass>
</file>
<file src="test/TestAsset/classes/ConfigListener.php">
<MissingReturnType occurrences="1">
<code>setMergedConfig</code>
</MissingReturnType>
</file>
<file src="test/TestAsset/classes/EventManager.php">
<InvalidArgument occurrences="1">
<code>$listener</code>
</InvalidArgument>
<MissingPropertyType occurrences="1">
<code>$listeners</code>
</MissingPropertyType>
<MissingReturnType occurrences="1">
<code>attach</code>
</MissingReturnType>
<MixedArgument occurrences="1">
<code>$this-&gt;listeners[$eventName]</code>
</MixedArgument>
<MixedArrayAccess occurrences="1">
<code>$this-&gt;listeners[$eventName]</code>
</MixedArrayAccess>
<MixedArrayAssignment occurrences="1">
<code>$this-&gt;listeners[$eventName]</code>
</MixedArrayAssignment>
<MixedInferredReturnType occurrences="1">
<code>array</code>
</MixedInferredReturnType>
<MixedReturnStatement occurrences="1">
<code>$this-&gt;listeners</code>
</MixedReturnStatement>
</file>
<file src="test/TestAsset/classes/ModuleEvent.php">
<MissingPropertyType occurrences="1">
<code>$listener</code>
</MissingPropertyType>
<MixedInferredReturnType occurrences="1">
<code>ConfigListener</code>
</MixedInferredReturnType>
<MixedReturnStatement occurrences="1">
<code>$this-&gt;listener</code>
</MixedReturnStatement>
</file>
<file src="test/TestAsset/classes/ModuleManager.php">
<MixedInferredReturnType occurrences="1">
<code>EventManager</code>
</MixedInferredReturnType>
<MixedReturnStatement occurrences="1">
<code>$this-&gt;eventManager</code>
</MixedReturnStatement>
<UndefinedThisPropertyAssignment occurrences="1">
<code>$this-&gt;eventManager</code>
</UndefinedThisPropertyAssignment>
<UndefinedThisPropertyFetch occurrences="1">
<code>$this-&gt;eventManager</code>
</UndefinedThisPropertyFetch>
</file>
</files>

View File

@@ -1,33 +0,0 @@
<?xml version="1.0"?>
<psalm
totallyTyped="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src"/>
<directory name="test"/>
<ignoreFiles>
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>
<issueHandlers>
<InternalMethod>
<errorLevel type="suppress">
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::method"/>
</errorLevel>
<errorLevel type="suppress">
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturn"/>
</errorLevel>
<errorLevel type="suppress">
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::with"/>
</errorLevel>
</InternalMethod>
</issueHandlers>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
</psalm>

View File

@@ -1,181 +0,0 @@
<?php
namespace Laminas\ZendFrameworkBridge;
use ArrayObject;
use Composer\Autoload\ClassLoader;
use RuntimeException;
use function array_values;
use function class_alias;
use function class_exists;
use function explode;
use function file_exists;
use function getenv;
use function interface_exists;
use function spl_autoload_register;
use function strlen;
use function strtr;
use function substr;
use function trait_exists;
/**
* Alias legacy Zend Framework project classes/interfaces/traits to Laminas equivalents.
*/
class Autoloader
{
private const UPSTREAM_COMPOSER_VENDOR_DIRECTORY = __DIR__ . '/../../..';
private const LOCAL_COMPOSER_VENDOR_DIRECTORY = __DIR__ . '/../vendor';
/**
* Attach autoloaders for managing legacy ZF artifacts.
*
* We attach two autoloaders:
*
* - The first is _prepended_ to handle new classes and add aliases for
* legacy classes. PHP expects any interfaces implemented, classes
* extended, or traits used when declaring class_alias() to exist and/or
* be autoloadable already at the time of declaration. If not, it will
* raise a fatal error. This autoloader helps mitigate errors in such
* situations.
*
* - The second is _appended_ in order to create aliases for legacy
* classes.
*/
public static function load()
{
$loaded = new ArrayObject([]);
$classLoader = self::getClassLoader();
if ($classLoader === null) {
return;
}
spl_autoload_register(self::createPrependAutoloader(
RewriteRules::namespaceReverse(),
$classLoader,
$loaded
), true, true);
spl_autoload_register(self::createAppendAutoloader(
RewriteRules::namespaceRewrite(),
$loaded
));
}
private static function getClassLoader(): ?ClassLoader
{
$composerVendorDirectory = getenv('COMPOSER_VENDOR_DIR');
if (is_string($composerVendorDirectory)) {
return self::getClassLoaderFromVendorDirectory($composerVendorDirectory);
}
return self::getClassLoaderFromVendorDirectory(self::UPSTREAM_COMPOSER_VENDOR_DIRECTORY)
?? self::getClassLoaderFromVendorDirectory(self::LOCAL_COMPOSER_VENDOR_DIRECTORY);
}
/**
* @return callable
*/
private static function createPrependAutoloader(array $namespaces, ClassLoader $classLoader, ArrayObject $loaded)
{
/**
* @param string $class Class name to autoload
* @return void
*/
return static function ($class) use ($namespaces, $classLoader, $loaded) {
if (isset($loaded[$class])) {
return;
}
$segments = explode('\\', $class);
$i = 0;
$check = '';
while (isset($segments[$i + 1], $namespaces[$check . $segments[$i] . '\\'])) {
$check .= $segments[$i] . '\\';
++$i;
}
if ($check === '') {
return;
}
if ($classLoader->loadClass($class)) {
$legacy = $namespaces[$check]
. strtr(substr($class, strlen($check)), [
'ApiTools' => 'Apigility',
'Mezzio' => 'Expressive',
'Laminas' => 'Zend',
]);
class_alias($class, $legacy);
}
};
}
/**
* @return callable
*/
private static function createAppendAutoloader(array $namespaces, ArrayObject $loaded)
{
/**
* @param string $class Class name to autoload
* @return void
*/
return static function ($class) use ($namespaces, $loaded) {
$segments = explode('\\', $class);
if ($segments[0] === 'ZendService' && isset($segments[1])) {
$segments[0] .= '\\' . $segments[1];
unset($segments[1]);
$segments = array_values($segments);
}
$i = 0;
$check = '';
// We are checking segments of the namespace to match quicker
while (isset($segments[$i + 1], $namespaces[$check . $segments[$i] . '\\'])) {
$check .= $segments[$i] . '\\';
++$i;
}
if ($check === '') {
return;
}
$alias = $namespaces[$check]
. strtr(substr($class, strlen($check)), [
'Apigility' => 'ApiTools',
'Expressive' => 'Mezzio',
'Zend' => 'Laminas',
'AbstractZendServer' => 'AbstractZendServer',
'ZendServerDisk' => 'ZendServerDisk',
'ZendServerShm' => 'ZendServerShm',
'ZendMonitor' => 'ZendMonitor',
]);
$loaded[$alias] = true;
if (class_exists($alias) || interface_exists($alias) || trait_exists($alias)) {
class_alias($alias, $class);
}
};
}
private static function getClassLoaderFromVendorDirectory(string $composerVendorDirectory): ?ClassLoader
{
$filename = rtrim($composerVendorDirectory, '/') . '/autoload.php';
if (!file_exists($filename)) {
return null;
}
/** @psalm-suppress MixedAssignment */
$loader = include $filename;
if (!$loader instanceof ClassLoader) {
return null;
}
return $loader;
}
}

View File

@@ -1,426 +0,0 @@
<?php
namespace Laminas\ZendFrameworkBridge;
use function array_intersect_key;
use function array_key_exists;
use function array_pop;
use function in_array;
use function is_array;
use function is_callable;
use function is_int;
use function is_string;
class ConfigPostProcessor
{
/** @internal */
const SERVICE_MANAGER_KEYS_OF_INTEREST = [
'aliases' => true,
'factories' => true,
'invokables' => true,
'services' => true,
];
/** @var array String keys => string values */
private $exactReplacements = [
'zend-expressive' => 'mezzio',
'zf-apigility' => 'api-tools',
];
/** @var Replacements */
private $replacements;
/** @var callable[] */
private $rulesets;
public function __construct()
{
$this->replacements = new Replacements();
/* Define the rulesets for replacements.
*
* Each ruleset has the following signature:
*
* @param mixed $value
* @param string[] $keys Full nested key hierarchy leading to the value
* @return null|callable
*
* If no match is made, a null is returned, allowing it to fallback to
* the next ruleset in the list. If a match is made, a callback is returned,
* and that will be used to perform the replacement on the value.
*
* The callback should have the following signature:
*
* @param mixed $value
* @param string[] $keys
* @return mixed The transformed value
*/
$this->rulesets = [
// Exact values
function ($value) {
return is_string($value) && isset($this->exactReplacements[$value])
? [$this, 'replaceExactValue']
: null;
},
// Router (MVC applications)
// We do not want to rewrite these.
function ($value, array $keys) {
$key = array_pop($keys);
// Only worried about a top-level "router" key.
return $key === 'router' && $keys === [] && is_array($value)
? [$this, 'noopReplacement']
: null;
},
// service- and pluginmanager handling
function ($value) {
return is_array($value) && array_intersect_key(self::SERVICE_MANAGER_KEYS_OF_INTEREST, $value) !== []
? [$this, 'replaceDependencyConfiguration']
: null;
},
// Array values
function ($value, array $keys) {
return $keys !== [] && is_array($value)
? [$this, '__invoke']
: null;
},
];
}
/**
* @param string[] $keys Hierarchy of keys, for determining location in
* nested configuration.
* @return array
*/
public function __invoke(array $config, array $keys = [])
{
$rewritten = [];
foreach ($config as $key => $value) {
// Determine new key from replacements
$newKey = is_string($key) ? $this->replace($key, $keys) : $key;
// Keep original values with original key, if the key has changed, but only at the top-level.
if (empty($keys) && $newKey !== $key) {
$rewritten[$key] = $value;
}
// Perform value replacements, if any
$newValue = $this->replace($value, $keys, $newKey);
// Key does not already exist and/or is not an array value
if (! array_key_exists($newKey, $rewritten) || ! is_array($rewritten[$newKey])) {
// Do not overwrite existing values with null values
$rewritten[$newKey] = array_key_exists($newKey, $rewritten) && null === $newValue
? $rewritten[$newKey]
: $newValue;
continue;
}
// New value is null; nothing to do.
if (null === $newValue) {
continue;
}
// Key already exists as an array value, but $value is not an array
if (! is_array($newValue)) {
$rewritten[$newKey][] = $newValue;
continue;
}
// Key already exists as an array value, and $value is also an array
$rewritten[$newKey] = static::merge($rewritten[$newKey], $newValue);
}
return $rewritten;
}
/**
* Perform substitutions as needed on an individual value.
*
* The $key is provided to allow fine-grained selection of rewrite rules.
*
* @param mixed $value
* @param string[] $keys Key hierarchy
* @param null|int|string $key
* @return mixed
*/
private function replace($value, array $keys, $key = null)
{
// Add new key to the list of keys.
// We do not need to remove it later, as we are working on a copy of the array.
$keys[] = $key;
// Identify rewrite strategy and perform replacements
$rewriteRule = $this->replacementRuleMatch($value, $keys);
return $rewriteRule($value, $keys);
}
/**
* Merge two arrays together.
*
* If an integer key exists in both arrays, the value from the second array
* will be appended to the first array. If both values are arrays, they are
* merged together, else the value of the second array overwrites the one
* of the first array.
*
* Based on zend-stdlib Zend\Stdlib\ArrayUtils::merge
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
*
* @return array
*/
public static function merge(array $a, array $b)
{
foreach ($b as $key => $value) {
if (! isset($a[$key]) && ! array_key_exists($key, $a)) {
$a[$key] = $value;
continue;
}
if (null === $value && array_key_exists($key, $a)) {
// Leave as-is if value from $b is null
continue;
}
if (is_int($key)) {
$a[] = $value;
continue;
}
if (is_array($value) && is_array($a[$key])) {
$a[$key] = static::merge($a[$key], $value);
continue;
}
$a[$key] = $value;
}
return $a;
}
/**
* @param mixed $value
* @param null|int|string $key
* @return callable Callable to invoke with value
*/
private function replacementRuleMatch($value, $key = null)
{
foreach ($this->rulesets as $ruleset) {
$result = $ruleset($value, $key);
if (is_callable($result)) {
return $result;
}
}
return [$this, 'fallbackReplacement'];
}
/**
* Replace a value using the translation table, if the value is a string.
*
* @param mixed $value
* @return mixed
*/
private function fallbackReplacement($value)
{
return is_string($value)
? $this->replacements->replace($value)
: $value;
}
/**
* Replace a value matched exactly.
*
* @param mixed $value
* @return mixed
*/
private function replaceExactValue($value)
{
return $this->exactReplacements[$value];
}
private function replaceDependencyConfiguration(array $config)
{
$aliases = isset($config['aliases']) && is_array($config['aliases'])
? $this->replaceDependencyAliases($config['aliases'])
: [];
if ($aliases) {
$config['aliases'] = $aliases;
}
$config = $this->replaceDependencyInvokables($config);
$config = $this->replaceDependencyFactories($config);
$config = $this->replaceDependencyServices($config);
$keys = self::SERVICE_MANAGER_KEYS_OF_INTEREST;
foreach ($config as $key => $data) {
if (isset($keys[$key])) {
continue;
}
$config[$key] = is_array($data) ? $this->__invoke($data, [$key]) : $data;
}
return $config;
}
/**
* Rewrite dependency aliases array
*
* In this case, we want to keep the alias as-is, but rewrite the target.
*
* We need also provide an additional alias if the alias key is a legacy class.
*
* @return array
*/
private function replaceDependencyAliases(array $aliases)
{
foreach ($aliases as $alias => $target) {
if (! is_string($alias) || ! is_string($target)) {
continue;
}
$newTarget = $this->replacements->replace($target);
$newAlias = $this->replacements->replace($alias);
$notIn = [$newTarget];
$name = $newTarget;
while (isset($aliases[$name])) {
$notIn[] = $aliases[$name];
$name = $aliases[$name];
}
if ($newAlias === $alias && ! in_array($alias, $notIn, true)) {
$aliases[$alias] = $newTarget;
continue;
}
if (isset($aliases[$newAlias])) {
continue;
}
if (! in_array($newAlias, $notIn, true)) {
$aliases[$alias] = $newAlias;
$aliases[$newAlias] = $newTarget;
}
}
return $aliases;
}
/**
* Rewrite dependency invokables array
*
* In this case, we want to keep the alias as-is, but rewrite the target.
*
* We need also provide an additional alias if invokable is defined with
* an alias which is a legacy class.
*
* @return array
*/
private function replaceDependencyInvokables(array $config)
{
if (empty($config['invokables']) || ! is_array($config['invokables'])) {
return $config;
}
foreach ($config['invokables'] as $alias => $target) {
if (! is_string($alias)) {
continue;
}
$newTarget = $this->replacements->replace($target);
$newAlias = $this->replacements->replace($alias);
if ($alias === $target || isset($config['aliases'][$newAlias])) {
$config['invokables'][$alias] = $newTarget;
continue;
}
$config['invokables'][$newAlias] = $newTarget;
if ($newAlias === $alias) {
continue;
}
$config['aliases'][$alias] = $newAlias;
unset($config['invokables'][$alias]);
}
return $config;
}
/**
* @param mixed $value
* @return mixed Returns $value verbatim.
*/
private function noopReplacement($value)
{
return $value;
}
private function replaceDependencyFactories(array $config)
{
if (empty($config['factories']) || ! is_array($config['factories'])) {
return $config;
}
foreach ($config['factories'] as $service => $factory) {
if (! is_string($service)) {
continue;
}
$replacedService = $this->replacements->replace($service);
$factory = is_string($factory) ? $this->replacements->replace($factory) : $factory;
$config['factories'][$replacedService] = $factory;
if ($replacedService === $service) {
continue;
}
unset($config['factories'][$service]);
if (isset($config['aliases'][$service])) {
continue;
}
$config['aliases'][$service] = $replacedService;
}
return $config;
}
private function replaceDependencyServices(array $config)
{
if (empty($config['services']) || ! is_array($config['services'])) {
return $config;
}
foreach ($config['services'] as $service => $serviceInstance) {
if (! is_string($service)) {
continue;
}
$replacedService = $this->replacements->replace($service);
$serviceInstance = is_array($serviceInstance) ? $this->__invoke($serviceInstance) : $serviceInstance;
$config['services'][$replacedService] = $serviceInstance;
if ($service === $replacedService) {
continue;
}
unset($config['services'][$service]);
if (isset($config['aliases'][$service])) {
continue;
}
$config['aliases'][$service] = $replacedService;
}
return $config;
}
}

View File

@@ -1,48 +0,0 @@
<?php
namespace Laminas\ZendFrameworkBridge;
use Laminas\ModuleManager\Listener\ConfigMergerInterface;
use Laminas\ModuleManager\ModuleEvent;
use Laminas\ModuleManager\ModuleManager;
class Module
{
/**
* Initialize the module.
*
* Type-hinting deliberately omitted to allow unit testing
* without dependencies on packages that do not exist yet.
*
* @param ModuleManager $moduleManager
*/
public function init($moduleManager)
{
$moduleManager
->getEventManager()
->attach('mergeConfig', [$this, 'onMergeConfig']);
}
/**
* Perform substitutions in the merged configuration.
*
* Rewrites keys and values matching known ZF classes, namespaces, and
* configuration keys to their Laminas equivalents.
*
* Type-hinting deliberately omitted to allow unit testing
* without dependencies on packages that do not exist yet.
*
* @param ModuleEvent $event
*/
public function onMergeConfig($event)
{
/** @var ConfigMergerInterface */
$configMerger = $event->getConfigListener();
$processor = new ConfigPostProcessor();
$configMerger->setMergedConfig(
$processor(
$configMerger->getMergedConfig($returnAsObject = false)
)
);
}
}

View File

@@ -1,40 +0,0 @@
<?php
namespace Laminas\ZendFrameworkBridge;
use function array_merge;
use function str_replace;
use function strpos;
use function strtr;
class Replacements
{
/** @var string[] */
private $replacements;
public function __construct(array $additionalReplacements = [])
{
$this->replacements = array_merge(
require __DIR__ . '/../config/replacements.php',
$additionalReplacements
);
// Provide multiple variants of strings containing namespace separators
foreach ($this->replacements as $original => $replacement) {
if (false === strpos($original, '\\')) {
continue;
}
$this->replacements[str_replace('\\', '\\\\', $original)] = str_replace('\\', '\\\\', $replacement);
$this->replacements[str_replace('\\', '\\\\\\\\', $original)] = str_replace('\\', '\\\\\\\\', $replacement);
}
}
/**
* @param string $value
* @return string
*/
public function replace($value)
{
return strtr($value, $this->replacements);
}
}

View File

@@ -1,73 +0,0 @@
<?php
namespace Laminas\ZendFrameworkBridge;
class RewriteRules
{
/**
* @return array
*/
public static function namespaceRewrite()
{
return [
// Expressive
'Zend\\ProblemDetails\\' => 'Mezzio\\ProblemDetails\\',
'Zend\\Expressive\\' => 'Mezzio\\',
// Laminas
'Zend\\' => 'Laminas\\',
'ZF\\ComposerAutoloading\\' => 'Laminas\\ComposerAutoloading\\',
'ZF\\DevelopmentMode\\' => 'Laminas\\DevelopmentMode\\',
// Apigility
'ZF\\Apigility\\' => 'Laminas\\ApiTools\\',
'ZF\\' => 'Laminas\\ApiTools\\',
// ZendXml, API wrappers, zend-http OAuth support, zend-diagnostics, ZendDeveloperTools
'ZendXml\\' => 'Laminas\\Xml\\',
'ZendOAuth\\' => 'Laminas\\OAuth\\',
'ZendDiagnostics\\' => 'Laminas\\Diagnostics\\',
'ZendService\\ReCaptcha\\' => 'Laminas\\ReCaptcha\\',
'ZendService\\Twitter\\' => 'Laminas\\Twitter\\',
'ZendDeveloperTools\\' => 'Laminas\\DeveloperTools\\',
];
}
/**
* @return array
*/
public static function namespaceReverse()
{
return [
// ZendXml, ZendOAuth, ZendDiagnostics, ZendDeveloperTools
'Laminas\\Xml\\' => 'ZendXml\\',
'Laminas\\OAuth\\' => 'ZendOAuth\\',
'Laminas\\Diagnostics\\' => 'ZendDiagnostics\\',
'Laminas\\DeveloperTools\\' => 'ZendDeveloperTools\\',
// Zend Service
'Laminas\\ReCaptcha\\' => 'ZendService\\ReCaptcha\\',
'Laminas\\Twitter\\' => 'ZendService\\Twitter\\',
// Zend
'Laminas\\' => 'Zend\\',
// Expressive
'Mezzio\\ProblemDetails\\' => 'Zend\\ProblemDetails\\',
'Mezzio\\' => 'Zend\\Expressive\\',
// Laminas to ZfCampus
'Laminas\\ComposerAutoloading\\' => 'ZF\\ComposerAutoloading\\',
'Laminas\\DevelopmentMode\\' => 'ZF\\DevelopmentMode\\',
// Apigility
'Laminas\\ApiTools\\Admin\\' => 'ZF\\Apigility\\Admin\\',
'Laminas\\ApiTools\\Doctrine\\' => 'ZF\\Apigility\\Doctrine\\',
'Laminas\\ApiTools\\Documentation\\' => 'ZF\\Apigility\\Documentation\\',
'Laminas\\ApiTools\\Example\\' => 'ZF\\Apigility\\Example\\',
'Laminas\\ApiTools\\Provider\\' => 'ZF\\Apigility\\Provider\\',
'Laminas\\ApiTools\\Welcome\\' => 'ZF\\Apiglity\\Welcome\\',
'Laminas\\ApiTools\\' => 'ZF\\',
];
}
}

View File

@@ -1,3 +0,0 @@
<?php
Laminas\ZendFrameworkBridge\Autoloader::load();

View File

@@ -43,7 +43,7 @@
"thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5"
"zurb/foundation": "~6.7.0"
},
"repositories": [
{

View File

@@ -14,6 +14,7 @@ namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Compiler\Environment;
use ScssPhp\ScssPhp\Node\Number;
/**
* @internal
@@ -26,7 +27,7 @@ class CallableBlock extends Block
public $name;
/**
* @var array|null
* @var list<array{string, array|Number|null, bool}>|null
*/
public $args;

View File

@@ -13,6 +13,7 @@
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Node\Number;
use ScssPhp\ScssPhp\Type;
/**
@@ -26,7 +27,7 @@ class DirectiveBlock extends Block
public $name;
/**
* @var string|array|null
* @var array|Number|null
*/
public $value;

View File

@@ -13,6 +13,7 @@
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Node\Number;
use ScssPhp\ScssPhp\Type;
/**
@@ -26,7 +27,7 @@ class EachBlock extends Block
public $vars = [];
/**
* @var array
* @var array|Number
*/
public $list;

View File

@@ -13,6 +13,7 @@
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Node\Number;
use ScssPhp\ScssPhp\Type;
/**
@@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type;
class ElseifBlock extends Block
{
/**
* @var array
* @var array|Number
*/
public $cond;

View File

@@ -13,6 +13,7 @@
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Node\Number;
use ScssPhp\ScssPhp\Type;
/**
@@ -26,12 +27,12 @@ class ForBlock extends Block
public $var;
/**
* @var array
* @var array|Number
*/
public $start;
/**
* @var array
* @var array|Number
*/
public $end;

View File

@@ -13,6 +13,7 @@
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Node\Number;
use ScssPhp\ScssPhp\Type;
/**
@@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type;
class IfBlock extends Block
{
/**
* @var array
* @var array|Number
*/
public $cond;

View File

@@ -13,6 +13,7 @@
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Node\Number;
use ScssPhp\ScssPhp\Type;
/**
@@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type;
class MediaBlock extends Block
{
/**
* @var string|array|null
* @var string|array|Number|null
*/
public $value;

View File

@@ -140,13 +140,28 @@ class Compiler
/** @deprecated */
public static $Infinity = [Type::T_KEYWORD, 'Infinity'];
public static $null = [Type::T_NULL];
/**
* @internal
*/
public static $nullString = [Type::T_STRING, '', []];
/**
* @internal
*/
public static $defaultValue = [Type::T_KEYWORD, ''];
/**
* @internal
*/
public static $selfSelector = [Type::T_SELF];
public static $emptyList = [Type::T_LIST, '', []];
public static $emptyMap = [Type::T_MAP, [], []];
public static $emptyString = [Type::T_STRING, '"', []];
/**
* @internal
*/
public static $with = [Type::T_KEYWORD, 'with'];
/**
* @internal
*/
public static $without = [Type::T_KEYWORD, 'without'];
private static $emptyArgumentList = [Type::T_LIST, '', [], []];
@@ -458,10 +473,33 @@ class Compiler
}
/**
* Compile scss
* Compiles the provided scss file into CSS.
*
* @param string $path
*
* @return CompilationResult
*
* @throws SassException when the source fails to compile
*/
public function compileFile($path)
{
$source = file_get_contents($path);
if ($source === false) {
throw new \RuntimeException('Could not read the file content');
}
return $this->compileString($source, $path);
}
/**
* Compiles the provided scss source code into CSS.
*
* If provided, the path is considered to be the path from which the source code comes
* from, which will be used to resolve relative imports.
*
* @param string $source
* @param string|null $path
* @param string|null $path The path for the source, used to resolve relative imports
*
* @return CompilationResult
*
@@ -548,7 +586,7 @@ class Compiler
$sourceMap = null;
if (! empty($out) && $this->sourceMap && $this->sourceMap !== self::SOURCE_MAP_NONE) {
if (! empty($out) && $this->sourceMap !== self::SOURCE_MAP_NONE && $this->sourceMap) {
assert($sourceMapGenerator !== null);
$sourceMap = $sourceMapGenerator->generateJson($prefix);
$sourceMapUrl = null;
@@ -1508,6 +1546,7 @@ class Compiler
// start from the root
while ($scope->parent && $scope->parent->type !== Type::T_ROOT) {
array_unshift($childStash, $scope);
\assert($scope->parent !== null);
$scope = $scope->parent;
}
@@ -1632,6 +1671,7 @@ class Compiler
$parser = $this->parserFactory(__METHOD__);
if ($parser->parseValue($buffer, $reParsedWith)) {
\assert(\is_array($reParsedWith));
$withCondition = $reParsedWith;
}
}
@@ -2090,6 +2130,11 @@ class Compiler
foreach ($selector as $node) {
$compound = '';
if (!is_array($node)) {
$output[] = $node;
continue;
}
array_walk_recursive(
$node,
function ($value, $key) use (&$compound) {
@@ -2124,12 +2169,16 @@ class Compiler
foreach ($selector as $node) {
$compound = '';
array_walk_recursive(
$node,
function ($value, $key) use (&$compound) {
$compound .= $value;
}
);
if (!is_array($node)) {
$compound .= $node;
} else {
array_walk_recursive(
$node,
function ($value, $key) use (&$compound) {
$compound .= $value;
}
);
}
if ($this->isImmediateRelationshipCombinator($compound)) {
if (\count($output)) {
@@ -2885,7 +2934,7 @@ class Compiler
{
if (isset($child[Parser::SOURCE_LINE])) {
$this->sourceIndex = isset($child[Parser::SOURCE_INDEX]) ? $child[Parser::SOURCE_INDEX] : null;
$this->sourceLine = isset($child[Parser::SOURCE_LINE]) ? $child[Parser::SOURCE_LINE] : -1;
$this->sourceLine = $child[Parser::SOURCE_LINE];
$this->sourceColumn = isset($child[Parser::SOURCE_COLUMN]) ? $child[Parser::SOURCE_COLUMN] : -1;
} elseif (\is_array($child) && isset($child[1]->sourceLine) && $child[1] instanceof Block) {
$this->sourceIndex = $child[1]->sourceIndex;
@@ -4529,8 +4578,10 @@ EOL;
return $colorName;
}
if (is_numeric($alpha)) {
if (\is_int($alpha) || \is_float($alpha)) {
$a = new Number($alpha, '');
} elseif (is_numeric($alpha)) {
$a = new Number((float) $alpha, '');
} else {
$a = $alpha;
}
@@ -5667,9 +5718,35 @@ EOL;
@trigger_error('Omitting the argument declaration when registering custom function is deprecated and won\'t be supported in ScssPhp 2.0 anymore.', E_USER_DEPRECATED);
}
if ($this->reflectCallable($callback)->getNumberOfRequiredParameters() > 1) {
@trigger_error('The second argument passed to the callback of custom functions is deprecated and won\'t be supported in ScssPhp 2.0 anymore. Register a callback accepting only 1 parameter instead.', E_USER_DEPRECATED);
}
$this->userFunctions[$this->normalizeName($name)] = [$callback, $argumentDeclaration];
}
/**
* @return \ReflectionFunctionAbstract
*/
private function reflectCallable(callable $c)
{
if (\is_object($c) && !$c instanceof \Closure) {
$c = [$c, '__invoke'];
}
if (\is_string($c) && false !== strpos($c, '::')) {
$c = explode('::', $c, 2);
}
if (\is_array($c)) {
return new \ReflectionMethod($c[0], $c[1]);
}
\assert(\is_string($c) || $c instanceof \Closure);
return new \ReflectionFunction($c);
}
/**
* Unregister function
*
@@ -5806,13 +5883,13 @@ EOL;
if (! \is_null($file)) {
if (\is_array($dir)) {
$callableDescription = (\is_object($dir[0]) ? \get_class($dir[0]) : $dir[0]).'::'.$dir[1];
$callableDescription = (\is_object($dir[0]) ? \get_class($dir[0]) : $dir[0]) . '::' . $dir[1];
} elseif ($dir instanceof \Closure) {
$r = new \ReflectionFunction($dir);
if (false !== strpos($r->name, '{closure}')) {
$callableDescription = sprintf('closure{%s:%s}', $r->getFileName(), $r->getStartLine());
} elseif ($class = $r->getClosureScopeClass()) {
$callableDescription = $class->name.'::'.$r->name;
$callableDescription = $class->name . '::' . $r->name;
} else {
$callableDescription = $r->name;
}
@@ -5925,15 +6002,15 @@ EOL;
private function tryImportPathWithExtensions($path)
{
$result = array_merge(
$this->tryImportPath($path.'.sass'),
$this->tryImportPath($path.'.scss')
$this->tryImportPath($path . '.sass'),
$this->tryImportPath($path . '.scss')
);
if ($result) {
return $result;
}
return $this->tryImportPath($path.'.css');
return $this->tryImportPath($path . '.css');
}
/**
@@ -5943,7 +6020,7 @@ EOL;
*/
private function tryImportPath($path)
{
$partial = dirname($path).'/_'.basename($path);
$partial = dirname($path) . '/_' . basename($path);
$candidates = [];
@@ -5969,7 +6046,7 @@ EOL;
return null;
}
return $this->checkImportPathConflicts($this->tryImportPathWithExtensions($path.'/index'));
return $this->checkImportPathConflicts($this->tryImportPathWithExtensions($path . '/index'));
}
/**
@@ -5984,7 +6061,7 @@ EOL;
}
$normalizedPath = $path;
$normalizedRootDirectory = $this->rootDirectory.'/';
$normalizedRootDirectory = $this->rootDirectory . '/';
if (\DIRECTORY_SEPARATOR === '\\') {
$normalizedRootDirectory = str_replace('\\', '/', $normalizedRootDirectory);
@@ -6371,8 +6448,6 @@ EOL;
*/
protected function sortNativeFunctionArgs($functionName, $prototypes, $args)
{
static $parser = null;
if (! isset($prototypes)) {
$keyArgs = [];
$posArgs = [];
@@ -6526,7 +6601,7 @@ EOL;
*
* @return array
*
* @phpstan-param non-empty-list<array{arguments: list<array{0: string, 1: string, 2: array|Number|null}>, rest_argument: string|null}> $prototypes
* @phpstan-param non-empty-array<array{arguments: list<array{0: string, 1: string, 2: array|Number|null}>, rest_argument: string|null}> $prototypes
* @phpstan-return array{arguments: list<array{0: string, 1: string, 2: array|Number|null}>, rest_argument: string|null}
*/
private function selectFunctionPrototype(array $prototypes, $positional, array $names)
@@ -6984,10 +7059,14 @@ EOL;
return static::$null;
}
if (is_numeric($value)) {
if (\is_int($value) || \is_float($value)) {
return new Number($value, '');
}
if (is_numeric($value)) {
return new Number((float) $value, '');
}
if ($value === '') {
return static::$emptyString;
}
@@ -7675,9 +7754,9 @@ EOL;
$b = min(1.0 - $w, $b);
$rgb = $this->toRGB($hue, 100, 50);
for($i = 1; $i < 4; $i++) {
$rgb[$i] *= (1.0 - $w - $b);
$rgb[$i] = round($rgb[$i] + 255 * $w + 0.0001);
for ($i = 1; $i < 4; $i++) {
$rgb[$i] *= (1.0 - $w - $b);
$rgb[$i] = round($rgb[$i] + 255 * $w + 0.0001);
}
return $rgb;
@@ -7704,7 +7783,6 @@ EOL;
if ((int) $d === 0) {
$h = 0;
} else {
if ($red == $max) {
$h = 60 * ($green - $blue) / $d;
} elseif ($green == $max) {
@@ -7714,7 +7792,7 @@ EOL;
}
}
return [Type::T_HWB, fmod($h, 360), $min / 255 * 100, 100 - $max / 255 *100];
return [Type::T_HWB, fmod($h, 360), $min / 255 * 100, 100 - $max / 255 * 100];
}
@@ -7923,7 +8001,13 @@ EOL;
$scale = $operation === 'scale';
$change = $operation === 'change';
/** @phpstan-var callable(string, float|int, bool=, bool=): (float|int|null) $getParam */
/**
* @param string $name
* @param float|int $max
* @param bool $checkPercent
* @param bool $assertPercent
* @return float|int|null
*/
$getParam = function ($name, $max, $checkPercent = false, $assertPercent = false) use (&$kwargs, $scale, $change) {
if (!isset($kwargs[$name])) {
return null;
@@ -8065,7 +8149,7 @@ EOL;
protected static $libChangeColor = ['color', 'kwargs...'];
protected function libChangeColor($args)
{
return $this->alterColor($args,'change', function ($base, $alter, $max) {
return $this->alterColor($args, 'change', function ($base, $alter, $max) {
if ($alter === null) {
return $base;
}

View File

@@ -33,7 +33,7 @@ use ScssPhp\ScssPhp\Util;
*
* @template-implements \ArrayAccess<int, mixed>
*/
class Number extends Node implements \ArrayAccess
class Number extends Node implements \ArrayAccess, \JsonSerializable
{
const PRECISION = 10;
@@ -131,7 +131,7 @@ class Number extends Node implements \ArrayAccess
}
/**
* @return string[]
* @return list<string>
*/
public function getNumeratorUnits()
{
@@ -139,13 +139,23 @@ class Number extends Node implements \ArrayAccess
}
/**
* @return string[]
* @return list<string>
*/
public function getDenominatorUnits()
{
return $this->denominatorUnits;
}
/**
* @return mixed
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
// Passing a compiler instance makes the method output a Sass representation instead of a CSS one, supporting full units.
return $this->output(new Compiler());
}
/**
* @return bool
*/
@@ -554,7 +564,7 @@ class Number extends Node implements \ArrayAccess
try {
return $this->coerceUnits($other, function ($num1, $num2) {
return round($num1,self::PRECISION) == round($num2, self::PRECISION);
return round($num1, self::PRECISION) == round($num2, self::PRECISION);
});
} catch (SassScriptException $e) {
return false;

View File

@@ -1,9 +1,62 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp;
final class OutputStyle
{
const EXPANDED = 'expanded';
const COMPRESSED = 'compressed';
/**
* Converts a string to an output style.
*
* Using this method allows to write code which will support both
* versions 1.12+ and 2.0 of Scssphp. In 2.0, OutputStyle will be
* an enum instead of using string constants.
*
* @param string $string
*
* @return self::*
*/
public static function fromString($string)
{
switch ($string) {
case 'expanded':
return self::EXPANDED;
case 'compressed':
return self::COMPRESSED;
default:
throw new \InvalidArgumentException('Invalid output style');
}
}
/**
* Converts an output style to a string supported by {@see OutputStyle::fromString()}.
*
* Using this method allows to write code which will support both
* versions 1.12+ and 2.0 of Scssphp. In 2.0, OutputStyle will be
* an enum instead of using string constants.
* The returned string representation is guaranteed to be compatible
* between 1.12 and 2.0.
*
* @param self::* $outputStyle
*
* @return string
*/
public static function toString($outputStyle)
{
return $outputStyle;
}
}

View File

@@ -273,6 +273,11 @@ class Parser
$this->saveEncoding();
$this->extractLineNumbers($buffer);
if ($this->utf8 && !preg_match('//u', $buffer)) {
$message = $this->sourceName ? 'Invalid UTF-8 file: ' . $this->sourceName : 'Invalid UTF-8 file';
throw new ParserException($message);
}
$this->pushBlock(null); // root block
$this->whitespace();
$this->pushBlock(null);
@@ -305,8 +310,9 @@ class Parser
*
* @api
*
* @param string $buffer
* @param string|array $out
* @param string $buffer
* @param mixed $out
* @param-out array|Number $out
*
* @return bool
*/
@@ -323,6 +329,13 @@ class Parser
$list = $this->valueList($out);
if ($this->count !== \strlen($this->buffer)) {
$error = $this->parseError('Expected end of value');
$message = 'Passing trailing content after the expression when parsing a value is deprecated since Scssphp 1.12.0 and will be an error in 2.0. ' . $error->getMessage();
@trigger_error($message, E_USER_DEPRECATED);
}
$this->restoreEncoding();
return $list;
@@ -333,9 +346,9 @@ class Parser
*
* @api
*
* @param string $buffer
* @param string|array $out
* @param bool $shouldValidate
* @param string $buffer
* @param array $out
* @param bool $shouldValidate
*
* @return bool
*/
@@ -383,10 +396,13 @@ class Parser
$this->inParens = false;
$this->eatWhiteDefault = true;
$this->buffer = (string) $buffer;
$this->discardComments = true;
$this->saveEncoding();
$this->extractLineNumbers($this->buffer);
$this->whitespace();
$isMediaQuery = $this->mediaQueryList($out);
$this->restoreEncoding();
@@ -1240,10 +1256,10 @@ class Parser
/**
* Assert a parsed part is plain CSS Valid
*
* @param array|false $parsed
* @param array|Number|false $parsed
* @param int $startPos
*
* @return array
* @return array|Number
*
* @throws ParserException
*/
@@ -1273,10 +1289,10 @@ class Parser
/**
* Check a parsed element is plain CSS Valid
*
* @param array $parsed
* @param array|Number|string $parsed
* @param bool $allowExpression
*
* @return array|false
* @return ($parsed is string ? string : ($parsed is Number ? Number : array|false))
*/
protected function isPlainCssValidElement($parsed, $allowExpression = false)
{
@@ -1285,6 +1301,10 @@ class Parser
return $parsed;
}
if ($parsed instanceof Number) {
return $parsed;
}
if (
\in_array($parsed[0], [Type::T_FUNCTION, Type::T_FUNCTION_CALL]) &&
!\in_array($parsed[1], [
@@ -1678,9 +1698,9 @@ class Parser
*/
protected function appendComment($comment)
{
assert($this->env !== null);
if (! $this->discardComments) {
assert($this->env !== null);
$this->env->comments[] = $comment;
}
}
@@ -2079,8 +2099,9 @@ class Parser
/**
* Parse directive value list that considers $vars as keyword
*
* @param array $out
* @param mixed $out
* @param string|false $endChar
* @param-out array|Number $out
*
* @return bool
*
@@ -2143,7 +2164,8 @@ class Parser
/**
* Parse comma separated value list
*
* @param array $out
* @param mixed $out
* @param-out array|Number $out
*
* @return bool
*/
@@ -2161,10 +2183,11 @@ class Parser
* Parse a function call, where externals () are part of the call
* and not of the value list
*
* @param array $out
* @param mixed $out
* @param bool $mandatoryEnclos
* @param null|string $charAfter
* @param null|bool $eatWhiteSp
* @param-out array|Number $out
*
* @return bool
*/
@@ -2200,7 +2223,8 @@ class Parser
/**
* Parse space separated value list
*
* @param array $out
* @param mixed $out
* @param-out array|Number $out
*
* @return bool
*/
@@ -2212,10 +2236,11 @@ class Parser
/**
* Parse generic list
*
* @param array $out
* @param mixed $out
* @param string $parseItem The name of the method used to parse items
* @param string $delim
* @param bool $flatten
* @param-out ($flatten is false ? array : array|Number) $out
*
* @return bool
*/
@@ -2319,9 +2344,10 @@ class Parser
/**
* Parse expression
*
* @param array $out
* @param mixed $out
* @param bool $listOnly
* @param bool $lookForExp
* @param-out array|Number $out
*
* @return bool
*
@@ -2386,10 +2412,11 @@ class Parser
/**
* Parse expression specifically checking for lists in parenthesis or brackets
*
* @param array $out
* @param mixed $out
* @param int $s
* @param string $closingParen
* @param string[] $allowedTypes
* @param-out array|Number $out
*
* @return bool
*
@@ -2448,10 +2475,10 @@ class Parser
/**
* Parse left-hand side of subexpression
*
* @param array $lhs
* @param int $minP
* @param array|Number $lhs
* @param int $minP
*
* @return array
* @return array|Number
*/
protected function expHelper($lhs, $minP)
{
@@ -2502,7 +2529,8 @@ class Parser
/**
* Parse value
*
* @param array $out
* @param mixed $out
* @param-out array|Number $out
*
* @return bool
*/
@@ -2710,7 +2738,8 @@ class Parser
/**
* Parse parenthesized value
*
* @param array $out
* @param mixed $out
* @param-out array|Number $out
*
* @return bool
*/
@@ -2782,7 +2811,8 @@ class Parser
* Parse function call
*
* @param string $name
* @param array $func
* @param mixed $func
* @param-out array $func
*
* @return bool
*/
@@ -2885,7 +2915,8 @@ class Parser
/**
* Parse mixin/function definition argument list
*
* @param array $out
* @param mixed $out
* @param-out list<array{string, array|Number|null, bool}> $out
*
* @return bool
*/
@@ -2947,7 +2978,8 @@ class Parser
/**
* Parse map
*
* @param array $out
* @param mixed $out
* @param-out array $out
*
* @return bool
*/
@@ -2989,7 +3021,8 @@ class Parser
/**
* Parse color
*
* @param array $out
* @param mixed $out
* @param-out array $out
*
* @return bool
*/
@@ -3015,7 +3048,8 @@ class Parser
/**
* Parse number with unit
*
* @param array $unit
* @param mixed $unit
* @param-out Number $unit
*
* @return bool
*/
@@ -3221,11 +3255,12 @@ class Parser
* Parse an unbounded string stopped by $end
*
* @param string $end
* @param array $out
* @param mixed $out
* @param string $nestOpen
* @param string $nestClose
* @param bool $rtrim
* @param string $disallow
* @param-out array $out
*
* @return bool
*/
@@ -3302,8 +3337,9 @@ class Parser
/**
* Parser interpolation
*
* @param string|array $out
* @param bool $lookWhite save information about whitespace before and after
* @param mixed $out
* @param bool $lookWhite save information about whitespace before and after
* @param-out array $out
*
* @return bool
*/
@@ -3837,7 +3873,8 @@ class Parser
/**
* Parse a variable
*
* @param array $out
* @param mixed $out
* @param-out array{Type::*, string} $out
*
* @return bool
*/
@@ -3866,9 +3903,10 @@ class Parser
/**
* Parse a keyword
*
* @param string $word
* @param bool $eatWhitespace
* @param bool $inSelector
* @param mixed $word
* @param bool $eatWhitespace
* @param bool $inSelector
* @param-out string $word
*
* @return bool
*/
@@ -3984,7 +4022,8 @@ class Parser
/**
* Parse a url
*
* @param array $out
* @param mixed $out
* @param-out array $out
*
* @return bool
*/
@@ -3994,10 +4033,10 @@ class Parser
$s = $this->count;
if (
($this->string($out) || $this->spaceList($out)) &&
($this->string($inner) || $this->spaceList($inner)) &&
$this->matchChar(')')
) {
$out = [Type::T_STRING, '', ['url(', $out, ')']];
$out = [Type::T_STRING, '', ['url(', $inner, ')']];
return true;
}
@@ -4040,7 +4079,7 @@ class Parser
/**
* Strip assignment flag from the list
*
* @param array $value
* @param array|Number $value
*
* @return string[]
*/

View File

@@ -95,6 +95,9 @@ class Type
* @internal
*/
const T_FOR = 'for';
/**
* @internal
*/
const T_FUNCTION = 'function';
/**
* @internal

View File

@@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp;
*/
class Version
{
const VERSION = '1.11.0';
const VERSION = '1.13.0';
}