PK mPUK8%
LICENSE.mdnu ٘ 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.
PK mPUF[ [ COPYRIGHT.mdnu ٘ Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/)
PK mPU=H H .laminas-ci.jsonnu ٘ {
"ignore_php_platform_requirements": {
"8.1": true
}
}
PK mPUx= = .coveralls.ymlnu ٘ coverage_clover: clover.xml
json_path: coveralls-upload.json
PK mPU~e e
composer.locknu ٘ {
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ca5555ad1c179496bb16bd1ef17c1cde",
"packages": [
{
"name": "laminas/laminas-stdlib",
"version": "3.15.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-stdlib.git",
"reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/63b66bd4b696f024f42616b9d95cdb10e5109c27",
"reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27",
"shasum": ""
},
"require": {
"php": "~8.0.0 || ~8.1.0 || ~8.2.0"
},
"conflict": {
"zendframework/zend-stdlib": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "^2.4.0",
"phpbench/phpbench": "^1.2.6",
"phpunit/phpunit": "^9.5.25",
"psalm/plugin-phpunit": "^0.17.0",
"vimeo/psalm": "^4.28"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Stdlib\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "SPL extensions, array utilities, error handlers, and more",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"stdlib"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-stdlib/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-stdlib/issues",
"rss": "https://github.com/laminas/laminas-stdlib/releases.atom",
"source": "https://github.com/laminas/laminas-stdlib"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-10-10T19:10:24+00:00"
},
{
"name": "psr/container",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
"php": ">=7.4.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
"homepage": "https://github.com/php-fig/container",
"keywords": [
"PSR-11",
"container",
"container-interface",
"container-interop",
"psr"
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.2"
},
"time": "2021-11-05T16:50:12+00:00"
}
],
"packages-dev": [
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
"version": "v0.7.2",
"source": {
"type": "git",
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
"reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
"reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0 || ^2.0",
"php": ">=5.3",
"squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
},
"require-dev": {
"composer/composer": "*",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
"phpcompatibility/php-compatibility": "^9.0"
},
"type": "composer-plugin",
"extra": {
"class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
},
"autoload": {
"psr-4": {
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Franck Nijhof",
"email": "franck.nijhof@dealerdirect.com",
"homepage": "http://www.frenck.nl",
"role": "Developer / IT Manager"
},
{
"name": "Contributors",
"homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
"homepage": "http://www.dealerdirect.com",
"keywords": [
"PHPCodeSniffer",
"PHP_CodeSniffer",
"code quality",
"codesniffer",
"composer",
"installer",
"phpcbf",
"phpcs",
"plugin",
"qa",
"quality",
"standard",
"standards",
"style guide",
"stylecheck",
"tests"
],
"support": {
"issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
"source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
},
"time": "2022-02-04T12:51:07+00:00"
},
{
"name": "doctrine/instantiator",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.22"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
"homepage": "https://ocramius.github.io/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [
"constructor",
"instantiate"
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.4.1"
},
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
"type": "custom"
},
{
"url": "https://www.patreon.com/phpdoctrine",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
"type": "tidelift"
}
],
"time": "2022-03-03T08:28:38+00:00"
},
{
"name": "laminas/laminas-coding-standard",
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-coding-standard.git",
"reference": "eb076dd86aa93dd424856b150c9b6f76c1fdfabc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/eb076dd86aa93dd424856b150c9b6f76c1fdfabc",
"reference": "eb076dd86aa93dd424856b150c9b6f76c1fdfabc",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"php": "^7.4 || ^8.0",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.6",
"webimpress/coding-standard": "^1.2"
},
"conflict": {
"phpstan/phpdoc-parser": ">=1.6.0"
},
"type": "phpcodesniffer-standard",
"autoload": {
"psr-4": {
"LaminasCodingStandard\\": "src/LaminasCodingStandard/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Laminas Coding Standard",
"homepage": "https://laminas.dev",
"keywords": [
"Coding Standard",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-coding-standard/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-coding-standard/issues",
"rss": "https://github.com/laminas/laminas-coding-standard/releases.atom",
"source": "https://github.com/laminas/laminas-coding-standard"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-08-24T17:45:47+00:00"
},
{
"name": "laminas/laminas-filter",
"version": "2.23.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-filter.git",
"reference": "41cff2f850753f0bb3fc75c5ce011fcad6aa1731"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-filter/zipball/41cff2f850753f0bb3fc75c5ce011fcad6aa1731",
"reference": "41cff2f850753f0bb3fc75c5ce011fcad6aa1731",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"laminas/laminas-servicemanager": "^3.14.0",
"laminas/laminas-stdlib": "^3.13.0",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0"
},
"conflict": {
"laminas/laminas-validator": "<2.10.1",
"zendframework/zend-filter": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.4.0",
"laminas/laminas-crypt": "^3.8",
"laminas/laminas-uri": "^2.9.1",
"pear/archive_tar": "^1.4.14",
"phpunit/phpunit": "^9.5.25",
"psalm/plugin-phpunit": "^0.17.0",
"psr/http-factory": "^1.0.1",
"vimeo/psalm": "^4.28"
},
"suggest": {
"laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters",
"laminas/laminas-i18n": "Laminas\\I18n component for filters depending on i18n functionality",
"laminas/laminas-uri": "Laminas\\Uri component, for the UriNormalize filter",
"psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters"
},
"type": "library",
"extra": {
"laminas": {
"component": "Laminas\\Filter",
"config-provider": "Laminas\\Filter\\ConfigProvider"
}
},
"autoload": {
"psr-4": {
"Laminas\\Filter\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Programmatically filter and normalize data and files",
"homepage": "https://laminas.dev",
"keywords": [
"filter",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-filter/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-filter/issues",
"rss": "https://github.com/laminas/laminas-filter/releases.atom",
"source": "https://github.com/laminas/laminas-filter"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-10-11T10:04:14+00:00"
},
{
"name": "laminas/laminas-i18n",
"version": "2.19.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-i18n.git",
"reference": "ebabca3a6398fc872127bc69a51bda5afc720d67"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/ebabca3a6398fc872127bc69a51bda5afc720d67",
"reference": "ebabca3a6398fc872127bc69a51bda5afc720d67",
"shasum": ""
},
"require": {
"ext-intl": "*",
"laminas/laminas-servicemanager": "^3.14.0",
"laminas/laminas-stdlib": "^2.7 || ^3.0",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0"
},
"conflict": {
"laminas/laminas-view": "<2.20.0",
"phpspec/prophecy": "<1.9.0",
"zendframework/zend-i18n": "*"
},
"require-dev": {
"laminas/laminas-cache": "^3.6",
"laminas/laminas-cache-storage-adapter-memory": "^2.1",
"laminas/laminas-cache-storage-deprecated-factory": "^1.0.1",
"laminas/laminas-coding-standard": "~2.4.0",
"laminas/laminas-config": "^3.7",
"laminas/laminas-eventmanager": "^3.5.0",
"laminas/laminas-filter": "^2.21",
"laminas/laminas-validator": "^2.25",
"laminas/laminas-view": "^2.23",
"phpunit/phpunit": "^9.5.25",
"psalm/plugin-phpunit": "^0.17.0",
"vimeo/psalm": "^4.28"
},
"suggest": {
"laminas/laminas-cache": "You should install this package to cache the translations",
"laminas/laminas-config": "You should install this package to use the INI translation format",
"laminas/laminas-eventmanager": "You should install this package to use the events in the translator",
"laminas/laminas-filter": "You should install this package to use the provided filters",
"laminas/laminas-i18n-resources": "This package provides validator and captcha translations",
"laminas/laminas-validator": "You should install this package to use the provided validators",
"laminas/laminas-view": "You should install this package to use the provided view helpers"
},
"type": "library",
"extra": {
"laminas": {
"component": "Laminas\\I18n",
"config-provider": "Laminas\\I18n\\ConfigProvider"
}
},
"autoload": {
"psr-4": {
"Laminas\\I18n\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Provide translations for your application, and filter and validate internationalized values",
"homepage": "https://laminas.dev",
"keywords": [
"i18n",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-i18n/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-i18n/issues",
"rss": "https://github.com/laminas/laminas-i18n/releases.atom",
"source": "https://github.com/laminas/laminas-i18n"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-10-10T15:48:56+00:00"
},
{
"name": "laminas/laminas-servicemanager",
"version": "3.19.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-servicemanager.git",
"reference": "ed160729bb8721127efdaac799f9a298963345b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/ed160729bb8721127efdaac799f9a298963345b1",
"reference": "ed160729bb8721127efdaac799f9a298963345b1",
"shasum": ""
},
"require": {
"laminas/laminas-stdlib": "^3.2.1",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"psr/container": "^1.0"
},
"conflict": {
"ext-psr": "*",
"laminas/laminas-code": "<3.3.1",
"zendframework/zend-code": "<3.3.1",
"zendframework/zend-servicemanager": "*"
},
"provide": {
"psr/container-implementation": "^1.0"
},
"replace": {
"container-interop/container-interop": "^1.2.0"
},
"require-dev": {
"composer/package-versions-deprecated": "^1.11.99.5",
"laminas/laminas-coding-standard": "~2.4.0",
"laminas/laminas-container-config-test": "^0.7",
"laminas/laminas-dependency-plugin": "^2.2",
"mikey179/vfsstream": "^1.6.11@alpha",
"ocramius/proxy-manager": "^2.14.1",
"phpbench/phpbench": "^1.2.6",
"phpunit/phpunit": "^9.5.25",
"psalm/plugin-phpunit": "^0.17.0",
"vimeo/psalm": "^4.28"
},
"suggest": {
"ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services"
},
"bin": [
"bin/generate-deps-for-config-factory",
"bin/generate-factory-for-class"
],
"type": "library",
"autoload": {
"files": [
"src/autoload.php"
],
"psr-4": {
"Laminas\\ServiceManager\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Factory-Driven Dependency Injection Container",
"homepage": "https://laminas.dev",
"keywords": [
"PSR-11",
"dependency-injection",
"di",
"dic",
"laminas",
"service-manager",
"servicemanager"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-servicemanager/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-servicemanager/issues",
"rss": "https://github.com/laminas/laminas-servicemanager/releases.atom",
"source": "https://github.com/laminas/laminas-servicemanager"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-10-10T20:59:22+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"conflict": {
"doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
"autoload": {
"files": [
"src/DeepCopy/deep_copy.php"
],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"keywords": [
"clone",
"copy",
"duplicate",
"object",
"object graph"
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
],
"time": "2022-03-03T13:19:32+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.15.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
"reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=7.0"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.9-dev"
}
},
"autoload": {
"psr-4": {
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1"
},
"time": "2022-09-04T07:30:47+00:00"
},
{
"name": "phar-io/manifest",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-phar": "*",
"ext-xmlwriter": "*",
"phar-io/version": "^3.0.1",
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
"source": "https://github.com/phar-io/manifest/tree/2.0.3"
},
"time": "2021-07-20T11:28:43+00:00"
},
{
"name": "phar-io/version",
"version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
"source": "https://github.com/phar-io/version/tree/3.2.1"
},
"time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpstan/phpdoc-parser",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "981cc368a216c988e862a75e526b6076987d1b50"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50",
"reference": "981cc368a216c988e862a75e526b6076987d1b50",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.5",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^9.5",
"symfony/process": "^5.2"
},
"type": "library",
"autoload": {
"psr-4": {
"PHPStan\\PhpDocParser\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1"
},
"time": "2022-05-05T11:32:40+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.17",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "aa94dc41e8661fe90c7316849907cba3007b10d8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8",
"reference": "aa94dc41e8661fe90c7316849907cba3007b10d8",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.14",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
"sebastian/code-unit-reverse-lookup": "^2.0.2",
"sebastian/complexity": "^2.0",
"sebastian/environment": "^5.1.2",
"sebastian/lines-of-code": "^1.0.3",
"sebastian/version": "^3.0.1",
"theseer/tokenizer": "^1.2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-pcov": "*",
"ext-xdebug": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.2-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
"coverage",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-08-30T12:24:04+00:00"
},
{
"name": "phpunit/php-file-iterator",
"version": "3.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
"reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"keywords": [
"filesystem",
"iterator"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2021-12-02T12:48:52+00:00"
},
{
"name": "phpunit/php-invoker",
"version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
"reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"ext-pcntl": "*",
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-pcntl": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Invoke callables with a timeout",
"homepage": "https://github.com/sebastianbergmann/php-invoker/",
"keywords": [
"process"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-invoker/issues",
"source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:58:55+00:00"
},
{
"name": "phpunit/php-text-template",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
"template"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
"source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T05:33:50+00:00"
},
{
"name": "phpunit/php-timer",
"version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
"source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:16:10+00:00"
},
{
"name": "phpunit/phpunit",
"version": "9.5.25",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.3.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.10.1",
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpunit/php-code-coverage": "^9.2.13",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
"phpunit/php-timer": "^5.0.2",
"sebastian/cli-parser": "^1.0.1",
"sebastian/code-unit": "^1.0.6",
"sebastian/comparator": "^4.0.8",
"sebastian/diff": "^4.0.3",
"sebastian/environment": "^5.1.3",
"sebastian/exporter": "^4.0.5",
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
"sebastian/type": "^3.2",
"sebastian/version": "^3.0.2"
},
"suggest": {
"ext-soap": "*",
"ext-xdebug": "*"
},
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.5-dev"
}
},
"autoload": {
"files": [
"src/Framework/Assert/Functions.php"
],
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "The PHP Unit Testing framework.",
"homepage": "https://phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25"
},
"funding": [
{
"url": "https://phpunit.de/sponsors.html",
"type": "custom"
},
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
"type": "tidelift"
}
],
"time": "2022-09-25T03:44:45+00:00"
},
{
"name": "sebastian/cli-parser",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for parsing CLI options",
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
"source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:08:49+00:00"
},
{
"name": "sebastian/code-unit",
"version": "1.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
"reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
"reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Collection of value objects that represent the PHP code units",
"homepage": "https://github.com/sebastianbergmann/code-unit",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit/issues",
"source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:08:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
"source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:30:19+00:00"
},
{
"name": "sebastian/comparator",
"version": "4.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "fa0f136dd2334583309d32b62544682ee972b51a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
"reference": "fa0f136dd2334583309d32b62544682ee972b51a",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/diff": "^4.0",
"sebastian/exporter": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
}
],
"description": "Provides the functionality to compare PHP values for equality",
"homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-09-14T12:41:17+00:00"
},
{
"name": "sebastian/complexity",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.7",
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for calculating the complexity of PHP code units",
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
"source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T15:52:27+00:00"
},
{
"name": "sebastian/diff",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"symfony/process": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
}
],
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff",
"udiff",
"unidiff",
"unified diff"
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:10:38+00:00"
},
{
"name": "sebastian/environment",
"version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-posix": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.1-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides functionality to handle HHVM/PHP environments",
"homepage": "http://www.github.com/sebastianbergmann/environment",
"keywords": [
"Xdebug",
"environment",
"hhvm"
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-04-03T09:37:03+00:00"
},
{
"name": "sebastian/exporter",
"version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
"reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "https://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-09-14T06:03:37+00:00"
},
{
"name": "sebastian/global-state",
"version": "5.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/object-reflector": "^2.0",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-dom": "*",
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-uopz": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Snapshotting of global state",
"homepage": "http://www.github.com/sebastianbergmann/global-state",
"keywords": [
"global state"
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-02-14T08:28:10+00:00"
},
{
"name": "sebastian/lines-of-code",
"version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.6",
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for counting the lines of code in PHP source code",
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-28T06:42:11+00:00"
},
{
"name": "sebastian/object-enumerator",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
"reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
"reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/object-reflector": "^2.0",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
"source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:12:34+00:00"
},
{
"name": "sebastian/object-reflector",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
"reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-reflector/issues",
"source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:14:26+00:00"
},
{
"name": "sebastian/recursion-context",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
"source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:17:30+00:00"
},
{
"name": "sebastian/resource-operations",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
"reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"support": {
"issues": "https://github.com/sebastianbergmann/resource-operations/issues",
"source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:45:17+00:00"
},
{
"name": "sebastian/type",
"version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Collection of value objects that represent the types of the PHP type system",
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/3.2.0"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-09-12T14:47:03+00:00"
},
{
"name": "sebastian/version",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
"reference": "c6c1022351a901512170118436c764e473f6de8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
"reference": "c6c1022351a901512170118436c764e473f6de8c",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues",
"source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:39:44+00:00"
},
{
"name": "slevomat/coding-standard",
"version": "7.2.1",
"source": {
"type": "git",
"url": "https://github.com/slevomat/coding-standard.git",
"reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90",
"reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
"php": "^7.2 || ^8.0",
"phpstan/phpdoc-parser": "^1.5.1",
"squizlabs/php_codesniffer": "^3.6.2"
},
"require-dev": {
"phing/phing": "2.17.3",
"php-parallel-lint/php-parallel-lint": "1.3.2",
"phpstan/phpstan": "1.4.10|1.7.1",
"phpstan/phpstan-deprecation-rules": "1.0.0",
"phpstan/phpstan-phpunit": "1.0.0|1.1.1",
"phpstan/phpstan-strict-rules": "1.2.3",
"phpunit/phpunit": "7.5.20|8.5.21|9.5.20"
},
"type": "phpcodesniffer-standard",
"extra": {
"branch-alias": {
"dev-master": "7.x-dev"
}
},
"autoload": {
"psr-4": {
"SlevomatCodingStandard\\": "SlevomatCodingStandard"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
"support": {
"issues": "https://github.com/slevomat/coding-standard/issues",
"source": "https://github.com/slevomat/coding-standard/tree/7.2.1"
},
"funding": [
{
"url": "https://github.com/kukulich",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard",
"type": "tidelift"
}
],
"time": "2022-05-25T10:58:12+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.7.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "1359e176e9307e906dc3d890bcc9603ff6d90619"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619",
"reference": "1359e176e9307e906dc3d890bcc9603ff6d90619",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"bin": [
"bin/phpcs",
"bin/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards"
],
"support": {
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"time": "2022-06-18T07:21:10+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/1.2.1"
},
"funding": [
{
"url": "https://github.com/theseer",
"type": "github"
}
],
"time": "2021-07-28T10:34:58+00:00"
},
{
"name": "webimpress/coding-standard",
"version": "1.2.4",
"source": {
"type": "git",
"url": "https://github.com/webimpress/coding-standard.git",
"reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webimpress/coding-standard/zipball/cd0c4b0b97440c337c1f7da17b524674ca2f9ca9",
"reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9",
"shasum": ""
},
"require": {
"php": "^7.3 || ^8.0",
"squizlabs/php_codesniffer": "^3.6.2"
},
"require-dev": {
"phpunit/phpunit": "^9.5.13"
},
"type": "phpcodesniffer-standard",
"extra": {
"dev-master": "1.2.x-dev",
"dev-develop": "1.3.x-dev"
},
"autoload": {
"psr-4": {
"WebimpressCodingStandard\\": "src/WebimpressCodingStandard/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"description": "Webimpress Coding Standard",
"keywords": [
"Coding Standard",
"PSR-2",
"phpcs",
"psr-12",
"webimpress"
],
"support": {
"issues": "https://github.com/webimpress/coding-standard/issues",
"source": "https://github.com/webimpress/coding-standard/tree/1.2.4"
},
"funding": [
{
"url": "https://github.com/michalbundyra",
"type": "github"
}
],
"time": "2022-02-15T19:52:12+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"ext-json": "*"
},
"platform-dev": [],
"plugin-api-version": "2.2.0"
}
PK mPUm phpcs.xmlnu ٘
src
test
*/_files/*
src/
src/AbstractConfigFactory.php
PK mPUG README.mdnu ٘ # laminas-config
> ## 🇷🇺 Русским гражданам
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"
> This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
> If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
> If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
[![Build Status](https://github.com/laminas/laminas-config/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-config/actions?query=workflow%3A"Continuous+Integration")
laminas-config is designed to simplify access to configuration data within
applications. It provides a nested object property-based user interface for
accessing this configuration data within application code. The configuration
data may come from a variety of media supporting hierarchical data storage.
- File issues at https://github.com/laminas/laminas-config/issues
- Documentation is at https://docs.laminas.dev/laminas-config/
PK mPU-N
.gitignorenu ٘ /.phpunit.result.cache
/clover.xml
/coveralls-upload.json
/docs/html/
/laminas-mkdoc-theme.tgz
/laminas-mkdoc-theme/
/phpunit.xml
/vendor/
PK mPU0! ! src/Reader/Ini.phpnu ٘ nestSeparator = $separator;
return $this;
}
/**
* Get nest separator.
*
* @return string
*/
public function getNestSeparator()
{
return $this->nestSeparator;
}
/**
* Marks whether sections should be processed.
* When sections are not processed,section names are stripped and section
* values are merged
*
* @see https://www.php.net/parse_ini_file
*
* @param bool $processSections
* @return $this
*/
public function setProcessSections($processSections)
{
$this->processSections = (bool) $processSections;
return $this;
}
/**
* Get if sections should be processed
* When sections are not processed,section names are stripped and section
* values are merged
*
* @see https://www.php.net/parse_ini_file
*
* @return bool
*/
public function getProcessSections()
{
return $this->processSections;
}
/**
* Set whether boolean, null, and integer values should be returned as their proper types.
* When set to false, all values will be returned as strings.
*
* @see https://www.php.net/parse_ini_file
*/
public function setTypedMode(bool $typedMode): self
{
$this->typedMode = $typedMode;
return $this;
}
/**
* Get whether boolean, null, and integer values should be returned as their proper types.
* When set to false, all values will be returned as strings.
*
* @see https://www.php.net/parse_ini_file
*/
public function getTypedMode(): bool
{
return $this->typedMode;
}
/**
* Get the scanner-mode constant value to be used with the built-in parse_ini_file function.
* Either INI_SCANNER_NORMAL or INI_SCANNER_TYPED depending on $typedMode.
*
* @see https://www.php.net/parse_ini_file
*/
public function getScannerMode(): int
{
return $this->getTypedMode() ? INI_SCANNER_TYPED : INI_SCANNER_NORMAL;
}
/**
* fromFile(): defined by Reader interface.
*
* @see ReaderInterface::fromFile()
*
* @param string $filename
* @return array
* @throws Exception\RuntimeException
*/
public function fromFile($filename)
{
if (! is_file($filename) || ! is_readable($filename)) {
throw new Exception\RuntimeException(sprintf(
"File '%s' doesn't exist or not readable",
$filename
));
}
$this->directory = dirname($filename);
set_error_handler(
function ($error, $message = '') use ($filename) {
throw new Exception\RuntimeException(
sprintf('Error reading INI file "%s": %s', $filename, $message),
$error
);
},
E_WARNING
);
$ini = parse_ini_file($filename, $this->getProcessSections(), $this->getScannerMode());
restore_error_handler();
return $this->process($ini);
}
/**
* fromString(): defined by Reader interface.
*
* @param string $string
* @return array|bool
* @throws Exception\RuntimeException
*/
public function fromString($string)
{
if (empty($string)) {
return [];
}
$this->directory = null;
set_error_handler(
function ($error, $message = '') {
throw new Exception\RuntimeException(
sprintf('Error reading INI string: %s', $message),
$error
);
},
E_WARNING
);
$ini = parse_ini_string($string, $this->getProcessSections(), $this->getScannerMode());
restore_error_handler();
return $this->process($ini);
}
/**
* Process data from the parsed ini file.
*
* @param array $data
* @return array
*/
protected function process(array $data)
{
$config = [];
foreach ($data as $section => $value) {
if (is_array($value)) {
if (strpos($section, $this->nestSeparator) !== false) {
$sections = explode($this->nestSeparator, $section);
$config = array_merge_recursive($config, $this->buildNestedSection($sections, $value));
} else {
$config[$section] = $this->processSection($value);
}
} else {
$this->processKey($section, $value, $config);
}
}
return $config;
}
/**
* Process a nested section
*
* @param array $sections
* @param mixed $value
* @return array
*/
private function buildNestedSection($sections, $value)
{
if (! $sections) {
return $this->processSection($value);
}
$nestedSection = [];
$first = array_shift($sections);
$nestedSection[$first] = $this->buildNestedSection($sections, $value);
return $nestedSection;
}
/**
* Process a section.
*
* @param array $section
* @return array
*/
protected function processSection(array $section)
{
$config = [];
foreach ($section as $key => $value) {
$this->processKey($key, $value, $config);
}
return $config;
}
/**
* Process a key.
*
* @param string $key
* @param string $value
* @param array $config
* @throws Exception\RuntimeException
*/
protected function processKey($key, $value, array &$config)
{
if (strpos($key, $this->nestSeparator) !== false) {
$pieces = explode($this->nestSeparator, $key, 2);
if ($pieces[0] === '' || $pieces[1] === '') {
throw new Exception\RuntimeException(sprintf('Invalid key "%s"', $key));
}
if (! isset($config[$pieces[0]])) {
if ($pieces[0] === '0' && ! empty($config)) {
$config = [$pieces[0] => $config];
} else {
$config[$pieces[0]] = [];
}
} elseif (! is_array($config[$pieces[0]])) {
throw new Exception\RuntimeException(
sprintf('Cannot create sub-key for "%s", as key already exists', $pieces[0])
);
}
$this->processKey($pieces[1], $value, $config[$pieces[0]]);
} else {
if ($key === '@include') {
if ($this->directory === null) {
throw new Exception\RuntimeException('Cannot process @include statement for a string config');
}
$reader = clone $this;
$include = $reader->fromFile($this->directory . '/' . $value);
$config = array_replace_recursive($config, $include);
} else {
$config[$key] = $value;
}
}
}
}
PK mPU#I* * src/Reader/JavaProperties.phpnu ٘ delimiter = $delimiter;
$this->trimWhitespace = (bool) $trimWhitespace;
}
/**
* fromFile(): defined by Reader interface.
*
* @see ReaderInterface::fromFile()
*
* @param string $filename
* @return array
* @throws Exception\RuntimeException If the file cannot be read.
*/
public function fromFile($filename)
{
if (! is_file($filename) || ! is_readable($filename)) {
throw new Exception\RuntimeException(sprintf(
"File '%s' doesn't exist or not readable",
$filename
));
}
$this->directory = dirname($filename);
$config = $this->parse(file_get_contents($filename));
return $this->process($config);
}
/**
* fromString(): defined by Reader interface.
*
* @see ReaderInterface::fromString()
*
* @param string $string
* @return array
* @throws Exception\RuntimeException If an @include key is found.
*/
public function fromString($string)
{
if (empty($string)) {
return [];
}
$this->directory = null;
$config = $this->parse($string);
return $this->process($config);
}
/**
* Process the array for @include
*
* @param array $data
* @return array
* @throws Exception\RuntimeException If an @include key is found.
*/
protected function process(array $data)
{
foreach ($data as $key => $value) {
if (trim($key) === '@include') {
if ($this->directory === null) {
throw new Exception\RuntimeException('Cannot process @include statement for a string');
}
$reader = clone $this;
unset($data[$key]);
$data = array_replace_recursive($data, $reader->fromFile($this->directory . '/' . $value));
}
}
return $data;
}
/**
* Parse Java-style properties string
*
* @todo Support use of the equals sign "key=value" as key-value delimiter
* @todo Ignore whitespace that precedes text past the first line of multiline values
* @param string $string
* @return array
*/
protected function parse($string)
{
$delimiter = $this->delimiter;
$delimLength = strlen($delimiter);
$result = [];
$lines = explode("\n", $string);
$key = '';
$isWaitingOtherLine = false;
foreach ($lines as $i => $line) {
// Ignore empty lines and commented lines
if (
empty($line)
|| (! $isWaitingOtherLine && strpos($line, "#") === 0)
|| (! $isWaitingOtherLine && strpos($line, "!") === 0)
) {
continue;
}
// Add a new key-value pair or append value to a previous pair
if (! $isWaitingOtherLine) {
$key = substr($line, 0, strpos($line, $delimiter));
$value = substr($line, strpos($line, $delimiter) + $delimLength, strlen($line));
} else {
$value .= $line;
}
// Check if ends with single '\' (indicating another line is expected)
if (strrpos($value, "\\") === strlen($value) - strlen("\\")) {
$value = substr($value, 0, -1);
$isWaitingOtherLine = true;
} else {
$isWaitingOtherLine = false;
}
$key = $this->trimWhitespace ? trim($key) : $key;
$value = $this->trimWhitespace && ! $isWaitingOtherLine
? trim($value)
: $value;
$result[$key] = stripslashes($value);
unset($lines[$i]);
}
return $result;
}
}
PK mPU6p src/Reader/Xml.phpnu ٘ reader = new XMLReader();
$this->reader->open($filename, null, LIBXML_XINCLUDE);
$this->directory = dirname($filename);
set_error_handler(
function ($error, $message = '') use ($filename) {
throw new Exception\RuntimeException(
sprintf('Error reading XML file "%s": %s', $filename, $message),
$error
);
},
E_WARNING
);
$return = $this->process();
restore_error_handler();
$this->reader->close();
return $return;
}
/**
* fromString(): defined by Reader interface.
*
* @see ReaderInterface::fromString()
*
* @param string $string
* @return array|bool
* @throws Exception\RuntimeException
*/
public function fromString($string)
{
if (empty($string)) {
return [];
}
$this->reader = new XMLReader();
$this->reader->XML($string, null, LIBXML_XINCLUDE);
$this->directory = null;
set_error_handler(
function ($error, $message = '') {
throw new Exception\RuntimeException(
sprintf('Error reading XML string: %s', $message),
$error
);
},
E_WARNING
);
$return = $this->process();
restore_error_handler();
$this->reader->close();
return $return;
}
/**
* Process data from the created XMLReader.
*
* @return array
*/
protected function process()
{
return $this->processNextElement();
}
/**
* Process the next inner element.
*
* @return mixed
*/
protected function processNextElement()
{
$children = [];
$text = '';
while ($this->reader->read()) {
if ($this->reader->nodeType === XMLReader::ELEMENT) {
if ($this->reader->depth === 0) {
return $this->processNextElement();
}
$attributes = $this->getAttributes();
$name = $this->reader->name;
if ($this->reader->isEmptyElement) {
$child = [];
} else {
$child = $this->processNextElement();
}
if ($attributes) {
if (is_string($child)) {
$child = ['_' => $child];
}
if (! is_array($child)) {
$child = [];
}
$child = array_merge($child, $attributes);
}
if (isset($children[$name])) {
if (! is_array($children[$name]) || ! array_key_exists(0, $children[$name])) {
$children[$name] = [$children[$name]];
}
$children[$name][] = $child;
} else {
$children[$name] = $child;
}
} elseif ($this->reader->nodeType === XMLReader::END_ELEMENT) {
break;
} elseif (in_array($this->reader->nodeType, $this->textNodes)) {
$text .= $this->reader->value;
}
}
return $children ?: $text;
}
/**
* Get all attributes on the current node.
*
* @return array
*/
protected function getAttributes()
{
$attributes = [];
if ($this->reader->hasAttributes) {
while ($this->reader->moveToNextAttribute()) {
$attributes[$this->reader->localName] = $this->reader->value;
}
$this->reader->moveToElement();
}
return $attributes;
}
}
PK mPU' src/Reader/ReaderInterface.phpnu ٘ directory = dirname($filename);
$config = $this->decode(file_get_contents($filename));
return $this->process($config);
}
/**
* fromString(): defined by Reader interface.
*
* @see ReaderInterface::fromString()
*
* @param string $string
* @return array|bool
* @throws Exception\RuntimeException
*/
public function fromString($string)
{
if (empty($string)) {
return [];
}
$this->directory = null;
$config = $this->decode($string);
return $this->process($config);
}
/**
* Process the array for @include
*
* @param array $data
* @return array
* @throws Exception\RuntimeException
*/
protected function process(array $data)
{
foreach ($data as $key => $value) {
if (is_array($value)) {
$data[$key] = $this->process($value);
}
if (trim($key) === '@include') {
if ($this->directory === null) {
throw new Exception\RuntimeException('Cannot process @include statement for a JSON string');
}
$reader = clone $this;
unset($data[$key]);
$data = array_replace_recursive($data, $reader->fromFile($this->directory . '/' . $value));
}
}
return $data;
}
/**
* Decode JSON configuration.
*
* Determines if ext/json is present, and, if so, uses that to decode the
* configuration. Otherwise, it uses laminas-json, and, if that is missing,
* raises an exception indicating inability to decode.
*
* @param string $data
* @return array
* @throws Exception\RuntimeException For any decoding errors.
*/
private function decode($data)
{
$config = json_decode($data, true);
if (null !== $config && ! is_array($config)) {
throw new Exception\RuntimeException(
'Invalid JSON configuration; did not return an array or object'
);
}
if (null !== $config) {
return $config;
}
if (JSON_ERROR_NONE === json_last_error()) {
return $config;
}
throw new Exception\RuntimeException(json_last_error_msg());
}
}
PK mPU L%p p src/Reader/Yaml.phpnu ٘ setYamlDecoder($yamlDecoder);
} else {
if (function_exists('yaml_parse')) {
$this->setYamlDecoder('yaml_parse');
}
}
}
/**
* Set callback for decoding YAML
*
* @param string|callable $yamlDecoder the decoder to set
* @return self
* @throws Exception\RuntimeException
*/
public function setYamlDecoder($yamlDecoder)
{
if (! is_callable($yamlDecoder)) {
throw new Exception\RuntimeException(
'Invalid parameter to setYamlDecoder() - must be callable'
);
}
$this->yamlDecoder = $yamlDecoder;
return $this;
}
/**
* Get callback for decoding YAML
*
* @return callable
*/
public function getYamlDecoder()
{
return $this->yamlDecoder;
}
/**
* fromFile(): defined by Reader interface.
*
* @see ReaderInterface::fromFile()
*
* @param string $filename
* @return array
* @throws Exception\RuntimeException
*/
public function fromFile($filename)
{
if (! is_file($filename) || ! is_readable($filename)) {
throw new Exception\RuntimeException(sprintf(
"File '%s' doesn't exist or not readable",
$filename
));
}
if (null === $this->getYamlDecoder()) {
throw new Exception\RuntimeException("You didn't specify a Yaml callback decoder");
}
$this->directory = dirname($filename);
$config = call_user_func($this->getYamlDecoder(), file_get_contents($filename));
if (null === $config) {
throw new Exception\RuntimeException("Error parsing YAML data");
}
return $this->process($config);
}
/**
* fromString(): defined by Reader interface.
*
* @see ReaderInterface::fromString()
*
* @param string $string
* @return array|bool
* @throws Exception\RuntimeException
*/
public function fromString($string)
{
if (null === $this->getYamlDecoder()) {
throw new Exception\RuntimeException("You didn't specify a Yaml callback decoder");
}
if (empty($string)) {
return [];
}
$this->directory = null;
$config = call_user_func($this->getYamlDecoder(), $string);
if (null === $config) {
throw new Exception\RuntimeException("Error parsing YAML data");
}
return $this->process($config);
}
/**
* Process the array for @include
*
* @param array $data
* @return array
* @throws Exception\RuntimeException
*/
protected function process(array $data)
{
foreach ($data as $key => $value) {
if (is_array($value)) {
$data[$key] = $this->process($value);
}
if (trim($key) === '@include') {
if ($this->directory === null) {
throw new Exception\RuntimeException('Cannot process @include statement for a json string');
}
$reader = clone $this;
unset($data[$key]);
$data = array_replace_recursive($data, $reader->fromFile($this->directory . '/' . $value));
}
}
return $data;
}
}
PK mPUv- " src/Exception/RuntimeException.phpnu ٘ Writer\Ini::class,
'Ini' => Writer\Ini::class,
'json' => Writer\Json::class,
'Json' => Writer\Json::class,
'php' => Writer\PhpArray::class,
'phparray' => Writer\PhpArray::class,
'phpArray' => Writer\PhpArray::class,
'PhpArray' => Writer\PhpArray::class,
'yaml' => Writer\Yaml::class,
'Yaml' => Writer\Yaml::class,
'xml' => Writer\Xml::class,
'Xml' => Writer\Xml::class,
'javaproperties' => Writer\JavaProperties::class,
'javaProperties' => Writer\JavaProperties::class,
'JavaProperties' => Writer\JavaProperties::class,
// Legacy Zend Framework aliases
Ini::class => Writer\Ini::class,
JavaProperties::class => Writer\JavaProperties::class,
Json::class => Writer\Json::class,
PhpArray::class => Writer\PhpArray::class,
Yaml::class => Writer\Yaml::class,
Xml::class => Writer\Xml::class,
// v2 normalized FQCNs
'zendconfigwriterini' => Writer\Ini::class,
'zendconfigwriterjavaproperties' => Writer\JavaProperties::class,
'zendconfigwriterjson' => Writer\Json::class,
'zendconfigwriterphparray' => Writer\PhpArray::class,
'zendconfigwriteryaml' => Writer\Yaml::class,
'zendconfigwriterxml' => Writer\Xml::class,
];
/** @var string[] */
protected $factories = [
Writer\Ini::class => InvokableFactory::class,
Writer\JavaProperties::class => InvokableFactory::class,
Writer\Json::class => InvokableFactory::class,
Writer\PhpArray::class => InvokableFactory::class,
Writer\Yaml::class => InvokableFactory::class,
Writer\Xml::class => InvokableFactory::class,
// Legacy (v2) due to alias resolution; canonical form of resolved
// alias is used to look up the factory, while the non-normalized
// resolved alias is used as the requested name passed to the factory.
'laminasconfigwriterini' => InvokableFactory::class,
'laminasconfigwriterjavaproperties' => InvokableFactory::class,
'laminasconfigwriterjson' => InvokableFactory::class,
'laminasconfigwriterphparray' => InvokableFactory::class,
'laminasconfigwriteryaml' => InvokableFactory::class,
'laminasconfigwriterxml' => InvokableFactory::class,
];
/**
* Validate the plugin is of the expected type (v3).
*
* Validates against `$instanceOf`.
*
* @param mixed $instance
* @throws InvalidServiceException
*/
public function validate($instance)
{
if (! $instance instanceof $this->instanceOf) {
throw new InvalidServiceException(sprintf(
'%s can only create instances of %s; %s is invalid',
static::class,
$this->instanceOf,
is_object($instance) ? $instance::class : gettype($instance)
));
}
}
/**
* Validate the plugin is of the expected type (v2).
*
* Proxies to `validate()`.
*
* @param mixed $instance
* @throws Exception\InvalidArgumentException
*/
public function validatePlugin($instance)
{
try {
$this->validate($instance);
} catch (InvalidServiceException $e) {
throw new Exception\InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
}
}
public function __construct(containerinterface $container, array $config = [])
{
$config = array_merge_recursive(['aliases' => $this->aliases], $config);
parent::__construct($container, $config);
}
}
PK mPUyP src/AbstractConfigFactory.phpnu ٘ canCreate($serviceLocator, $requestedName);
}
/**
* Determine if we can create a service (SM v3)
*
* @param string $requestedName
* @return bool
*/
public function canCreate(Containerinterface $container, $requestedName)
{
if (isset($this->configs[$requestedName])) {
return true;
}
if (! $container->has('config')) {
return false;
}
$key = $this->match($requestedName);
if (null === $key) {
return false;
}
$config = $container->get('config');
return isset($config[$key]);
}
/**
* Create service with name (SM v2)
*
* @param string $name
* @param string $requestedName
* @return string|mixed|array
*/
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
{
return $this($serviceLocator, $requestedName);
}
/**
* Create service with name (SM v3)
*
* @param string $requestedName
* @param array $options
* @return string|mixed|array
*/
public function __invoke(Containerinterface $container, $requestedName, ?array $options = null)
{
if (isset($this->configs[$requestedName])) {
return $this->configs[$requestedName];
}
$key = $this->match($requestedName);
if (isset($this->configs[$key])) {
$this->configs[$requestedName] = $this->configs[$key];
return $this->configs[$key];
}
$config = $container->get('config');
$this->configs[$requestedName] = $this->configs[$key] = $config[$key];
return $config[$key];
}
/**
* @param string $pattern
* @return self
* @throws Exception\InvalidArgumentException
*/
public function addPattern($pattern)
{
if (! is_string($pattern)) {
throw new Exception\InvalidArgumentException('pattern must be string');
}
$patterns = $this->getPatterns();
array_unshift($patterns, $pattern);
$this->setPatterns($patterns);
return $this;
}
/**
* @param array|Traversable $patterns
* @return self
* @throws Exception\InvalidArgumentException
*/
public function addPatterns($patterns)
{
if ($patterns instanceof Traversable) {
$patterns = iterator_to_array($patterns);
}
if (! is_array($patterns)) {
throw new Exception\InvalidArgumentException("patterns must be array or Traversable");
}
foreach ($patterns as $pattern) {
$this->addPattern($pattern);
}
return $this;
}
/**
* @param array|Traversable $patterns
* @return self
* @throws InvalidArgumentException
*/
public function setPatterns($patterns)
{
if ($patterns instanceof Traversable) {
$patterns = iterator_to_array($patterns);
}
if (! is_array($patterns)) {
throw new InvalidArgumentException("patterns must be array or Traversable");
}
$this->patterns = $patterns;
return $this;
}
/**
* @return array
*/
public function getPatterns()
{
if (null === $this->patterns) {
$this->setPatterns($this->defaultPatterns);
}
return $this->patterns;
}
/**
* @param string $requestedName
* @return null|string
*/
protected function match($requestedName)
{
foreach ($this->getPatterns() as $pattern) {
if (preg_match($pattern, $requestedName, $matches)) {
return $matches[1];
}
}
return null;
}
}
PK mPU<+Xc c src/ReaderPluginManager.phpnu ٘ Reader\Ini::class,
'Ini' => Reader\Ini::class,
'json' => Reader\Json::class,
'Json' => Reader\Json::class,
'xml' => Reader\Xml::class,
'Xml' => Reader\Xml::class,
'yaml' => Reader\Yaml::class,
'Yaml' => Reader\Yaml::class,
'javaproperties' => Reader\JavaProperties::class,
'javaProperties' => Reader\JavaProperties::class,
'JavaProperties' => Reader\JavaProperties::class,
// Legacy Zend Framework aliases
Ini::class => Reader\Ini::class,
Json::class => Reader\Json::class,
Xml::class => Reader\Xml::class,
Yaml::class => Reader\Yaml::class,
JavaProperties::class => Reader\JavaProperties::class,
// v2 normalized FQCNs
'zendconfigreaderini' => Reader\Ini::class,
'zendconfigreaderjson' => Reader\Json::class,
'zendconfigreaderxml' => Reader\Xml::class,
'zendconfigreaderyaml' => Reader\Yaml::class,
'zendconfigreaderjavaproperties' => Reader\JavaProperties::class,
];
/** @var string[] */
protected $factories = [
Reader\Ini::class => InvokableFactory::class,
Reader\Json::class => InvokableFactory::class,
Reader\Xml::class => InvokableFactory::class,
Reader\Yaml::class => InvokableFactory::class,
Reader\JavaProperties::class => InvokableFactory::class,
// Legacy (v2) due to alias resolution; canonical form of resolved
// alias is used to look up the factory, while the non-normalized
// resolved alias is used as the requested name passed to the factory.
'laminasconfigreaderini' => InvokableFactory::class,
'laminasconfigreaderjson' => InvokableFactory::class,
'laminasconfigreaderxml' => InvokableFactory::class,
'laminasconfigreaderyaml' => InvokableFactory::class,
'laminasconfigreaderjavaproperties' => InvokableFactory::class,
];
/**
* Validate the plugin is of the expected type (v3).
*
* Validates against `$instanceOf`.
*
* @param mixed $instance
* @throws InvalidServiceException
*/
public function validate($instance)
{
if (! $instance instanceof $this->instanceOf) {
throw new InvalidServiceException(sprintf(
'%s can only create instances of %s; %s is invalid',
static::class,
$this->instanceOf,
is_object($instance) ? $instance::class : gettype($instance)
));
}
}
/**
* Validate the plugin is of the expected type (v2).
*
* Proxies to `validate()`.
*
* @param mixed $instance
* @throws Exception\InvalidArgumentException
*/
public function validatePlugin($instance)
{
try {
$this->validate($instance);
} catch (InvalidServiceException $e) {
throw new Exception\InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
}
}
public function __construct(containerinterface $container, array $config = [])
{
$config = array_merge_recursive(['aliases' => $this->aliases], $config);
parent::__construct($container, $config);
}
}
PK mPU_A src/Writer/WriterInterface.phpnu ٘ $this->useBracketArraySyntax ? '[' : 'array(',
'close' => $this->useBracketArraySyntax ? ']' : ')',
];
return "processIndented($config, $arraySyntax)
. $arraySyntax['close'] . ";\n";
}
/**
* Sets whether or not to use the PHP 5.4+ "[]" array syntax.
*
* @param bool $value
* @return self
*/
public function setUseBracketArraySyntax($value)
{
$this->useBracketArraySyntax = $value;
return $this;
}
/**
* Sets whether or not to render resolvable FQN strings as scalars, using PHP 5.5+ class-keyword
*
* @param boolean $value
* @return self
*/
public function setUseClassNameScalars($value)
{
$this->useClassNameScalars = $value;
return $this;
}
/**
* @return boolean
*/
public function getUseClassNameScalars()
{
return $this->useClassNameScalars;
}
/**
* toFile(): defined by Writer interface.
*
* @see WriterInterface::toFile()
*
* @param string $filename
* @param mixed $config
* @param bool $exclusiveLock
* @return void
* @throws Exception\InvalidArgumentException
* @throws Exception\RuntimeException
*/
public function toFile($filename, $config, $exclusiveLock = true)
{
if (empty($filename)) {
throw new Exception\InvalidArgumentException('No file name specified');
}
$flags = 0;
if ($exclusiveLock) {
$flags |= LOCK_EX;
}
set_error_handler(
function ($error, $message = '') use ($filename) {
throw new Exception\RuntimeException(
sprintf('Error writing to "%s": %s', $filename, $message),
$error
);
},
E_WARNING
);
try {
// for Windows, paths are escaped.
$dirname = str_replace('\\', '\\\\', dirname($filename));
$string = $this->toString($config);
$string = str_replace("'" . $dirname, "__DIR__ . '", $string);
file_put_contents($filename, $string, $flags);
} catch (\Exception $e) {
restore_error_handler();
throw $e;
}
restore_error_handler();
}
/**
* Recursively processes a PHP config array structure into a readable format.
*
* @param array $config
* @param array $arraySyntax
* @param int $indentLevel
* @return string
*/
protected function processIndented(array $config, array $arraySyntax, &$indentLevel = 1)
{
$arrayString = "";
foreach ($config as $key => $value) {
$arrayString .= str_repeat(self::INDENT_STRING, $indentLevel);
$arrayString .= (is_int($key) ? $key : $this->processStringKey($key)) . ' => ';
if (is_array($value)) {
if ($value === []) {
$arrayString .= $arraySyntax['open'] . $arraySyntax['close'] . ",\n";
} else {
$indentLevel++;
$arrayString .= $arraySyntax['open'] . "\n"
. $this->processIndented($value, $arraySyntax, $indentLevel)
. str_repeat(self::INDENT_STRING, --$indentLevel) . $arraySyntax['close'] . ",\n";
}
} elseif (is_object($value)) {
$arrayString .= var_export($value, true) . ",\n";
} elseif (is_string($value)) {
$arrayString .= $this->processStringValue($value) . ",\n";
} elseif (is_bool($value)) {
$arrayString .= ($value ? 'true' : 'false') . ",\n";
} elseif ($value === null) {
$arrayString .= "null,\n";
} else {
$arrayString .= $value . ",\n";
}
}
return $arrayString;
}
/**
* Process a string configuration value
*
* @param string $value
* @return string
*/
protected function processStringValue($value)
{
if ($this->useClassNameScalars && false !== ($fqnValue = $this->fqnStringToClassNameScalar($value))) {
return $fqnValue;
}
return var_export($value, true);
}
/**
* Process a string configuration key
*
* @param string $key
* @return string
*/
protected function processStringKey($key)
{
if ($this->useClassNameScalars && false !== ($fqnKey = $this->fqnStringToClassNameScalar($key))) {
return $fqnKey;
}
return "'" . addslashes($key) . "'";
}
/**
* Attempts to convert a FQN string to class name scalar.
* Returns false if string is not a valid FQN or can not be resolved to an existing name.
*
* @param string $string
* @return bool|string
*/
protected function fqnStringToClassNameScalar($string)
{
if (strlen($string) < 1) {
return false;
}
if ($string[0] !== '\\') {
$string = '\\' . $string;
}
if ($this->checkStringIsFqn($string)) {
return $string . '::class';
}
return false;
}
/**
* Check whether a string represents a resolvable FQCN
*
* @param string $string
* @return bool
*/
protected function checkStringIsFqn($string)
{
if (! preg_match('/^(?:\x5c[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $string)) {
return false;
}
return class_exists($string) || interface_exists($string) || trait_exists($string);
}
}
PK mPUkz src/Writer/AbstractWriter.phpnu ٘ toString($config), $flags);
} catch (\Exception $e) {
restore_error_handler();
throw $e;
}
restore_error_handler();
}
/**
* toString(): defined by Writer interface.
*
* @see WriterInterface::toString()
*
* @param mixed $config
* @return string
* @throws Exception\InvalidArgumentException
*/
public function toString($config)
{
if ($config instanceof Traversable) {
$config = ArrayUtils::iteratorToArray($config);
} elseif (! is_array($config)) {
throw new Exception\InvalidArgumentException(__METHOD__ . ' expects an array or Traversable config');
}
return $this->processConfig($config);
}
/**
* @param array $config
* @return string
*/
abstract protected function processConfig(array $config);
}
PK mPUz5 src/Writer/Ini.phpnu ٘ nestSeparator = $separator;
return $this;
}
/**
* Get nest separator.
*
* @return string
*/
public function getNestSeparator()
{
return $this->nestSeparator;
}
/**
* Set if rendering should occur without sections or not.
*
* If set to true, the INI file is rendered without sections completely
* into the global namespace of the INI file.
*
* @param bool $withoutSections
* @return self
*/
public function setRenderWithoutSectionsFlags($withoutSections)
{
$this->renderWithoutSections = (bool) $withoutSections;
return $this;
}
/**
* Return whether the writer should render without sections.
*
* @return bool
*/
public function shouldRenderWithoutSections()
{
return $this->renderWithoutSections;
}
/**
* processConfig(): defined by AbstractWriter.
*
* @param array $config
* @return string
*/
public function processConfig(array $config)
{
$iniString = '';
if ($this->shouldRenderWithoutSections()) {
$iniString .= $this->addBranch($config);
} else {
$config = $this->sortRootElements($config);
foreach ($config as $sectionName => $data) {
if (! is_array($data)) {
$iniString .= $sectionName
. ' = '
. $this->prepareValue($data)
. "\n";
} else {
$iniString .= '[' . $sectionName . ']' . "\n"
. $this->addBranch($data)
. "\n";
}
}
}
return $iniString;
}
/**
* Add a branch to an INI string recursively.
*
* @param array $config
* @param array $parents
* @return string
*/
protected function addBranch(array $config, $parents = [])
{
$iniString = '';
foreach ($config as $key => $value) {
$group = array_merge($parents, [$key]);
if (is_array($value)) {
$iniString .= $this->addBranch($value, $group);
} else {
$iniString .= implode($this->nestSeparator, $group)
. ' = '
. $this->prepareValue($value)
. "\n";
}
}
return $iniString;
}
/**
* Prepare a value for INI.
*
* @param mixed $value
* @return string
* @throws Exception\RuntimeException
*/
protected function prepareValue($value)
{
if (is_int($value) || is_float($value)) {
return $value;
}
if (is_bool($value)) {
return $value ? 'true' : 'false';
}
if (false === strpos($value, '"')) {
return '"' . $value . '"';
}
throw new Exception\RuntimeException('Value can not contain double quotes');
}
/**
* Root elements that are not assigned to any section needs to be on the
* top of config.
*
* @param array $config
* @return array
*/
protected function sortRootElements(array $config)
{
$sections = [];
// Remove sections from config array.
foreach ($config as $key => $value) {
if (is_array($value)) {
$sections[$key] = $value;
unset($config[$key]);
}
}
// Read sections to the end.
foreach ($sections as $key => $value) {
$config[$key] = $value;
}
return $config;
}
}
PK mPU"L' src/Writer/JavaProperties.phpnu ٘ delimiter = $delimiter;
}
/**
* processConfig(): defined by AbstractWriter.
*
* @param array $config
* @return string
* @throws Exception\UnprocessableConfigException For non-scalar values in the $config array.
*/
public function processConfig(array $config)
{
$string = '';
foreach ($config as $key => $value) {
if (! is_scalar($value)) {
throw new Exception\UnprocessableConfigException(sprintf(
'%s configuration writer can only process scalar values; received "%s" for key "%s"',
self::class,
is_object($value) ? $value::class : gettype($value),
$key
));
}
$value = $value ?? '';
$string .= sprintf(
"%s%s%s\n",
$key,
$this->delimiter,
$value
);
}
return $string;
}
}
PK mPUӡ src/Writer/Xml.phpnu ٘ openMemory();
$writer->setIndent(true);
$writer->setIndentString(str_repeat(' ', 4));
$writer->startDocument('1.0', 'UTF-8');
$writer->startElement('laminas-config');
foreach ($config as $sectionName => $data) {
if (! is_array($data)) {
$writer->writeElement($sectionName, (string) $data);
} else {
$this->addBranch($sectionName, $data, $writer);
}
}
$writer->endElement();
$writer->endDocument();
return $writer->outputMemory();
}
/**
* Add a branch to an XML object recursively.
*
* @param string $branchName
* @param array $config
* @return void
* @throws Exception\RuntimeException
*/
protected function addBranch($branchName, array $config, XMLWriter $writer)
{
$branchType = null;
foreach ($config as $key => $value) {
if ($branchType === null) {
if (is_numeric($key)) {
$branchType = 'numeric';
} else {
$writer->startElement($branchName);
$branchType = 'string';
}
} elseif ($branchType !== (is_numeric($key) ? 'numeric' : 'string')) {
throw new Exception\RuntimeException('Mixing of string and numeric keys is not allowed');
}
if ($branchType === 'numeric') {
if (is_array($value)) {
$this->addBranch($branchName, $value, $writer);
} else {
$writer->writeElement($branchName, (string) $value);
}
} else {
if (is_array($value)) {
$this->addBranch($key, $value, $writer);
} else {
$writer->writeElement($key, (string) $value);
}
}
}
if ($branchType === 'string') {
$writer->endElement();
}
}
}
PK mPU7[ src/Writer/Json.phpnu ٘ setYamlEncoder($yamlEncoder);
} else {
if (function_exists('yaml_emit')) {
$this->setYamlEncoder('yaml_emit');
}
}
}
/**
* Get callback for decoding YAML
*
* @return callable
*/
public function getYamlEncoder()
{
return $this->yamlEncoder;
}
/**
* Set callback for decoding YAML
*
* @param callable $yamlEncoder the decoder to set
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setYamlEncoder($yamlEncoder)
{
if (! is_callable($yamlEncoder)) {
throw new Exception\InvalidArgumentException('Invalid parameter to setYamlEncoder() - must be callable');
}
$this->yamlEncoder = $yamlEncoder;
return $this;
}
/**
* processConfig(): defined by AbstractWriter.
*
* @param array $config
* @return string
* @throws Exception\RuntimeException
*/
public function processConfig(array $config)
{
if (null === $this->getYamlEncoder()) {
throw new Exception\RuntimeException("You didn't specify a Yaml callback encoder");
}
$config = call_user_func($this->getYamlEncoder(), $config);
if (null === $config) {
throw new Exception\RuntimeException("Error generating YAML data");
}
return $config;
}
}
PK mPU%% %% src/Factory.phpnu ٘ 'ini',
'json' => 'json',
'xml' => 'xml',
'yaml' => 'yaml',
'yml' => 'yaml',
'properties' => 'javaproperties',
];
/**
* Register config file extensions for writing
* key is extension, value is writer instance or plugin name
*
* @var array
*/
protected static $writerExtensions = [
'php' => 'php',
'ini' => 'ini',
'json' => 'json',
'xml' => 'xml',
'yaml' => 'yaml',
'yml' => 'yaml',
];
/**
* Read a config from a file.
*
* @param string $filename
* @param bool $returnConfigObject
* @param bool $useIncludePath
* @return array|Config
* @throws Exception\InvalidArgumentException
* @throws Exception\RuntimeException
*/
public static function fromFile($filename, $returnConfigObject = false, $useIncludePath = false)
{
$filepath = $filename;
if (! file_exists($filename)) {
if (! $useIncludePath) {
throw new Exception\RuntimeException(sprintf(
'Filename "%s" cannot be found relative to the working directory',
$filename
));
}
$fromIncludePath = stream_resolve_include_path($filename);
if (! $fromIncludePath) {
throw new Exception\RuntimeException(sprintf(
'Filename "%s" cannot be found relative to the working directory or the include_path ("%s")',
$filename,
get_include_path()
));
}
$filepath = $fromIncludePath;
}
$pathinfo = pathinfo($filepath);
if (! isset($pathinfo['extension'])) {
throw new Exception\RuntimeException(sprintf(
'Filename "%s" is missing an extension and cannot be auto-detected',
$filename
));
}
$extension = strtolower($pathinfo['extension']);
if ($extension === 'php') {
if (! is_file($filepath) || ! is_readable($filepath)) {
throw new Exception\RuntimeException(sprintf(
"File '%s' doesn't exist or not readable",
$filename
));
}
$config = include $filepath;
} elseif (isset(static::$extensions[$extension])) {
$reader = static::$extensions[$extension];
if (! $reader instanceof Reader\ReaderInterface) {
$reader = static::getReaderPluginManager()->get($reader);
static::$extensions[$extension] = $reader;
}
// @codingStandardsIgnoreLine
/** @var Reader\ReaderInterface $reader */
$config = $reader->fromFile($filepath);
} else {
throw new Exception\RuntimeException(sprintf(
'Unsupported config file extension: .%s',
$pathinfo['extension']
));
}
return $returnConfigObject ? new Config($config) : $config;
}
/**
* Read configuration from multiple files and merge them.
*
* @param array $files
* @param bool $returnConfigObject
* @param bool $useIncludePath
* @return array|Config
*/
public static function fromFiles(array $files, $returnConfigObject = false, $useIncludePath = false)
{
$config = [];
foreach ($files as $file) {
$config = ArrayUtils::merge($config, static::fromFile($file, false, $useIncludePath));
}
return $returnConfigObject ? new Config($config) : $config;
}
/**
* Writes a config to a file
*
* @param string $filename
* @param array|Config $config
* @return bool TRUE on success | FALSE on failure
* @throws Exception\RuntimeException
* @throws Exception\InvalidArgumentException
*/
public static function toFile($filename, $config)
{
if (
(is_object($config) && ! $config instanceof Config)
|| (! is_object($config) && ! is_array($config))
) {
throw new Exception\InvalidArgumentException(
__METHOD__ . " \$config should be an array or instance of Laminas\\Config\\Config"
);
}
$extension = substr(strrchr($filename, '.'), 1);
$directory = dirname($filename);
if (! is_dir($directory)) {
throw new Exception\RuntimeException(
"Directory '{$directory}' does not exists!"
);
}
if (! is_writable($directory)) {
throw new Exception\RuntimeException(
"Cannot write in directory '{$directory}'"
);
}
if (! isset(static::$writerExtensions[$extension])) {
throw new Exception\RuntimeException(
"Unsupported config file extension: '.{$extension}' for writing."
);
}
$writer = static::$writerExtensions[$extension];
if ($writer instanceof Writer\AbstractWriter === false) {
$writer = self::getWriterPluginManager()->get($writer);
static::$writerExtensions[$extension] = $writer;
}
if (is_object($config)) {
$config = $config->toArray();
}
$content = $writer->processConfig($config);
return (bool) (file_put_contents($filename, $content) !== false);
}
/**
* Set reader plugin manager
*
* @return void
*/
public static function setReaderPluginManager(ContainerInterface $readers)
{
static::$readers = $readers;
}
/**
* Get the reader plugin manager.
*
* If none is available, registers and returns a
* StandaloneReaderPluginManager instance by default.
*
* @return ContainerInterface
*/
public static function getReaderPluginManager()
{
if (static::$readers === null) {
static::$readers = new StandaloneReaderPluginManager();
}
return static::$readers;
}
/**
* Set writer plugin manager
*
* @return void
*/
public static function setWriterPluginManager(ContainerInterface $writers)
{
static::$writers = $writers;
}
/**
* Get the writer plugin manager.
*
* If none is available, registers and returns a
* StandaloneWriterPluginManager instance by default.
*
* @return ContainerInterface
*/
public static function getWriterPluginManager()
{
if (static::$writers === null) {
static::$writers = new StandaloneWriterPluginManager();
}
return static::$writers;
}
/**
* Set config reader for file extension
*
* @param string $extension
* @param string|Reader\ReaderInterface $reader
* @throws Exception\InvalidArgumentException
* @return void
*/
public static function registerReader($extension, $reader)
{
$extension = strtolower($extension);
if (! is_string($reader) && ! $reader instanceof Reader\ReaderInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'Reader should be plugin name, class name or '
. 'instance of %s\Reader\ReaderInterface; received "%s"',
__NAMESPACE__,
is_object($reader) ? $reader::class : gettype($reader)
));
}
static::$extensions[$extension] = $reader;
}
/**
* Set config writer for file extension
*
* @param string $extension
* @param string|Writer\AbstractWriter $writer
* @throws Exception\InvalidArgumentException
* @return void
*/
public static function registerWriter($extension, $writer)
{
$extension = strtolower($extension);
if (! is_string($writer) && ! $writer instanceof Writer\AbstractWriter) {
throw new Exception\InvalidArgumentException(sprintf(
'Writer should be plugin name, class name or '
. 'instance of %s\Writer\AbstractWriter; received "%s"',
__NAMESPACE__,
is_object($writer) ? $writer::class : gettype($writer)
));
}
static::$writerExtensions[$extension] = $writer;
}
}
PK mPUra % src/StandaloneReaderPluginManager.phpnu ٘ */
private $knownPlugins = [
'ini' => Reader\Ini::class,
'json' => Reader\Json::class,
'xml' => Reader\Xml::class,
'yaml' => Reader\Yaml::class,
'javaproperties' => Reader\JavaProperties::class,
];
/**
* @param string $plugin
* @return bool
*/
public function has($plugin)
{
if (in_array($plugin, array_values($this->knownPlugins), true)) {
return true;
}
return in_array(strtolower($plugin), array_keys($this->knownPlugins), true);
}
/**
* @param string $plugin
* @return Reader\ReaderInterface
* @throws Exception\PluginNotFoundException
*/
public function get($plugin)
{
if (! $this->has($plugin)) {
throw new Exception\PluginNotFoundException(sprintf(
'Config reader plugin by name %s not found',
$plugin
));
}
if (! class_exists($plugin)) {
$plugin = $this->knownPlugins[strtolower($plugin)];
}
return new $plugin();
}
}
PK mPUwt % src/StandaloneWriterPluginManager.phpnu ٘ */
private $knownPlugins = [
'ini' => Writer\Ini::class,
'javaproperties' => Writer\JavaProperties::class,
'json' => Writer\Json::class,
'php' => Writer\PhpArray::class,
'phparray' => Writer\PhpArray::class,
'xml' => Writer\Xml::class,
'yaml' => Writer\Yaml::class,
];
/**
* @param string $plugin
* @return bool
*/
public function has($plugin)
{
if (in_array($plugin, array_values($this->knownPlugins), true)) {
return true;
}
return in_array(strtolower($plugin), array_keys($this->knownPlugins), true);
}
/**
* @param string $plugin
* @return Reader\ReaderInterface
* @throws Exception\PluginNotFoundException
*/
public function get($plugin)
{
if (! $this->has($plugin)) {
throw new Exception\PluginNotFoundException(sprintf(
'Config writer plugin by name %s not found',
$plugin
));
}
if (! class_exists($plugin)) {
$plugin = $this->knownPlugins[strtolower($plugin)];
}
return new $plugin();
}
}
PK mPUS
src/Processor/Translator.phpnu ٘ setTranslator($translator);
$this->setTextDomain($textDomain);
$this->setLocale($locale);
}
/**
* @return self
*/
public function setTranslator(LaminasTranslator $translator)
{
$this->translator = $translator;
return $this;
}
/**
* @return LaminasTranslator
*/
public function getTranslator()
{
return $this->translator;
}
/**
* @param string|null $locale
* @return self
*/
public function setLocale($locale)
{
$this->locale = $locale;
return $this;
}
/**
* @return string|null
*/
public function getLocale()
{
return $this->locale;
}
/**
* @param string $textDomain
* @return self
*/
public function setTextDomain($textDomain)
{
$this->textDomain = $textDomain;
return $this;
}
/**
* @return string
*/
public function getTextDomain()
{
return $this->textDomain;
}
/**
* Process
*
* @return Config
* @throws Exception\InvalidArgumentException
*/
public function process(Config $config)
{
if ($config->isReadOnly()) {
throw new Exception\InvalidArgumentException('Cannot process config because it is read-only');
}
/**
* Walk through config and replace values
*/
foreach ($config as $key => $val) {
if ($val instanceof Config) {
$this->process($val);
} else {
$config->{$key} = $this->translator->translate($val, $this->textDomain, $this->locale);
}
}
return $config;
}
/**
* Process a single value
*
* @param string $value
* @return string
*/
public function processValue($value)
{
return $this->translator->translate($value, $this->textDomain, $this->locale);
}
}
PK mPUJP" " src/Processor/Filter.phpnu ٘ setFilter($filter);
}
/**
* @return self
*/
public function setFilter(LaminasFilter $filter)
{
$this->filter = $filter;
return $this;
}
/**
* @return LaminasFilter
*/
public function getFilter()
{
return $this->filter;
}
/**
* Process
*
* @return Config
* @throws Exception\InvalidArgumentException
*/
public function process(Config $config)
{
if ($config->isReadOnly()) {
throw new Exception\InvalidArgumentException('Cannot process config because it is read-only');
}
/**
* Walk through config and replace values
*/
foreach ($config as $key => $val) {
if ($val instanceof Config) {
$this->process($val);
} else {
$config->$key = $this->filter->filter($val);
}
}
return $config;
}
/**
* Process a single value
*
* @param mixed $value
* @return mixed
*/
public function processValue($value)
{
return $this->filter->filter($value);
}
}
PK mPU.
src/Processor/Constant.phpnu ٘ setUserOnly((bool) $userOnly);
$this->setPrefix((string) $prefix);
$this->setSuffix((string) $suffix);
if (true === $enableKeyProcessing) {
$this->enableKeyProcessing();
}
$this->loadConstants();
}
/**
* @return bool
*/
public function getUserOnly()
{
return $this->userOnly;
}
/**
* Should we use only user-defined constants?
*
* @param bool $userOnly
* @return self
*/
public function setUserOnly($userOnly)
{
$this->userOnly = (bool) $userOnly;
return $this;
}
/**
* Load all currently defined constants into parser.
*
* @return void
*/
public function loadConstants()
{
if ($this->userOnly) {
$constants = get_defined_constants(true);
$constants = $constants['user'] ?? [];
$this->setTokens($constants);
} else {
$this->setTokens(get_defined_constants());
}
}
/**
* Get current token registry.
*
* @return array
*/
public function getTokens()
{
return $this->tokens;
}
/**
* Override processing of individual value.
*
* If the value is a string and evaluates to a class constant, returns
* the class constant value; otherwise, delegates to the parent.
*
* @param mixed $value
* @param array $replacements
* @return mixed
*/
protected function doProcess($value, array $replacements)
{
if (! is_string($value)) {
return parent::doProcess($value, $replacements);
}
if (false === strpos($value, '::')) {
return parent::doProcess($value, $replacements);
}
// Handle class constants
if (defined($value)) {
return constant($value);
}
// Handle ::class notation
if (! preg_match('/::class$/i', $value)) {
return parent::doProcess($value, $replacements);
}
$class = substr($value, 0, -7);
if (class_exists($class)) {
return $class;
}
// While we've matched ::class, the class does not exist, and PHP will
// raise an error if you try to define a constant using that notation.
// As such, we have something that cannot possibly be a constant, so we
// can safely return the value verbatim.
return $value;
}
}
PK mPUhD src/Processor/Token.phpnu ٘
* value to replace it with
* @param string $prefix
* @param string $suffix
* @param bool $enableKeyProcessing Whether or not to enable processing of
* token values in configuration keys; defaults to false.
*/
public function __construct($tokens = [], $prefix = '', $suffix = '', $enableKeyProcessing = false)
{
$this->setTokens($tokens);
$this->setPrefix((string) $prefix);
$this->setSuffix((string) $suffix);
if (true === $enableKeyProcessing) {
$this->enableKeyProcessing();
}
}
/**
* @param string $prefix
* @return self
*/
public function setPrefix($prefix)
{
// reset map
$this->map = null;
$this->prefix = $prefix;
return $this;
}
/**
* @return string
*/
public function getPrefix()
{
return $this->prefix;
}
/**
* @param string $suffix
* @return self
*/
public function setSuffix($suffix)
{
// reset map
$this->map = null;
$this->suffix = $suffix;
return $this;
}
/**
* @return string
*/
public function getSuffix()
{
return $this->suffix;
}
/**
* Set token registry.
*
* @param array|Config|Traversable $tokens Associative array of TOKEN =>
* value to replace it with
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setTokens($tokens)
{
if (is_array($tokens)) {
$this->tokens = $tokens;
} elseif ($tokens instanceof Config) {
$this->tokens = $tokens->toArray();
} elseif ($tokens instanceof Traversable) {
$this->tokens = [];
foreach ($tokens as $key => $val) {
$this->tokens[$key] = $val;
}
} else {
throw new Exception\InvalidArgumentException('Cannot use ' . gettype($tokens) . ' as token registry.');
}
// reset map
$this->map = null;
return $this;
}
/**
* Get current token registry.
*
* @return array
*/
public function getTokens()
{
return $this->tokens;
}
/**
* Add new token.
*
* @param string $token
* @param mixed $value
* @return self
* @throws Exception\InvalidArgumentException
*/
public function addToken($token, $value)
{
if (! is_scalar($token)) {
throw new Exception\InvalidArgumentException('Cannot use ' . gettype($token) . ' as token name.');
}
$this->tokens[$token] = $value;
// reset map
$this->map = null;
return $this;
}
/**
* Add new token.
*
* @param string $token
* @param mixed $value
* @return self
*/
public function setToken($token, $value)
{
return $this->addToken($token, $value);
}
/**
* Enable processing keys as well as values.
*
* @return void
*/
public function enableKeyProcessing()
{
$this->processKeys = true;
}
/**
* Build replacement map
*
* @return array
*/
protected function buildMap()
{
if (null === $this->map) {
if (! $this->suffix && ! $this->prefix) {
$this->map = $this->tokens;
} else {
$this->map = [];
foreach ($this->tokens as $token => $value) {
$this->map[$this->prefix . $token . $this->suffix] = $value;
}
}
foreach (array_keys($this->map) as $key) {
if (empty($key)) {
unset($this->map[$key]);
}
}
}
return $this->map;
}
/**
* Process
*
* @return Config
* @throws Exception\InvalidArgumentException
*/
public function process(Config $config)
{
return $this->doProcess($config, $this->buildMap());
}
/**
* Process a single value
*
* @param mixed $value
* @return mixed
*/
public function processValue($value)
{
return $this->doProcess($value, $this->buildMap());
}
/**
* Applies replacement map to the given value by modifying the value itself
*
* @param mixed $value
* @param array $replacements
* @return mixed
* @throws Exception\InvalidArgumentException If the provided value is a read-only {@see Config}.
*/
protected function doProcess($value, array $replacements)
{
if ($value instanceof Config) {
if ($value->isReadOnly()) {
throw new Exception\InvalidArgumentException('Cannot process config because it is read-only');
}
foreach ($value as $key => $val) {
$newKey = $this->processKeys ? $this->doProcess($key, $replacements) : $key;
$value->$newKey = $this->doProcess($val, $replacements);
// If the processed key differs from the original, remove the original
if ($newKey !== $key) {
unset($value->$key);
}
}
return $value;
}
if ($value instanceof Traversable || is_array($value)) {
foreach ($value as &$val) {
$val = $this->doProcess($val, $replacements);
}
return $value;
}
if (! is_string($value) && (is_bool($value) || is_numeric($value))) {
$stringVal = (string) $value;
$changedVal = strtr($stringVal, $this->map);
// replace the value only if a string replacement occurred
if ($changedVal !== $stringVal) {
return $changedVal;
}
return $value;
}
return strtr((string) $value, $this->map);
}
}
PK mPUOf $ src/Processor/ProcessorInterface.phpnu ٘ isReadOnly()) {
throw new Exception\InvalidArgumentException('Cannot process config because it is read-only');
}
foreach ($this as $parser) {
/** @var ProcessorInterface $parser */
$parser->process($config);
}
return $config;
}
/**
* Process a single value
*
* @param mixed $value
* @return mixed
*/
public function processValue($value)
{
foreach ($this as $parser) {
/** @var ProcessorInterface $parser */
$value = $parser->processValue($value);
}
return $value;
}
}
PK mPUD4$ $ src/Config.phpnu ٘ allowModifications = (bool) $allowModifications;
foreach ($array as $key => $value) {
if (is_array($value)) {
$this->data[$key] = new static($value, $this->allowModifications);
} else {
$this->data[$key] = $value;
}
}
}
/**
* Retrieve a value and return $default if there is no element set.
*
* @param string $name
* @param mixed $default
* @return mixed
*/
public function get($name, $default = null)
{
if (array_key_exists($name, $this->data)) {
return $this->data[$name];
}
return $default;
}
/**
* Magic function so that $obj->value will work.
*
* @param string $name
* @return mixed
*/
public function __get($name)
{
return $this->get($name);
}
/**
* Set a value in the config.
*
* Only allow setting of a property if $allowModifications was set to true
* on construction. Otherwise, throw an exception.
*
* @param string $name
* @param mixed $value
* @return void
* @throws Exception\RuntimeException
*/
public function __set($name, $value)
{
if ($this->allowModifications) {
if (is_array($value)) {
$value = new static($value, true);
}
if (null === $name) {
$this->data[] = $value;
} else {
$this->data[$name] = $value;
}
} else {
throw new Exception\RuntimeException('Config is read only');
}
}
/**
* Deep clone of this instance to ensure that nested Laminas\Configs are also
* cloned.
*
* @return void
*/
public function __clone()
{
$array = [];
foreach ($this->data as $key => $value) {
if ($value instanceof self) {
$array[$key] = clone $value;
} else {
$array[$key] = $value;
}
}
$this->data = $array;
}
/**
* Return an associative array of the stored data.
*
* @return array
*/
public function toArray()
{
$array = [];
$data = $this->data;
/** @var self $value */
foreach ($data as $key => $value) {
if ($value instanceof self) {
$array[$key] = $value->toArray();
} else {
$array[$key] = $value;
}
}
return $array;
}
/**
* isset() overloading
*
* @param string $name
* @return bool
*/
public function __isset($name)
{
return isset($this->data[$name]);
}
/**
* unset() overloading
*
* @param string $name
* @return void
* @throws Exception\InvalidArgumentException
*/
public function __unset($name)
{
if (! $this->allowModifications) {
throw new Exception\InvalidArgumentException('Config is read only');
} elseif (isset($this->data[$name])) {
unset($this->data[$name]);
$this->skipNextIteration = true;
}
}
/**
* count(): defined by Countable interface.
*
* @see Countable::count()
*
* @return int
*/
#[ReturnTypeWillChange]
public function count()
{
return count($this->data);
}
/**
* current(): defined by Iterator interface.
*
* @see Iterator::current()
*
* @return mixed
*/
#[ReturnTypeWillChange]
public function current()
{
$this->skipNextIteration = false;
return current($this->data);
}
/**
* key(): defined by Iterator interface.
*
* @see Iterator::key()
*
* @return mixed
*/
#[ReturnTypeWillChange]
public function key()
{
return key($this->data);
}
/**
* next(): defined by Iterator interface.
*
* @see Iterator::next()
*
* @return void
*/
#[ReturnTypeWillChange]
public function next()
{
if ($this->skipNextIteration) {
$this->skipNextIteration = false;
return;
}
next($this->data);
}
/**
* rewind(): defined by Iterator interface.
*
* @see Iterator::rewind()
*
* @return void
*/
#[ReturnTypeWillChange]
public function rewind()
{
$this->skipNextIteration = false;
reset($this->data);
}
/**
* valid(): defined by Iterator interface.
*
* @see Iterator::valid()
*
* @return bool
*/
#[ReturnTypeWillChange]
public function valid()
{
return $this->key() !== null;
}
/**
* offsetExists(): defined by ArrayAccess interface.
*
* @see ArrayAccess::offsetExists()
*
* @param mixed $offset
* @return bool
*/
#[ReturnTypeWillChange]
public function offsetExists($offset)
{
return $this->__isset($offset);
}
/**
* offsetGet(): defined by ArrayAccess interface.
*
* @see ArrayAccess::offsetGet()
*
* @param mixed $offset
* @return mixed
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->__get($offset);
}
/**
* offsetSet(): defined by ArrayAccess interface.
*
* @see ArrayAccess::offsetSet()
*
* @param mixed $offset
* @param mixed $value
* @return void
*/
#[ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->__set($offset, $value);
}
/**
* offsetUnset(): defined by ArrayAccess interface.
*
* @see ArrayAccess::offsetUnset()
*
* @param mixed $offset
* @return void
*/
#[ReturnTypeWillChange]
public function offsetUnset($offset)
{
$this->__unset($offset);
}
/**
* Merge another Config with this one.
*
* For duplicate keys, the following will be performed:
* - Nested Configs will be recursively merged.
* - Items in $merge with INTEGER keys will be appended.
* - Items in $merge with STRING keys will overwrite current values.
*
* @return self
*/
public function merge(Config $merge)
{
/** @var Config $value */
foreach ($merge as $key => $value) {
if (array_key_exists($key, $this->data)) {
if (is_int($key)) {
$this->data[] = $value;
} elseif ($value instanceof self && $this->data[$key] instanceof self) {
$this->data[$key]->merge($value);
} else {
if ($value instanceof self) {
$this->data[$key] = new static($value->toArray(), $this->allowModifications);
} else {
$this->data[$key] = $value;
}
}
} else {
if ($value instanceof self) {
$this->data[$key] = new static($value->toArray(), $this->allowModifications);
} else {
$this->data[$key] = $value;
}
}
}
return $this;
}
/**
* Prevent any more modifications being made to this instance.
*
* Useful after merge() has been used to merge multiple Config objects
* into one object which should then not be modified again.
*
* @return void
*/
public function setReadOnly()
{
$this->allowModifications = false;
/** @var Config $value */
foreach ($this->data as $value) {
if ($value instanceof self) {
$value->setReadOnly();
}
}
}
/**
* Returns whether this Config object is read only or not.
*
* @return bool
*/
public function isReadOnly()
{
return ! $this->allowModifications;
}
}
PK mPUSp
mkdocs.ymlnu ٘ docs_dir: docs/book
site_dir: docs/html
nav:
- Home: index.md
- Introduction: intro.md
- "Theory of Operation": theory.md
- Reference:
- "Laminas\\Config\\Reader": reader.md
- "Laminas\\Config\\Writer": writer.md
- "Laminas\\Config\\Processor": processor.md
- "Config Factory": factory.md
- Migration:
- "To version 3": migration/to-v3.md
site_name: laminas-config
site_description: Laminas\Config
repo_url: 'https://github.com/laminas/laminas-config'
extra:
project: Components
PK mPU;bJ J .github/workflows/docs-build.ymlnu ٘ name: docs-build
on:
push:
branches:
- master
repository_dispatch:
types: docs-build
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Build Docs
uses: laminas/documentation-theme/github-actions/docs@master
env:
DOCS_DEPLOY_KEY: ${{ secrets.DOCS_DEPLOY_KEY }}
PK mPU˽W .github/workflows/auto-close.ymlnu ٘ name: Autocloser
on: [issues, pull_request]
jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- name: Autoclose new issues and PRs
uses: roots/issue-closer@v1.1
with:
repo-token: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
issue-pattern: "^exact-string-will-never-match$"
pr-pattern: "^exact-string-will-never-match$"
issue-close-message: |
This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
pr-close-message: |
This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
PK mPU`S , .github/workflows/continuous-integration.ymlnu ٘ name: "Continuous Integration"
on:
pull_request:
push:
branches:
- '[0-9]+.[0-9]+.x'
- 'refs/pull/*'
tags:
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 }}PK mPUu|e)
1 .github/workflows/release-on-milestone-closed.ymlnu ٘ # 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: "Bump Changelog Version On Originating Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:bump-changelog"
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 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 }}
PK mPUyF .gitattributesnu ٘ /.coveralls.yml export-ignore
/.docheader export-ignore
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/docs/ export-ignore
/mkdocs.yml export-ignore
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
/test/ export-ignore
PK mPUQq q - test/WriterPluginManagerCompatibilityTest.phpnu ٘
PK mPUL:d^ ^ ) test/Reader/TestAssets/Xml/attributes.xmlnu ٘
bazbat
bazbat
PK mPUhII I &