PK uUK8%
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 uUF[ [ COPYRIGHT.mdnu ٘ Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/)
PK uU"H H .laminas-ci.jsonnu ٘ {
"ignore_php_platform_requirements": {
"8.2": true
}
}
PK uUR
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": "a62f0058e4a576e074e1375db53888a1",
"packages": [
{
"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": "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": "amphp/amp",
"version": "v2.6.2",
"source": {
"type": "git",
"url": "https://github.com/amphp/amp.git",
"reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb",
"reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"require-dev": {
"amphp/php-cs-fixer-config": "dev-master",
"amphp/phpunit-util": "^1",
"ext-json": "*",
"jetbrains/phpstorm-stubs": "^2019.3",
"phpunit/phpunit": "^7 | ^8 | ^9",
"psalm/phar": "^3.11@dev",
"react/promise": "^2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"files": [
"lib/functions.php",
"lib/Internal/functions.php"
],
"psr-4": {
"Amp\\": "lib"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniel Lowrey",
"email": "rdlowrey@php.net"
},
{
"name": "Aaron Piotrowski",
"email": "aaron@trowski.com"
},
{
"name": "Bob Weinand",
"email": "bobwei9@hotmail.com"
},
{
"name": "Niklas Keller",
"email": "me@kelunik.com"
}
],
"description": "A non-blocking concurrency framework for PHP applications.",
"homepage": "https://amphp.org/amp",
"keywords": [
"async",
"asynchronous",
"awaitable",
"concurrency",
"event",
"event-loop",
"future",
"non-blocking",
"promise"
],
"support": {
"irc": "irc://irc.freenode.org/amphp",
"issues": "https://github.com/amphp/amp/issues",
"source": "https://github.com/amphp/amp/tree/v2.6.2"
},
"funding": [
{
"url": "https://github.com/amphp",
"type": "github"
}
],
"time": "2022-02-20T17:52:18+00:00"
},
{
"name": "amphp/byte-stream",
"version": "v1.8.1",
"source": {
"type": "git",
"url": "https://github.com/amphp/byte-stream.git",
"reference": "acbd8002b3536485c997c4e019206b3f10ca15bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd",
"reference": "acbd8002b3536485c997c4e019206b3f10ca15bd",
"shasum": ""
},
"require": {
"amphp/amp": "^2",
"php": ">=7.1"
},
"require-dev": {
"amphp/php-cs-fixer-config": "dev-master",
"amphp/phpunit-util": "^1.4",
"friendsofphp/php-cs-fixer": "^2.3",
"jetbrains/phpstorm-stubs": "^2019.3",
"phpunit/phpunit": "^6 || ^7 || ^8",
"psalm/phar": "^3.11.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Amp\\ByteStream\\": "lib"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Aaron Piotrowski",
"email": "aaron@trowski.com"
},
{
"name": "Niklas Keller",
"email": "me@kelunik.com"
}
],
"description": "A stream abstraction to make working with non-blocking I/O simple.",
"homepage": "http://amphp.org/byte-stream",
"keywords": [
"amp",
"amphp",
"async",
"io",
"non-blocking",
"stream"
],
"support": {
"irc": "irc://irc.freenode.org/amphp",
"issues": "https://github.com/amphp/byte-stream/issues",
"source": "https://github.com/amphp/byte-stream/tree/v1.8.1"
},
"funding": [
{
"url": "https://github.com/amphp",
"type": "github"
}
],
"time": "2021-03-30T17:13:30+00:00"
},
{
"name": "composer/package-versions-deprecated",
"version": "1.11.99.5",
"source": {
"type": "git",
"url": "https://github.com/composer/package-versions-deprecated.git",
"reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d",
"reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.1.0 || ^2.0",
"php": "^7 || ^8"
},
"replace": {
"ocramius/package-versions": "1.11.99"
},
"require-dev": {
"composer/composer": "^1.9.3 || ^2.0@dev",
"ext-zip": "^1.13",
"phpunit/phpunit": "^6.5 || ^7"
},
"type": "composer-plugin",
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"PackageVersions\\": "src/PackageVersions"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be"
}
],
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"support": {
"issues": "https://github.com/composer/package-versions-deprecated/issues",
"source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2022-01-17T14:14:24+00:00"
},
{
"name": "composer/pcre",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2",
"reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.3",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Pcre\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "PCRE wrapping library that offers type-safe preg_* replacements.",
"keywords": [
"PCRE",
"preg",
"regex",
"regular expression"
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/3.1.0"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2022-11-17T09:50:14+00:00"
},
{
"name": "composer/semver",
"version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9",
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.4",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.3.2"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2022-04-01T19:23:25+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "ced299686f41dce890debac69273b47ffe98a40c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c",
"reference": "ced299686f41dce890debac69273b47ffe98a40c",
"shasum": ""
},
"require": {
"composer/pcre": "^1 || ^2 || ^3",
"php": "^7.2.5 || ^8.0",
"psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Composer\\XdebugHandler\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "John Stevenson",
"email": "john-stevenson@blueyonder.co.uk"
}
],
"description": "Restarts a process without Xdebug.",
"keywords": [
"Xdebug",
"performance"
],
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
"source": "https://github.com/composer/xdebug-handler/tree/3.0.3"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2022-02-25T21:32:43+00:00"
},
{
"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": "dnoegel/php-xdg-base-dir",
"version": "v0.1.1",
"source": {
"type": "git",
"url": "https://github.com/dnoegel/php-xdg-base-dir.git",
"reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
"reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35"
},
"type": "library",
"autoload": {
"psr-4": {
"XdgBaseDir\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "implementation of xdg base directory specification for php",
"support": {
"issues": "https://github.com/dnoegel/php-xdg-base-dir/issues",
"source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1"
},
"time": "2019-12-04T15:06:13+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": "felixfbecker/advanced-json-rpc",
"version": "v3.2.1",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
"reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447",
"reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447",
"shasum": ""
},
"require": {
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
"php": "^7.1 || ^8.0",
"phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0"
},
"require-dev": {
"phpunit/phpunit": "^7.0 || ^8.0"
},
"type": "library",
"autoload": {
"psr-4": {
"AdvancedJsonRpc\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"ISC"
],
"authors": [
{
"name": "Felix Becker",
"email": "felix.b@outlook.com"
}
],
"description": "A more advanced JSONRPC implementation",
"support": {
"issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues",
"source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1"
},
"time": "2021-06-11T22:34:44+00:00"
},
{
"name": "felixfbecker/language-server-protocol",
"version": "v1.5.2",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-language-server-protocol.git",
"reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842",
"reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"require-dev": {
"phpstan/phpstan": "*",
"squizlabs/php_codesniffer": "^3.1",
"vimeo/psalm": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"LanguageServerProtocol\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"ISC"
],
"authors": [
{
"name": "Felix Becker",
"email": "felix.b@outlook.com"
}
],
"description": "PHP classes for the Language Server Protocol",
"keywords": [
"language",
"microsoft",
"php",
"server"
],
"support": {
"issues": "https://github.com/felixfbecker/php-language-server-protocol/issues",
"source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2"
},
"time": "2022-03-02T22:36:06+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-crypt",
"version": "3.9.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-crypt.git",
"reference": "56ab1b195dad5456753601ff2e8e3d3fd9392d1a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/56ab1b195dad5456753601ff2e8e3d3fd9392d1a",
"reference": "56ab1b195dad5456753601ff2e8e3d3fd9392d1a",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"laminas/laminas-math": "^3.4",
"laminas/laminas-servicemanager": "^3.11.2",
"laminas/laminas-stdlib": "^3.6",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"psr/container": "^1.1"
},
"conflict": {
"zendframework/zend-crypt": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.4.0",
"phpunit/phpunit": "^9.5.25"
},
"suggest": {
"ext-openssl": "Required for most features of Laminas\\Crypt"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Crypt\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Strong cryptography tools and password hashing",
"homepage": "https://laminas.dev",
"keywords": [
"crypt",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-crypt/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-crypt/issues",
"rss": "https://github.com/laminas/laminas-crypt/releases.atom",
"source": "https://github.com/laminas/laminas-crypt"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-10-16T15:51:01+00:00"
},
{
"name": "laminas/laminas-escaper",
"version": "2.12.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-escaper.git",
"reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490",
"reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-mbstring": "*",
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0"
},
"conflict": {
"zendframework/zend-escaper": "*"
},
"require-dev": {
"infection/infection": "^0.26.6",
"laminas/laminas-coding-standard": "~2.4.0",
"maglnet/composer-require-checker": "^3.8.0",
"phpunit/phpunit": "^9.5.18",
"psalm/plugin-phpunit": "^0.17.0",
"vimeo/psalm": "^4.22.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Escaper\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs",
"homepage": "https://laminas.dev",
"keywords": [
"escaper",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-escaper/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-escaper/issues",
"rss": "https://github.com/laminas/laminas-escaper/releases.atom",
"source": "https://github.com/laminas/laminas-escaper"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-10-10T10:11:09+00:00"
},
{
"name": "laminas/laminas-math",
"version": "3.6.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-math.git",
"reference": "5770fc632a3614f5526632a8b70f41b65130460e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-math/zipball/5770fc632a3614f5526632a8b70f41b65130460e",
"reference": "5770fc632a3614f5526632a8b70f41b65130460e",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0"
},
"conflict": {
"zendframework/zend-math": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.4.0",
"phpunit/phpunit": "~9.5.25"
},
"suggest": {
"ext-bcmath": "If using the bcmath functionality",
"ext-gmp": "If using the gmp functionality"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev",
"dev-develop": "3.3.x-dev"
}
},
"autoload": {
"psr-4": {
"Laminas\\Math\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Create cryptographically secure pseudo-random numbers, and manage big integers",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"math"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-math/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-math/issues",
"rss": "https://github.com/laminas/laminas-math/releases.atom",
"source": "https://github.com/laminas/laminas-math"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-10-16T14:22:28+00:00"
},
{
"name": "laminas/laminas-uri",
"version": "2.10.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-uri.git",
"reference": "663b050294945c7345cc3a61f3ca661d5f9e1f80"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-uri/zipball/663b050294945c7345cc3a61f3ca661d5f9e1f80",
"reference": "663b050294945c7345cc3a61f3ca661d5f9e1f80",
"shasum": ""
},
"require": {
"laminas/laminas-escaper": "^2.9",
"laminas/laminas-validator": "^2.15",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0"
},
"conflict": {
"zendframework/zend-uri": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.4.0",
"phpunit/phpunit": "^9.5.25"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Uri\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"uri"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-uri/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-uri/issues",
"rss": "https://github.com/laminas/laminas-uri/releases.atom",
"source": "https://github.com/laminas/laminas-uri"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-10-16T15:02:45+00:00"
},
{
"name": "laminas/laminas-validator",
"version": "2.28.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-validator.git",
"reference": "695bfa40b0a83dc1c5c58bdf74a03fdbeb516c39"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-validator/zipball/695bfa40b0a83dc1c5c58bdf74a03fdbeb516c39",
"reference": "695bfa40b0a83dc1c5c58bdf74a03fdbeb516c39",
"shasum": ""
},
"require": {
"laminas/laminas-servicemanager": "^3.12.0",
"laminas/laminas-stdlib": "^3.13",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"psr/http-message": "^1.0.1"
},
"conflict": {
"zendframework/zend-validator": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "^2.4.0",
"laminas/laminas-db": "^2.15.0",
"laminas/laminas-filter": "^2.23.0",
"laminas/laminas-http": "^2.17.0",
"laminas/laminas-i18n": "^2.19",
"laminas/laminas-session": "^2.13.0",
"laminas/laminas-uri": "^2.10.0",
"phpunit/phpunit": "^9.5.25",
"psalm/plugin-phpunit": "^0.18.0",
"psr/http-client": "^1.0.1",
"psr/http-factory": "^1.0.1",
"vimeo/psalm": "^4.28"
},
"suggest": {
"laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator",
"laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator",
"laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages",
"laminas/laminas-i18n-resources": "Translations of validator messages",
"laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains",
"laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator",
"laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators",
"psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators"
},
"type": "library",
"extra": {
"laminas": {
"component": "Laminas\\Validator",
"config-provider": "Laminas\\Validator\\ConfigProvider"
}
},
"autoload": {
"psr-4": {
"Laminas\\Validator\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"validator"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-validator/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-validator/issues",
"rss": "https://github.com/laminas/laminas-validator/releases.atom",
"source": "https://github.com/laminas/laminas-validator"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-11-14T08:50:44+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": "netresearch/jsonmapper",
"version": "v4.0.0",
"source": {
"type": "git",
"url": "https://github.com/cweiske/jsonmapper.git",
"reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
"reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "~7.5 || ~8.0 || ~9.0",
"squizlabs/php_codesniffer": "~3.5"
},
"type": "library",
"autoload": {
"psr-0": {
"JsonMapper": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"OSL-3.0"
],
"authors": [
{
"name": "Christian Weiske",
"email": "cweiske@cweiske.de",
"homepage": "http://github.com/cweiske/jsonmapper/",
"role": "Developer"
}
],
"description": "Map nested JSON structures onto PHP classes",
"support": {
"email": "cweiske@cweiske.de",
"issues": "https://github.com/cweiske/jsonmapper/issues",
"source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0"
},
"time": "2020-12-01T19:48:11+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.15.2",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
"reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
"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.2"
},
"time": "2022-11-12T15:38:23+00:00"
},
{
"name": "openlss/lib-array2xml",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/nullivex/lib-array2xml.git",
"reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
"reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"autoload": {
"psr-0": {
"LSS": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Bryan Tong",
"email": "bryan@nullivex.com",
"homepage": "https://www.nullivex.com"
},
{
"name": "Tony Butler",
"email": "spudz76@gmail.com",
"homepage": "https://www.nullivex.com"
}
],
"description": "Array2XML conversion library credit to lalit.org",
"homepage": "https://www.nullivex.com",
"keywords": [
"array",
"array conversion",
"xml",
"xml conversion"
],
"support": {
"issues": "https://github.com/nullivex/lib-array2xml/issues",
"source": "https://github.com/nullivex/lib-array2xml/tree/master"
},
"time": "2019-03-29T20:06:56+00:00"
},
{
"name": "pear/archive_tar",
"version": "1.4.14",
"source": {
"type": "git",
"url": "https://github.com/pear/Archive_Tar.git",
"reference": "4d761c5334c790e45ef3245f0864b8955c562caa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/4d761c5334c790e45ef3245f0864b8955c562caa",
"reference": "4d761c5334c790e45ef3245f0864b8955c562caa",
"shasum": ""
},
"require": {
"pear/pear-core-minimal": "^1.10.0alpha2",
"php": ">=5.2.0"
},
"require-dev": {
"phpunit/phpunit": "*"
},
"suggest": {
"ext-bz2": "Bz2 compression support.",
"ext-xz": "Lzma2 compression support.",
"ext-zlib": "Gzip compression support."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"autoload": {
"psr-0": {
"Archive_Tar": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"./"
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Vincent Blavet",
"email": "vincent@phpconcept.net"
},
{
"name": "Greg Beaver",
"email": "greg@chiaraquartet.net"
},
{
"name": "Michiel Rook",
"email": "mrook@php.net"
}
],
"description": "Tar file management class with compression support (gzip, bzip2, lzma2)",
"homepage": "https://github.com/pear/Archive_Tar",
"keywords": [
"archive",
"tar"
],
"support": {
"issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Archive_Tar",
"source": "https://github.com/pear/Archive_Tar"
},
"funding": [
{
"url": "https://github.com/mrook",
"type": "github"
},
{
"url": "https://www.patreon.com/michielrook",
"type": "patreon"
}
],
"time": "2021-07-20T13:53:39+00:00"
},
{
"name": "pear/console_getopt",
"version": "v1.4.3",
"source": {
"type": "git",
"url": "https://github.com/pear/Console_Getopt.git",
"reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pear/Console_Getopt/zipball/a41f8d3e668987609178c7c4a9fe48fecac53fa0",
"reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0",
"shasum": ""
},
"type": "library",
"autoload": {
"psr-0": {
"Console": "./"
}
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"./"
],
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Andrei Zmievski",
"email": "andrei@php.net",
"role": "Lead"
},
{
"name": "Stig Bakken",
"email": "stig@php.net",
"role": "Developer"
},
{
"name": "Greg Beaver",
"email": "cellog@php.net",
"role": "Helper"
}
],
"description": "More info available on: http://pear.php.net/package/Console_Getopt",
"support": {
"issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Getopt",
"source": "https://github.com/pear/Console_Getopt"
},
"time": "2019-11-20T18:27:48+00:00"
},
{
"name": "pear/pear-core-minimal",
"version": "v1.10.11",
"source": {
"type": "git",
"url": "https://github.com/pear/pear-core-minimal.git",
"reference": "68d0d32ada737153b7e93b8d3c710ebe70ac867d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/68d0d32ada737153b7e93b8d3c710ebe70ac867d",
"reference": "68d0d32ada737153b7e93b8d3c710ebe70ac867d",
"shasum": ""
},
"require": {
"pear/console_getopt": "~1.4",
"pear/pear_exception": "~1.0"
},
"replace": {
"rsky/pear-core-min": "self.version"
},
"type": "library",
"autoload": {
"psr-0": {
"": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"src/"
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Christian Weiske",
"email": "cweiske@php.net",
"role": "Lead"
}
],
"description": "Minimal set of PEAR core files to be used as composer dependency",
"support": {
"issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR",
"source": "https://github.com/pear/pear-core-minimal"
},
"time": "2021-08-10T22:31:03+00:00"
},
{
"name": "pear/pear_exception",
"version": "v1.0.2",
"source": {
"type": "git",
"url": "https://github.com/pear/PEAR_Exception.git",
"reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0",
"reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
},
"require-dev": {
"phpunit/phpunit": "<9"
},
"type": "class",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"classmap": [
"PEAR/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"."
],
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Helgi Thormar",
"email": "dufuz@php.net"
},
{
"name": "Greg Beaver",
"email": "cellog@php.net"
}
],
"description": "The PEAR Exception base class.",
"homepage": "https://github.com/pear/PEAR_Exception",
"keywords": [
"exception"
],
"support": {
"issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception",
"source": "https://github.com/pear/PEAR_Exception"
},
"time": "2021-03-21T15:43:46+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": "phpdocumentor/reflection-common",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-2.x": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
"source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
},
"time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
"ext-filter": "*",
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.2",
"phpdocumentor/type-resolver": "^1.3",
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.2",
"psalm/phar": "^4.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
},
{
"name": "Jaap van Otterdijk",
"email": "account@ijaap.nl"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
},
"time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.6.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d",
"reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "*",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^9.5",
"rector/rector": "^0.13.9",
"vimeo/psalm": "^4.25"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2"
},
"time": "2022-10-14T12:47:21+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.19",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c77b56b63e3d2031bd8997fcec43c1925ae46559",
"reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559",
"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.19"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-11-18T07:47:47+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.26",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2",
"reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2",
"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.26"
},
"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-10-28T06:00:21+00:00"
},
{
"name": "psalm/plugin-phpunit",
"version": "0.18.3",
"source": {
"type": "git",
"url": "https://github.com/psalm/psalm-plugin-phpunit.git",
"reference": "057c1cdf7546c1e427f6fd83b635d0cc18c252bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/057c1cdf7546c1e427f6fd83b635d0cc18c252bf",
"reference": "057c1cdf7546c1e427f6fd83b635d0cc18c252bf",
"shasum": ""
},
"require": {
"composer/package-versions-deprecated": "^1.10",
"composer/semver": "^1.4 || ^2.0 || ^3.0",
"ext-simplexml": "*",
"php": "^7.1 || ^8.0",
"vimeo/psalm": "dev-master || dev-4.x || ^4.5 || ^5@beta"
},
"conflict": {
"phpunit/phpunit": "<7.5"
},
"require-dev": {
"codeception/codeception": "^4.0.3",
"php": "^7.3 || ^8.0",
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.3.1",
"weirdan/codeception-psalm-module": "^0.11.0",
"weirdan/prophecy-shim": "^1.0 || ^2.0"
},
"type": "psalm-plugin",
"extra": {
"psalm": {
"pluginClass": "Psalm\\PhpUnitPlugin\\Plugin"
}
},
"autoload": {
"psr-4": {
"Psalm\\PhpUnitPlugin\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Matt Brown",
"email": "github@muglug.com"
}
],
"description": "Psalm plugin for PHPUnit",
"support": {
"issues": "https://github.com/psalm/psalm-plugin-phpunit/issues",
"source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.18.3"
},
"time": "2022-11-03T18:17:28+00:00"
},
{
"name": "psr/http-factory",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-factory.git",
"reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
"reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
"shasum": ""
},
"require": {
"php": ">=7.0.0",
"psr/http-message": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interfaces for PSR-7 HTTP message factories",
"keywords": [
"factory",
"http",
"message",
"psr",
"psr-17",
"psr-7",
"request",
"response"
],
"support": {
"source": "https://github.com/php-fig/http-factory/tree/master"
},
"time": "2019-04-30T12:38:16+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"support": {
"source": "https://github.com/php-fig/http-message/tree/master"
},
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/3.0.0"
},
"time": "2021-07-14T16:46:02+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": "symfony/console",
"version": "v6.0.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "b0b910724a0a0326b4481e4f8a30abb2dd442efb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/b0b910724a0a0326b4481e4f8a30abb2dd442efb",
"reference": "b0b910724a0a0326b4481e4f8a30abb2dd442efb",
"shasum": ""
},
"require": {
"php": ">=8.0.2",
"symfony/polyfill-mbstring": "~1.0",
"symfony/service-contracts": "^1.1|^2|^3",
"symfony/string": "^5.4|^6.0"
},
"conflict": {
"symfony/dependency-injection": "<5.4",
"symfony/dotenv": "<5.4",
"symfony/event-dispatcher": "<5.4",
"symfony/lock": "<5.4",
"symfony/process": "<5.4"
},
"provide": {
"psr/log-implementation": "1.0|2.0|3.0"
},
"require-dev": {
"psr/log": "^1|^2|^3",
"symfony/config": "^5.4|^6.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/event-dispatcher": "^5.4|^6.0",
"symfony/lock": "^5.4|^6.0",
"symfony/process": "^5.4|^6.0",
"symfony/var-dumper": "^5.4|^6.0"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"keywords": [
"cli",
"command line",
"console",
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v6.0.15"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-10-26T21:42:20+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"shasum": ""
},
"require": {
"php": ">=8.0.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.0-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-01-02T09:55:41+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
"reference": "511a08c03c1960e08a883f4cffcacd219b758354"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",
"reference": "511a08c03c1960e08a883f4cffcacd219b758354",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Intl\\Grapheme\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's grapheme_* functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"grapheme",
"intl",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
"reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's Normalizer class and related functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"intl",
"normalizer",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v2.5.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
"reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.1",
"symfony/deprecation-contracts": "^2.1|^3"
},
"conflict": {
"ext-psr": "<1.1|>=2"
},
"suggest": {
"symfony/service-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Service\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to writing services",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/service-contracts/tree/v2.5.2"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-05-30T19:17:29+00:00"
},
{
"name": "symfony/string",
"version": "v6.0.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "51ac0fa0ccf132a00519b87c97e8f775fa14e771"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/51ac0fa0ccf132a00519b87c97e8f775fa14e771",
"reference": "51ac0fa0ccf132a00519b87c97e8f775fa14e771",
"shasum": ""
},
"require": {
"php": ">=8.0.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"symfony/translation-contracts": "<2.0"
},
"require-dev": {
"symfony/error-handler": "^5.4|^6.0",
"symfony/http-client": "^5.4|^6.0",
"symfony/translation-contracts": "^2.0|^3.0",
"symfony/var-exporter": "^5.4|^6.0"
},
"type": "library",
"autoload": {
"files": [
"Resources/functions.php"
],
"psr-4": {
"Symfony\\Component\\String\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
"homepage": "https://symfony.com",
"keywords": [
"grapheme",
"i18n",
"string",
"unicode",
"utf-8",
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v6.0.15"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-10-10T09:34:08+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": "vimeo/psalm",
"version": "4.30.0",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69",
"reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69",
"shasum": ""
},
"require": {
"amphp/amp": "^2.4.2",
"amphp/byte-stream": "^1.5",
"composer/package-versions-deprecated": "^1.8.0",
"composer/semver": "^1.4 || ^2.0 || ^3.0",
"composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0",
"dnoegel/php-xdg-base-dir": "^0.1.1",
"ext-ctype": "*",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*",
"felixfbecker/advanced-json-rpc": "^3.0.3",
"felixfbecker/language-server-protocol": "^1.5",
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
"nikic/php-parser": "^4.13",
"openlss/lib-array2xml": "^1.0",
"php": "^7.1|^8",
"sebastian/diff": "^3.0 || ^4.0",
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0",
"symfony/polyfill-php80": "^1.25",
"webmozart/path-util": "^2.3"
},
"provide": {
"psalm/psalm": "self.version"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.2",
"brianium/paratest": "^4.0||^6.0",
"ext-curl": "*",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpdocumentor/reflection-docblock": "^5",
"phpmyadmin/sql-parser": "5.1.0||dev-master",
"phpspec/prophecy": ">=1.9.0",
"phpstan/phpdoc-parser": "1.2.* || 1.6.4",
"phpunit/phpunit": "^9.0",
"psalm/plugin-phpunit": "^0.16",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.5",
"symfony/process": "^4.3 || ^5.0 || ^6.0",
"weirdan/prophecy-shim": "^1.0 || ^2.0"
},
"suggest": {
"ext-curl": "In order to send data to shepherd",
"ext-igbinary": "^2.0.5 is required, used to serialize caching data"
},
"bin": [
"psalm",
"psalm-language-server",
"psalm-plugin",
"psalm-refactor",
"psalter"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.x-dev",
"dev-3.x": "3.x-dev",
"dev-2.x": "2.x-dev",
"dev-1.x": "1.x-dev"
}
},
"autoload": {
"files": [
"src/functions.php",
"src/spl_object_id.php"
],
"psr-4": {
"Psalm\\": "src/Psalm/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Matthew Brown"
}
],
"description": "A static analysis tool for finding errors in PHP applications",
"keywords": [
"code",
"inspection",
"php"
],
"support": {
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm/tree/4.30.0"
},
"time": "2022-11-06T20:37:08+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"
},
{
"name": "webmozart/assert",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
"reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"php": "^7.2 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
"phpunit/phpunit": "^8.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.10-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/1.11.0"
},
"time": "2022-06-03T18:03:27+00:00"
},
{
"name": "webmozart/path-util",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/path-util.git",
"reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725",
"reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"webmozart/assert": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
"sebastian/version": "^1.0.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\PathUtil\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.",
"support": {
"issues": "https://github.com/webmozart/path-util/issues",
"source": "https://github.com/webmozart/path-util/tree/2.3.0"
},
"abandoned": "symfony/filesystem",
"time": "2015-12-17T08:42:14+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-mbstring": "*"
},
"platform-dev": [],
"platform-overrides": {
"php": "8.0.99"
},
"plugin-api-version": "2.3.0"
}
PK uUwF F phpcs.xmlnu ٘
src
test
src/Int.php
src/Null.php
PK uUaɅ psalm-baseline.xmlnu ٘
filterable
$expectedInputs
array_reduce($value, self::class . '::reduce', true)
array_reduce($value, self::class . '::reduce', false)
gettype($options)
[]
$value
$this->options
is_object($options)
is_string($encoding)
(bool) $strict
$typeOrOptions
$this->options['translations'][$message]
$flag
$message
$value
$type
$this->options
(bool) $flag
is_int($value)
call_user_func_array($this->options['callback'], $params)
array
callable
new $callback()
$this->options['callback']
$this->options['callback_params']
$callbackOrOptions
(array) $params
! is_array($options)
is_string($adapter)
mixed
$adapter
$adapterOptions
$adapter
$adapter
$key
$this->adapter
$adapter
$key
$value
array
new $adapter($options)
$this->adapterOptions
$options
getOptions
[]
$option
$this->options[$option]
$compressed
string
$content
$content
(int) $blocksize
(string) $archive
null !== $content
null !== $content
bzclose
bzclose
bzwrite
$compressed
string
$size
$size
$content
$content
(int) $level
(string) $archive
$mode === 'deflate' && null !== $content
null !== $content
null !== $content
null !== $content
$content
$content
bool
string|null
extract
$content
$content
$this->options['password']
(string) $archive
(string) $target
(string) $password
! $archive
! $filelist
$archive
$filelist
rar_close
$compressed
$compressed
string
string
$compressed
$compressed
$content
$content
snappy_compress($content)
snappy_uncompress($content)
$result === false
string
$content
$file[]
$content
$directory
$file[]
$info
isFile
$this->getArchive()
$content
$content
$content
$this->getArchive()
$file
$file
(string) $target
(string) $archive
$res
$res
$res
string
$res
$res
$res
$this->options['archive']
$content
$content
strrpos($content, DIRECTORY_SEPARATOR)
strrpos($content, DIRECTORY_SEPARATOR)
$this->getArchive()
(string) $target
(string) $archive
$res !== true
Options
setMode
setPrecision
setPrefixes
setUnit
$prefixes[$index]
(int) $precision
(string) $unit
$e->getCode()
$result
! is_string($value)
$value
$value
$value
$value
Encrypt
is_string($value)
string
decrypt
$this->adapter->decrypt($value)
$value
$value
(bool) $strict
Encrypt\EncryptionAlgorithmInterface
! is_string($value)
new $adapter($options)
$adapter
$adapter
$adapter
$adapter
$adapter
$adapter
$adapter
$this->adapter
$this->adapter
$adapter
$adapter
string
string
encrypt
new $adapter($options)
new $adapter($options)
toString
$this->adapter->encrypt($value)
$this->adapter->toString()
$value
$value
BlockCipher
is_array($options)
is_array($options)
is_string($this->compression)
CryptBlockCipher::factory($cipherType, $this->encryption)
$encryption
$this->encryption
$this->encryption
$this->encryption
$options['compression']
$options['key']
$options['vector']
$this->encryption
$value
$options['algorithm']
$options['algorithm']
$options['hash']
$options['hash']
$options['key']
$options['key_iteration']
$options['vector']
$this->encryption['key']
$this->encryption['vector']
$this->encryption['key']
$this->encryption['key']
$this->encryption['vector']
$options
$value
array
string
string
$this->encryption
$this->encryption
$this->encryption['key']
$this->encryption['vector']
$compression
$compression
setCipherAlgorithm
setHashAlgorithm
setKeyIteration
setSalt
Openssl
is_array($keys)
$cert
$cert
$cert
$details['key']
$details['key']
$envKey
$header['size']
$length
$length
$options['compression']
$options['package']
$options['passphrase']
$fingerprints[$key]
$cert
$count
$envKey
$i
$i
$key
$key['envelope']
$key['private']
$key['public']
$length
$option
$option
$option
$header['size']
$i
$this->keys
$this->keys
$this->keys
$this->keys
(bool) $package
Filter\Decrypt
parent::filter($content)
! is_scalar($value) && ! is_array($value)
string|array
$this->filename
$this->filename
$this->filename
$value
$value
$uploadData['tmp_name']
$this->filename
$uploadData['tmp_name']
$value
string|array
$this->filename
$uploadData
$value
$value
$filename
$uploadData
$filename
isset($this->filename)
Filter\Encrypt
parent::filter($content)
! is_scalar($value) && ! is_array($value)
string|array
$this->filename
$this->filename
$this->filename
$value
$value
$uploadData['tmp_name']
$this->filename
$uploadData['tmp_name']
$value
string|array
$this->filename
$uploadData
$value
$value
$filename
$uploadData
$filename
isset($this->filename)
$value
$uploadData
! is_scalar($value) && ! is_array($value)
is_array($options)
is_array($options)
$files['overwrite']
$files['randomize']
$file
$rename
$this
$this
array
array|string
$files
$file['source']
$file['source']
$file['target']
$file['target']
$file['target']
$file['target']
$file['target']
$rename['source']
$rename['target']
$rename['target']
$rename['target']
$this->files
$value
$value
$file['source']
$file['target']
$file['target']
$file['target']
$rename['target'][strlen($rename['target']) - 1]
$value['source']
$value['source']
$value['source']
$rename['source']
$this->files[$count]
$this->files[$key]
$uploadData['tmp_name']
$this->files[$key]
$key
$last
$rename
$rename
$rename['target']
$uploadData['tmp_name']
$value
$value
$value
$value
array
string
string|array
$rename['target']
$rename['target']
$file['target']
$file['target']
$this->files
$uploadData
$uploadData
$value
$value
$uploadData
$uploadData
is_string($file)
$target === null
is_string($target)
$clientFilename
$sourceFile
$sourceFile
$sourceFile
$sourceFile
$sourceFile
$value
$this->alreadyFiltered[$sourceFile]
$this->alreadyFiltered[$sourceFile]
$this->alreadyFiltered[$sourceFile]
$clientFilename
$sourceFile
$sourceFile
UploadedFileInterface
array<string, string>
bool
bool
bool
bool
null|StreamFactoryInterface
null|UploadedFileFactoryInterface
string
string
$this->alreadyFiltered[$alreadyFilteredKey]
$this->alreadyFiltered[$fileName]
$this->alreadyFiltered[$sourceFile]
$this->options['overwrite']
$this->options['randomize']
$this->options['stream_factory']
$this->options['target']
$this->options['upload_file_factory']
$this->options['use_upload_extension']
$this->options['use_upload_name']
$fileData
$this->alreadyFiltered[$sourceFile]
$value
$sourceFile
$sourceFile
$sourceFile
$sourceFile
$clientFileName
$clientFileName
$clientFileName
(bool) $flag
(bool) $flag
(bool) $flag
(bool) $flag
! is_scalar($value) && ! is_array($value)
$value
$value
$value
$value
$value
string|array
$uploadData
$value
$value
$value
$uploadData
new PriorityQueue()
$options
strtolower
Blacklist::class
Decrypt::class
Decrypt::class
Decrypt::class
Decrypt::class
Decrypt::class
Encrypt::class
Encrypt::class
Encrypt::class
Encrypt::class
Encrypt::class
File\Decrypt::class
File\Decrypt::class
File\Decrypt::class
File\Decrypt::class
File\Decrypt::class
File\Decrypt::class
File\Encrypt::class
File\Encrypt::class
File\Encrypt::class
File\Encrypt::class
File\Encrypt::class
File\Encrypt::class
Whitelist::class
ToInt::class => InvokableFactory::class
ToNull::class => InvokableFactory::class
$plugin
($name is class-string ? InstanceType : callable(mixed): mixed)
$factories
$name
$plugin
Alnum
Alnum
Alnum
Alnum
Alnum
Alpha
Alpha
Alpha
Alpha
Alpha
NumberFormat
NumberFormat
NumberFormat
NumberFormat
NumberFormat
NumberFormat
NumberParse
NumberParse
NumberParse
NumberParse
NumberParse
NumberParse
FilterPluginManagerFactory
$name
$name
$requestedName
$creationOptions
$config['filters']
$this->creationOptions
$options ?: []
$container
is_array($options)
$options['doublequote']
$options['encoding']
$options['quotestyle']
$options['encoding']
$temp['charset']
$temp['quotestyle']
$temp
(bool) $doubleQuote
(string) $value
$options['pluginManager']
$spec[0]
$source[ltrim($sourceName, ':')]
$options['pluginManager']
$options['rules']
$options['target']
$options['targetReplacementIdentifier']
$options['throwTargetExceptionsOn']
$processedPart
$rule
$rules[$spec]
$source[$ruleName]
$spec
$sourceName
$spec
$this->rules[$spec][]
$processedPart
$processedPart
$rule
$ruleFilter
$ruleValue
$sourceValue
$source[ltrim($sourceName, ':')]
$temp['rules']
$temp['target']
$temp['targetReplacementIdentifier']
$temp['throwTargetExceptionsOn']
$ruleFilter($processedPart)
FilterInterface|false
array|false
new $options['pluginManager']()
$this->rules[$spec]
$this->rules[$spec][$index]
$source[ltrim($sourceName, ':')]
$source
$source
$pluginManager
$target
(bool) $throwTargetExceptionsOn
(string) $rule
(string) $spec
(string) $target
(string) $targetReplacementIdentifier
(string) $value
getConfig
ModuleManager
! is_array($pattern) && ! is_string($pattern)
! is_array($replacement) && ! is_string($replacement)
bool
$args[0]
$args[1]
bool
$this->options['exists']
$existsOrOptions
$existsOrOptions
(bool) $flag
$existsOrOptions !== null
is_string($prefix)
is_string($suffix)
$encodingOrOptions
$encodingOrOptions
$encodingOrOptions
$encodingOrOptions
is_scalar($value)
$options['allowAttribs']
$options['allowTags']
$this->tagsAllowed[$tagName]
$attribute
$attribute
$element
$temp['allowAttribs']
$temp['allowComments']
$temp['allowTags']
$value
$temp
(string) $value
(string) $value
is_array($options)
$typeOrOptions === ''
$typeOrOptions === ''
$typeOrOptions
$value
$type
$this->options
is_int($value)
$encodingOrOptions
$encodingOrOptions
is_scalar($value)
enforceScheme
$value
$value
$defaultScheme
(string) $value
is_string($separator)
$separator
$separator
$separator
is_array($separator) && isset($separator['separator']) && is_string($separator['separator'])
is_string($separator['separator'])
$matches
$matches
$matches
$matches
$matches[1]
$matches[1]
$matches[2]
$matches[2]
$matches[1]
$matches[1]
$matches[2]
$matches[2]
$this->searchSeparator === null
SeparatorToSeparatorFactory
$creationOptions
setCreationOptions
$options['replacement_separator'] ?? '-'
$options['search_separator'] ?? ' '
$value
static function ($value) {
$value
$value
$value
is_array($value) ? array_map($lowerCaseFirst, $value) : $lowerCaseFirst($value)
$strict
$expected
$value
$data
[$value, $expected]
new BlacklistFilter()
$type
true
$value
$value
$value
$value
$expected
$expected
$value
$value
$data
$data
$type
[$value, $expected]
[$value, $expected]
array
testTypes
'param'
'param'
assertTrue
assertTrue
testBz2DecompressNullValueIsAccepted
null
null
assertTrue
null
null
new Lzf()
new Lzf()
new RarCompression()
new RarCompression()
new RarCompression()
new RarCompression()
new RarCompression()
new RarCompression()
new RarCompression()
new RarCompression()
true
unknown
unknown
new SnappyCompression()
new SnappyCompression()
new SnappyCompression()
new SnappyCompression()
new SnappyCompression()
new SnappyCompression()
$errno
$errstr
$compressed
getArchive
getArchive
$adapter
[]
$compressed
$input
$compressed
null
new DecryptFilter()
new DecryptFilter()
new DecryptFilter(['adapter' => 'BlockCipher', 'key' => 'testkey'])
new DecryptFilter(['adapter' => 'BlockCipher', 'key' => 'testkey'])
new DecryptFilter(['adapter' => 'BlockCipher'])
new DecryptFilter(['adapter' => 'Openssl'])
$input
returnUnfilteredDataProvider
$input
$enc
$enc
$expected
$value
$data
[$value, $expected]
$result
new BlockCipherEncryption('newkey')
new BlockCipherEncryption('testkey')
new BlockCipherEncryption('testkey')
new BlockCipherEncryption('testkey')
new BlockCipherEncryption(1234)
new BlockCipherEncryption(['key' => 'testkey'])
new BlockCipherEncryption(['key' => 'testkey'])
new BlockCipherEncryption(['key' => 'testkey'])
new BlockCipherEncryption(['key' => 'testkey'])
new BlockCipherEncryption(['key' => 'testkey'])
new BlockCipherEncryption(['key' => 'testkey'])
new BlockCipherEncryption(['key' => 'testkey'])
1234
1234
fail
fail
$filter
OpensslEncryption
OpensslEncryption
new OpensslEncryption($path)
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new OpensslEncryption()
new EncryptFilter()
new EncryptFilter()
new EncryptFilter(['adapter' => 'BlockCipher', 'key' => 'testkey'])
new EncryptFilter(['adapter' => 'BlockCipher', 'key' => 'testkey'])
new EncryptFilter(['adapter' => 'BlockCipher', 'key' => 'testkey'])
new EncryptFilter(['adapter' => 'Openssl'])
$input
returnUnfilteredDataProvider
$input
$enc['key']
$enc
new FileDecrypt()
new FileDecrypt()
new FileDecrypt()
new FileDecrypt()
new FileEncrypt()
new FileEncrypt()
$input
returnUnfilteredDataProvider
$this->fileToEncrypt
$this->fileToEncrypt
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
$this->tmpDir
new FileDecrypt()
new FileEncrypt()
new FileEncrypt()
new FileEncrypt()
new FileEncrypt()
new FileEncrypt()
$input
returnUnfilteredDataProvider
$input
returnUnfilteredDataProvider
$this->testDir
$this->testDir
$this->testFile
$this->testFile
$this->testFile
$this->testFile
$this->testFile
$this->testFile
1234
1234
$this->newDir
$this->newDir
$this->newDirFile
$this->newFile
$this->newFile
$this->newFile
$this->newFile
$this->newFile
$this->newFile
$this->newFile
$this->oldFile
$this->oldFile
$this->oldFile
$this->oldFile
$this->oldFile
$this->oldFile
$this->oldFile
$this->oldFile
$this->origFile
$this->tmpPath
$this->tmpPath
$this->tmpPath
1234
$filter($this->sourceFile)
$filter($this->sourceFile)
$filter($this->sourceFile)
$filter($this->sourceFile)
$firstResult
$firstResult
$oldFilePathInfo['extension']
$oldFilePathInfo['extension']
$input
returnUnfilteredDataProvider
aliasProvider
$target
$target
$alias
$aliases
$target
getServiceLocator
$container
$value
$value
static fn($value) => $value
static fn($value) => $value
testFactoryConfiguresPluginManagerUnderServiceManagerV2
$container
$inflector
_testOptions
$options['rules'][':action']
$options['rules'][':controller']
$rule
$rule
$rules['controller']
$rules['controller']
$filtered
$filtered
$filtered
$rule
$rule
$rules
getPluginManager
getRules
getTarget
getTargetReplacementIdentifier
isThrowTargetExceptionsOn
$rule
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules
$rules['controller']
$rules['controller']
$rules['suffix']
$rules[0]
$rules[0]
$rules[0]
$rules[1]
$this->_context
$this->_context
$filtered
$rule
PregReplaceFilter::hasPcreUnicodeSupport()
['unknown']
StaticFilter::execute('"O\'Reilly"', HtmlEntities::class, ['quotestyle' => ENT_COMPAT])
StaticFilter::execute('"O\'Reilly"', HtmlEntities::class, ['quotestyle' => ENT_QUOTES])
StaticFilter::execute('1234', 'UnknownFilter')
StaticFilter::execute('1a2b3c4d', Digits::class)
StaticFilter::execute('foo', 'doStuff')
StaticFilter::getPluginManager()
StaticFilter::getPluginManager()
StaticFilter::getPluginManager()
StaticFilter::getPluginManager()
StaticFilter::setPluginManager($plugins)
StaticFilter::setPluginManager($plugins)
StaticFilter::setPluginManager($plugins)
StaticFilter::setPluginManager(null)
StaticFilter::setPluginManager(null)
$value
$value
$filteredValue
$value
$value
$filter('sample')
$prefix
$filter('sample')
$suffix
setMethods
$e->getMessage()
setMethods
$filtered
$filtered
$input
$filtered
$value
$value
$value
$type
true
$value
$value
$value
$expected
$expected
$value
$value
$data
$data
$type
[$value, $expected]
[$value, $expected]
$filtered
$filtered
$filtered
$filtered
$filtered
$filtered
$filtered
$filtered
$filtered
$filtered
$filtered
$filtered
$filtered
$element
$value
(array) $value
(array) $value
PK uUl-
-
README.mdnu ٘ # laminas-filter
[![Build Status](https://github.com/laminas/laminas-filter/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-filter/actions?query=workflow%3A"Continuous+Integration")
[![Type Coverage](https://shepherd.dev/github/laminas/laminas-filter/coverage.svg)](https://shepherd.dev/github/laminas/laminas-filter)
> ## 🇷🇺 Русским гражданам
>
> Мы, участники 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!"
The `Laminas\Filter` component provides a set of commonly needed data filters. It
also provides a simple filter chaining mechanism by which multiple filters may
be applied to a single datum in a user-defined order.
- File issues at https://github.com/laminas/laminas-filter/issues
- Documentation is at https://docs.laminas.dev/laminas-filter/
PK uU} psalm.xmlnu ٘
PK uUm;
renovate.jsonnu ٘ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>laminas/.github:renovate-config"
]
}
PK uU
"D .laminas-ci/pre-install.shnu [y #!/bin/bash
#
# @todo The compression adapters that require these non-standard extensions have been deprecated for removal in 3.0
# This file can be removed along with the adapters.
#
WORKING_DIRECTORY=$2
JOB=$3
PHP_VERSION=$(echo "${JOB}" | jq -r '.php')
cd "$TMPDIR" || exit 1;
apt install -y make g++
pecl channel-update pecl.php.net
# Install lzf
pecl install lzf || exit 1
echo "extension=lzf.so" >> /etc/php/"${PHP_VERSION}"/cli/php.ini
# Install rar
pecl install rar
echo "extension=rar.so" >> /etc/php/"${PHP_VERSION}"/cli/php.ini
# Install snappy
git clone --recursive --depth=1 https://github.com/kjdev/php-ext-snappy.git
cd php-ext-snappy || exit 1;
phpize
./configure
make
make install
echo "extension=snappy.so" >> /etc/php/"${PHP_VERSION}"/cli/php.ini
# Debug output
php --ri lzf
echo ""
php --ri rar
echo ""
php --ri snappy
echo ""
cd "$WORKING_DIRECTORY" || exit 1;
PK uUy*
.gitignorenu ٘ /.phpunit.result.cache
/.phpcs-cache
/.psalm-cache
/docs/html/
/laminas-mkdoc-theme.tgz
/laminas-mkdoc-theme/
/phpunit.xml
/vendor/
PK uUh3n " src/FilterPluginManagerFactory.phpnu ٘ has('ServiceListener')) {
return $pluginManager;
}
// If we do not have a config service, nothing more to do
if (! $container->has('config')) {
return $pluginManager;
}
$config = $container->get('config');
// If we do not have filters configuration, nothing more to do
if (! isset($config['filters']) || ! is_array($config['filters'])) {
return $pluginManager;
}
// Wire service configuration for validators
(new Config($config['filters']))->configureServiceManager($pluginManager);
return $pluginManager;
}
/**
* {@inheritDoc}
*
* @return FilterPluginManager
*/
public function createService(ServiceLocatorInterface $container, $name = null, $requestedName = null)
{
return $this($container, $requestedName ?: FilterPluginManager::class, $this->creationOptions);
}
/**
* laminas-servicemanager v2 support for invocation options.
*
* @return void
*/
public function setCreationOptions(array $options)
{
$this->creationOptions = $options;
}
}
PK uUfA^ ^ src/PregReplace.phpnu ٘ |null,
* replacement: string|list,
* }
* @extends AbstractFilter
*/
class PregReplace extends AbstractFilter
{
/** @var Options */
protected $options = [
'pattern' => null,
'replacement' => '',
];
/**
* Constructor
* Supported options are
* 'pattern' => matching pattern
* 'replacement' => replace with this
*
* @param iterable|Options|string|null $options
*/
public function __construct($options = null)
{
if ($options instanceof Traversable) {
$options = iterator_to_array($options);
}
if (! is_array($options) || (! isset($options['pattern']) && ! isset($options['replacement']))) {
$args = func_get_args();
if (isset($args[0])) {
$this->setPattern($args[0]);
}
if (isset($args[1])) {
$this->setReplacement($args[1]);
}
} else {
$this->setOptions($options);
}
}
/**
* Set the regex pattern to search for
*
* @see preg_replace()
*
* @param string|list $pattern - same as the first argument of preg_replace
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setPattern($pattern)
{
if (! is_array($pattern) && ! is_string($pattern)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects pattern to be array or string; received "%s"',
__METHOD__,
is_object($pattern) ? $pattern::class : gettype($pattern)
));
}
if (is_array($pattern)) {
foreach ($pattern as $p) {
$this->validatePattern($p);
}
}
if (is_string($pattern)) {
$this->validatePattern($pattern);
}
$this->options['pattern'] = $pattern;
return $this;
}
/**
* Get currently set match pattern
*
* @return string|list|null
*/
public function getPattern()
{
return $this->options['pattern'];
}
/**
* Set the replacement array/string
*
* @see preg_replace()
*
* @param string|list $replacement - same as the second argument of preg_replace
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setReplacement($replacement)
{
if (! is_array($replacement) && ! is_string($replacement)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects replacement to be array or string; received "%s"',
__METHOD__,
get_debug_type($replacement)
));
}
$this->options['replacement'] = $replacement;
return $this;
}
/**
* Get currently set replacement value
*
* @return string|list
*/
public function getReplacement()
{
return $this->options['replacement'];
}
/**
* Perform regexp replacement as filter
*
* @param mixed $value
* @return mixed
* @throws Exception\RuntimeException
*/
public function filter($value)
{
return self::applyFilterOnlyToStringableValuesAndStringableArrayValues(
$value,
Closure::fromCallable([$this, 'filterNormalizedValue'])
);
}
/**
* @param string|string[] $value
* @return string|string[]
*/
private function filterNormalizedValue($value)
{
if ($this->options['pattern'] === null) {
throw new Exception\RuntimeException(sprintf(
'Filter %s does not have a valid pattern set',
static::class
));
}
/** @var string|string[] $pattern */
$pattern = $this->options['pattern'];
/** @var string|string[] $replacement */
$replacement = $this->options['replacement'];
return preg_replace($pattern, $replacement, $value);
}
/**
* Validate a pattern and ensure it does not contain the "e" modifier
*
* @param string $pattern
* @return bool
* @throws Exception\InvalidArgumentException
*/
protected function validatePattern($pattern)
{
if (! preg_match('/(?[imsxeADSUXJu]+)$/', $pattern, $matches)) {
return true;
}
if (str_contains($matches['modifier'], 'e')) {
throw new Exception\InvalidArgumentException(sprintf(
'Pattern for a PregReplace filter may not contain the "e" pattern modifier; received "%s"',
$pattern
));
}
}
}
PK uUtG G src/FilterChain.phpnu ٘
* @psalm-type FilterChainConfiguration = array{
* filters?: list,
* options?: array,
* priority?: int,
* }>,
* callbacks?: list
* }
*/
class FilterChain extends AbstractFilter implements Countable, IteratorAggregate
{
/**
* Default priority at which filters are added
*/
public const DEFAULT_PRIORITY = 1000;
/** @var FilterPluginManager|null */
protected $plugins;
/**
* Filter chain
*
* @var PriorityQueue
*/
protected $filters;
/**
* Initialize filter chain
*
* @param FilterChainConfiguration|Traversable|null $options
*/
public function __construct($options = null)
{
$this->filters = new PriorityQueue();
if (null !== $options) {
$this->setOptions($options);
}
}
/**
* @param FilterChainConfiguration|Traversable $options
* @return $this
* @throws Exception\InvalidArgumentException
*/
public function setOptions($options)
{
if (! is_array($options) && ! $options instanceof Traversable) {
throw new Exception\InvalidArgumentException(sprintf(
'Expected array or Traversable; received "%s"',
get_debug_type($options)
));
}
foreach ($options as $key => $value) {
switch (strtolower($key)) {
case 'callbacks':
foreach ($value as $spec) {
$callback = $spec['callback'] ?? false;
$priority = $spec['priority'] ?? static::DEFAULT_PRIORITY;
if ($callback) {
$this->attach($callback, $priority);
}
}
break;
case 'filters':
foreach ($value as $spec) {
$name = $spec['name'] ?? false;
$options = $spec['options'] ?? [];
$priority = $spec['priority'] ?? static::DEFAULT_PRIORITY;
if ($name) {
$this->attachByName($name, $options, $priority);
}
}
break;
default:
// ignore other options
break;
}
}
return $this;
}
/**
* Return the count of attached filters
*
* @return int
*/
#[ReturnTypeWillChange]
public function count()
{
return count($this->filters);
}
/**
* Get plugin manager instance
*
* @return FilterPluginManager
*/
public function getPluginManager()
{
$plugins = $this->plugins;
if (! $plugins instanceof FilterPluginManager) {
$plugins = new FilterPluginManager(new ServiceManager());
$this->setPluginManager($plugins);
}
return $plugins;
}
/**
* Set plugin manager instance
*
* @return self
*/
public function setPluginManager(FilterPluginManager $plugins)
{
$this->plugins = $plugins;
return $this;
}
/**
* Retrieve a filter plugin by name
*
* @param string $name
* @return FilterInterface|callable(mixed): mixed
*/
public function plugin($name, array $options = [])
{
$plugins = $this->getPluginManager();
return $plugins->get($name, $options);
}
/**
* Attach a filter to the chain
*
* @param callable(mixed): mixed|FilterInterface $callback A Filter implementation or valid PHP callback
* @param int $priority Priority at which to enqueue filter; defaults to 1000 (higher executes earlier)
* @throws Exception\InvalidArgumentException
* @return self
*/
public function attach($callback, $priority = self::DEFAULT_PRIORITY)
{
if (! is_callable($callback)) {
if (! $callback instanceof FilterInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'Expected a valid PHP callback; received "%s"',
get_debug_type($callback)
));
}
$callback = [$callback, 'filter'];
}
$this->filters->insert($callback, $priority);
return $this;
}
/**
* Attach a filter to the chain using a short name
*
* Retrieves the filter from the attached plugin manager, and then calls attach()
* with the retrieved instance.
*
* @param string $name
* @param int $priority Priority at which to enqueue filter; defaults to 1000 (higher executes earlier)
* @return self
*/
public function attachByName($name, mixed $options = [], $priority = self::DEFAULT_PRIORITY)
{
if (! is_array($options)) {
$options = (array) $options;
} elseif (empty($options)) {
$options = null;
}
$filter = $this->getPluginManager()->get($name, $options);
return $this->attach($filter, $priority);
}
/**
* Merge the filter chain with the one given in parameter
*
* @return self
*/
public function merge(FilterChain $filterChain)
{
foreach ($filterChain->filters->toArray(PriorityQueue::EXTR_BOTH) as $item) {
$this->attach($item['data'], $item['priority']);
}
return $this;
}
/**
* Get all the filters
*
* @return PriorityQueue
*/
public function getFilters()
{
return $this->filters;
}
/**
* Returns $value filtered through each filter in the chain
*
* Filters are run in the order in which they were added to the chain (FIFO)
*
* @param mixed $value
* @return mixed
* @psalm-suppress MixedAssignment values are always mixed
*/
public function filter($value)
{
$valueFiltered = $value;
foreach ($this as $filter) {
if ($filter instanceof FilterInterface) {
$valueFiltered = $filter->filter($valueFiltered);
continue;
}
$valueFiltered = call_user_func($filter, $valueFiltered);
}
return $valueFiltered;
}
/**
* Clone filters
*/
public function __clone()
{
$this->filters = clone $this->filters;
}
/**
* Prepare filter chain for serialization
*
* Plugin manager (property 'plugins') cannot
* be serialized. On wakeup the property remains unset
* and next invocation to getPluginManager() sets
* the default plugin manager instance (FilterPluginManager).
*/
public function __sleep()
{
return ['filters'];
}
/** @return Traversable */
public function getIterator(): Traversable
{
return clone $this->filters;
}
}
PK uUȞ# # src/StaticFilter.phpnu ٘ get($classBaseName, $args);
return $filter instanceof FilterInterface
? $filter->filter($value)
: $filter($value);
}
}
PK uUTS S src/StringPrefix.phpnu ٘
*/
class StringPrefix extends AbstractFilter
{
/** @var Options */
protected $options = [
'prefix' => null,
];
/**
* @param Options|iterable|null $options
*/
public function __construct($options = null)
{
if ($options !== null) {
$this->setOptions($options);
}
}
/**
* Set the prefix string
*
* @param string $prefix
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setPrefix($prefix)
{
if (! is_string($prefix)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects "prefix" to be string; received "%s"',
__METHOD__,
is_object($prefix) ? $prefix::class : gettype($prefix)
));
}
$this->options['prefix'] = $prefix;
return $this;
}
/**
* Returns the prefix string, which is appended at the beginning of the input value
*
* @return string
*/
public function getPrefix()
{
if (! isset($this->options['prefix'])) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects a "prefix" option; none given',
self::class
));
}
return $this->options['prefix'];
}
/**
* {@inheritdoc}
*/
public function filter($value)
{
if (! is_scalar($value)) {
return $value;
}
$value = (string) $value;
return $this->getPrefix() . $value;
}
}
PK uU0å src/UriNormalize.phpnu ٘ setOptions($options);
}
}
/**
* Set the default scheme to use when parsing scheme-less URIs
*
* The scheme used when parsing URIs may affect the specific object used to
* normalize the URI and thus may affect the resulting normalize URI.
*
* @param string $defaultScheme
* @return self
*/
public function setDefaultScheme($defaultScheme)
{
$this->defaultScheme = $defaultScheme;
return $this;
}
/**
* Set a URI scheme to enforce on schemeless URIs
*
* This allows forcing input values such as 'www.example.com/foo' into
* 'http://www.example.com/foo'.
*
* This should be used with caution, as a standard-compliant URI parser
* would regard 'www.example.com' in the above input URI to be the path and
* not host part of the URI. While this option can assist in solving
* real-world user mishaps, it may yield unexpected results at times.
*
* @param string $enforcedScheme
* @return self
*/
public function setEnforcedScheme($enforcedScheme)
{
$this->enforcedScheme = $enforcedScheme;
return $this;
}
/**
* Filter the URL by normalizing it and applying a default scheme if set
*
* @param string $value
* @return string
*/
public function filter($value)
{
if (! is_scalar($value)) {
return $value;
}
$value = (string) $value;
$defaultScheme = $this->defaultScheme ?: $this->enforcedScheme;
// Reset default scheme if it is not a known scheme
if (! UriFactory::getRegisteredSchemeClass($defaultScheme)) {
$defaultScheme = null;
}
try {
$uri = UriFactory::factory($value, $defaultScheme);
if ($this->enforcedScheme && ! $uri->getScheme()) {
$this->enforceScheme($uri);
}
} catch (UriException) {
// We are unable to parse / enfore scheme with the given config and input
return $value;
}
$uri->normalize();
if (! $uri->isValid()) {
return $value;
}
return $uri->toString();
}
/**
* Enforce the defined scheme on the URI
*
* This will also adjust the host and path parts of the URI as expected in
* the case of scheme-less network URIs
*/
protected function enforceScheme(Uri $uri)
{
$path = $uri->getPath() ?? '';
if (str_contains($path, '/')) {
[$host, $path] = explode('/', $path, 2);
$path = '/' . $path;
} else {
$host = $path;
$path = '';
}
// We have nothing to do if we have no host
if (! $host) {
return;
}
$uri->setScheme($this->enforcedScheme)
->setHost($host)
->setPath($path);
}
}
PK uU " src/Exception/RuntimeException.phpnu ٘ setEncoding($encodingOrOptions);
} else {
$this->setOptions($encodingOrOptions);
}
}
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Returns the string $value, converting characters to uppercase as necessary
*
* If the value provided is non-scalar, the value will remain unfiltered
*
* @param mixed $value
* @return string|mixed
* @psalm-return ($value is scalar ? string : mixed)
*/
public function filter($value)
{
if (! is_scalar($value)) {
return $value;
}
return mb_strtoupper((string) $value, $this->getEncoding());
}
}
PK uU/7#A A src/FilterInterface.phpnu ٘ true,
];
/**
* @param bool|Traversable $existsOrOptions Options to set
*/
public function __construct($existsOrOptions = true)
{
if ($existsOrOptions !== null) {
if (! static::isOptions($existsOrOptions)) {
$this->setExists($existsOrOptions);
} else {
$this->setOptions($existsOrOptions);
}
}
}
/**
* Sets if the path has to exist
* TRUE when the path must exist
* FALSE when not existing paths can be given
*
* @param bool $flag Path must exist
* @return self
*/
public function setExists($flag = true)
{
$this->options['exists'] = (bool) $flag;
return $this;
}
/**
* Returns true if the filtered path must exist
*
* @return bool
*/
public function getExists()
{
return $this->options['exists'];
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Returns realpath($value)
*
* If the value provided is non-scalar, the value will remain unfiltered
*
* @param mixed $value
* @return string|mixed
* @psalm-return ($value is string ? string : mixed)
*/
public function filter($value)
{
if (! is_string($value)) {
return $value;
}
$path = (string) $value;
if ($this->options['exists']) {
return realpath($path);
}
ErrorHandler::start();
$realpath = realpath($path);
ErrorHandler::stop();
if ($realpath) {
return $realpath;
}
$drive = '';
if (stripos(PHP_OS, 'WIN') === 0) {
$path = preg_replace('/[\\\\\/]/', DIRECTORY_SEPARATOR, $path);
if (preg_match('/([a-zA-Z]\:)(.*)/', $path, $matches)) {
[, $drive, $path] = $matches;
} else {
$cwd = getcwd();
$drive = substr($cwd, 0, 2);
if (! str_starts_with($path, DIRECTORY_SEPARATOR)) {
$path = substr($cwd, 3) . DIRECTORY_SEPARATOR . $path;
}
}
} elseif (! str_starts_with($path, DIRECTORY_SEPARATOR)) {
$path = getcwd() . DIRECTORY_SEPARATOR . $path;
}
$stack = [];
$parts = explode(DIRECTORY_SEPARATOR, $path);
foreach ($parts as $dir) {
if ($dir !== '' && $dir !== '.') {
if ($dir === '..') {
array_pop($stack);
} else {
$stack[] = $dir;
}
}
}
return $drive . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $stack);
}
}
PK uUӹ src/ToNull.phpnu ٘ ,
* }
* @extends AbstractFilter
*/
class ToNull extends AbstractFilter
{
public const TYPE_BOOLEAN = 1;
public const TYPE_INTEGER = 2;
public const TYPE_EMPTY_ARRAY = 4;
public const TYPE_STRING = 8;
public const TYPE_ZERO_STRING = 16;
public const TYPE_FLOAT = 32;
public const TYPE_ALL = 63;
/**
* @deprecated since 2.26 - superseded by self::CONSTANTS
*
* @var array
*/
protected $constants = self::CONSTANTS;
private const CONSTANTS = [
self::TYPE_BOOLEAN => 'boolean',
self::TYPE_INTEGER => 'integer',
self::TYPE_EMPTY_ARRAY => 'array',
self::TYPE_STRING => 'string',
self::TYPE_ZERO_STRING => 'zero',
self::TYPE_FLOAT => 'float',
self::TYPE_ALL => 'all',
];
/** @var Options */
protected $options = [
'type' => self::TYPE_ALL,
];
/**
* @phpcs:disable Generic.Files.LineLength.TooLong
* @param int-mask-of|value-of|list|Options|iterable|null $typeOrOptions
*/
public function __construct($typeOrOptions = null)
{
if ($typeOrOptions === null || $typeOrOptions === '') {
return;
}
if ($typeOrOptions instanceof Traversable) {
$typeOrOptions = iterator_to_array($typeOrOptions);
}
if (is_array($typeOrOptions) && isset($typeOrOptions['type'])) {
$this->setOptions($typeOrOptions);
return;
}
$this->setType($typeOrOptions);
}
/**
* Set boolean types
*
* @param int-mask-of|value-of|list|null $type
* @throws Exception\InvalidArgumentException
* @return self
*/
public function setType($type = null)
{
if (is_array($type)) {
$detected = 0;
foreach ($type as $value) {
if (is_int($value)) {
$detected |= $value;
} elseif (($found = array_search($value, self::CONSTANTS, true)) !== false) {
$detected |= $found;
}
}
$type = $detected;
} elseif (is_string($type) && ($found = array_search($type, self::CONSTANTS, true)) !== false) {
$type = $found;
}
if (! is_int($type) || ($type < 0) || ($type > self::TYPE_ALL)) {
throw new Exception\InvalidArgumentException(sprintf(
'Unknown type value "%s" (%s)',
$type,
gettype($type)
));
}
$this->options['type'] = $type;
return $this;
}
/**
* Returns defined boolean types
*
* @return int-mask-of
*/
public function getType()
{
return $this->options['type'];
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Returns null representation of $value, if value is empty and matches
* types that should be considered null.
*
* @param null|array|bool|float|int|string $value
* @return null|mixed
*/
public function filter($value)
{
$type = $this->getType();
// FLOAT (0.0)
if ($type & self::TYPE_FLOAT) {
if (is_float($value) && $value === 0.0) {
return null;
}
}
// STRING ZERO ('0')
if ($type & self::TYPE_ZERO_STRING) {
if (is_string($value) && $value === '0') {
return null;
}
}
// STRING ('')
if ($type & self::TYPE_STRING) {
if (is_string($value) && $value === '') {
return null;
}
}
// EMPTY_ARRAY (array())
if ($type & self::TYPE_EMPTY_ARRAY) {
if (is_array($value) && $value === []) {
return null;
}
}
// INTEGER (0)
if ($type & self::TYPE_INTEGER) {
if (is_int($value) && $value === 0) {
return null;
}
}
// BOOLEAN (false)
if ($type & self::TYPE_BOOLEAN) {
if (is_bool($value) && $value === false) {
return null;
}
}
return $value;
}
}
PK uUѝ) ) src/Dir.phpnu ٘ setAdapter($options);
} elseif ($options instanceof Compress\CompressionAlgorithmInterface) {
$this->setAdapter($options);
} elseif (is_array($options)) {
$this->setOptions($options);
}
}
/**
* Set filter setate
*
* @param array $options
* @throws Exception\InvalidArgumentException If options is not an array or Traversable.
* @return self
*/
public function setOptions($options)
{
if (! is_array($options) && ! $options instanceof Traversable) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" expects an array or Traversable; received "%s"',
__METHOD__,
get_debug_type($options)
));
}
foreach ($options as $key => $value) {
if ($key === 'options') {
$key = 'adapterOptions';
}
$method = 'set' . ucfirst($key);
if (method_exists($this, $method)) {
$this->$method($value);
}
}
return $this;
}
/**
* Returns the current adapter, instantiating it if necessary
*
* @throws Exception\RuntimeException
* @throws Exception\InvalidArgumentException
* @return CompressionAlgorithmInterface
*/
public function getAdapter()
{
if ($this->adapter instanceof Compress\CompressionAlgorithmInterface) {
return $this->adapter;
}
$adapter = $this->adapter;
$options = $this->getAdapterOptions();
if (! class_exists($adapter)) {
$adapter = 'Laminas\\Filter\\Compress\\' . ucfirst($adapter);
if (! class_exists($adapter)) {
throw new Exception\RuntimeException(sprintf(
'%s unable to load adapter; class "%s" not found',
__METHOD__,
$this->adapter
));
}
}
$this->adapter = new $adapter($options);
if (! $this->adapter instanceof Compress\CompressionAlgorithmInterface) {
throw new Exception\InvalidArgumentException(
"Compression adapter '" . $adapter
. "' does not implement Laminas\\Filter\\Compress\\CompressionAlgorithmInterface"
);
}
return $this->adapter;
}
/**
* Retrieve adapter name
*
* @return string
*/
public function getAdapterName()
{
return $this->getAdapter()->toString();
}
/**
* Sets compression adapter
*
* @param string|CompressionAlgorithmInterface $adapter Adapter to use
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setAdapter($adapter)
{
if ($adapter instanceof Compress\CompressionAlgorithmInterface) {
$this->adapter = $adapter;
return $this;
}
if (! is_string($adapter)) {
throw new Exception\InvalidArgumentException(
'Invalid adapter provided; must be string or instance of '
. CompressionAlgorithmInterface::class
);
}
$this->adapter = $adapter;
return $this;
}
/**
* Retrieve adapter options
*
* @return array
*/
public function getAdapterOptions()
{
return $this->adapterOptions;
}
/**
* Set adapter options
*
* @return self
*/
public function setAdapterOptions(array $options)
{
$this->adapterOptions = $options;
return $this;
}
/**
* Get individual or all options from underlying adapter
*
* @param null|string $option
* @return mixed
*/
public function getOptions($option = null)
{
$adapter = $this->getAdapter();
return $adapter->getOptions($option);
}
/**
* Calls adapter methods
*
* @param string $method Method to call
* @param string|array $options Options for this method
* @return mixed
* @throws Exception\BadMethodCallException
*/
public function __call($method, $options)
{
$adapter = $this->getAdapter();
if (! method_exists($adapter, $method)) {
throw new Exception\BadMethodCallException("Unknown method '{$method}'");
}
return call_user_func_array([$adapter, $method], $options);
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Compresses the content $value with the defined settings
*
* @param mixed $value Content to compress
* @return string|mixed The compressed content
* @psalm-return ($value is string ? string : mixed)
*/
public function filter($value)
{
if (! is_string($value)) {
return $value;
}
return $this->getAdapter()->compress($value);
}
}
PK uUKY@' ' src/StripTags.phpnu ٘ Tags which are allowed
* 'allowAttribs' => Attributes which are allowed
* 'allowComments' => Are comments allowed ?
*
* @param string|array|Traversable $options
*/
public function __construct($options = null)
{
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
}
if (
(! is_array($options)) || (is_array($options) && ! array_key_exists('allowTags', $options) &&
! array_key_exists('allowAttribs', $options) && ! array_key_exists('allowComments', $options))
) {
$options = func_get_args();
$temp['allowTags'] = array_shift($options);
if (! empty($options)) {
$temp['allowAttribs'] = array_shift($options);
}
if (! empty($options)) {
$temp['allowComments'] = array_shift($options);
}
$options = $temp;
}
if (array_key_exists('allowTags', $options)) {
$this->setTagsAllowed($options['allowTags']);
}
if (array_key_exists('allowAttribs', $options)) {
$this->setAttributesAllowed($options['allowAttribs']);
}
}
/**
* Returns the tagsAllowed option
*
* @return array
*/
public function getTagsAllowed()
{
return $this->tagsAllowed;
}
/**
* Sets the tagsAllowed option
*
* @param array|string $tagsAllowed
* @return self Provides a fluent interface
*/
public function setTagsAllowed($tagsAllowed)
{
if (! is_array($tagsAllowed)) {
$tagsAllowed = [$tagsAllowed];
}
foreach ($tagsAllowed as $index => $element) {
// If the tag was provided without attributes
if (is_int($index) && is_string($element)) {
// Canonicalize the tag name
$tagName = strtolower($element);
// Store the tag as allowed with no attributes
$this->tagsAllowed[$tagName] = [];
} elseif (is_string($index) && (is_array($element) || is_string($element))) {
// Otherwise, if a tag was provided with attributes
// Canonicalize the tag name
$tagName = strtolower($index);
// Canonicalize the attributes
if (is_string($element)) {
$element = [$element];
}
// Store the tag as allowed with the provided attributes
$this->tagsAllowed[$tagName] = [];
foreach ($element as $attribute) {
if (is_string($attribute)) {
// Canonicalize the attribute name
$attributeName = strtolower($attribute);
$this->tagsAllowed[$tagName][$attributeName] = null;
}
}
}
}
return $this;
}
/**
* Returns the attributesAllowed option
*
* @return array
*/
public function getAttributesAllowed()
{
return $this->attributesAllowed;
}
/**
* Sets the attributesAllowed option
*
* @param array|string $attributesAllowed
* @return self Provides a fluent interface
*/
public function setAttributesAllowed($attributesAllowed)
{
if (! is_array($attributesAllowed)) {
$attributesAllowed = [$attributesAllowed];
}
// Store each attribute as allowed
foreach ($attributesAllowed as $attribute) {
if (is_string($attribute)) {
// Canonicalize the attribute name
$attributeName = strtolower($attribute);
$this->attributesAllowed[$attributeName] = null;
}
}
return $this;
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* If the value provided is non-scalar, the value will remain unfiltered
*
* @todo improve docblock descriptions
* @param string $value
* @return string|mixed
*/
public function filter($value)
{
if (! is_scalar($value)) {
return $value;
}
$value = (string) $value;
// Strip HTML comments first
$open = '';
$closeLen = strlen($close);
while (($start = strpos($value, $open)) !== false) {
$end = strpos($value, $close, $start + $openLen);
if ($end === false) {
$value = substr($value, 0, $start);
} else {
$value = substr($value, 0, $start) . substr($value, $end + $closeLen);
}
}
// Initialize accumulator for filtered data
$dataFiltered = '';
// Parse the input data iteratively as regular pre-tag text followed by a
// tag; either may be empty strings
preg_match_all('/([^<]*)([^>]*>?)/', (string) $value, $matches);
// Iterate over each set of matches
foreach ($matches[1] as $index => $preTag) {
// If the pre-tag text is non-empty, strip any ">" characters from it
if (strlen($preTag)) {
$preTag = str_replace('>', '', $preTag);
}
// If a tag exists in this match, then filter the tag
$tag = $matches[2][$index];
if (strlen($tag)) {
$tagFiltered = $this->_filterTag($tag);
} else {
$tagFiltered = '';
}
// Add the filtered pre-tag text and filtered tag to the data buffer
$dataFiltered .= $preTag . $tagFiltered;
}
// Return the filtered data
return $dataFiltered;
}
/**
* Filters a single tag against the current option settings
*
* @param string $tag
* @return string
*/
// @codingStandardsIgnoreStart
protected function _filterTag($tag)
{
// @codingStandardsIgnoreEnd
// Parse the tag into:
// 1. a starting delimiter (mandatory)
// 2. a tag name (if available)
// 3. a string of attributes (if available)
// 4. an ending delimiter (if available)
$isMatch = preg_match('~(?)(\w*)((/(?!>)|[^/>])*)(/?>)~', $tag, $matches);
// If the tag does not match, then strip the tag entirely
if (! $isMatch) {
return '';
}
// Save the matches to more meaningfully named variables
$tagStart = $matches[1];
$tagName = strtolower($matches[2]);
$tagAttributes = $matches[3];
$tagEnd = $matches[5];
// If the tag is not an allowed tag, then remove the tag entirely
if (! isset($this->tagsAllowed[$tagName])) {
return '';
}
// Trim the attribute string of whitespace at the ends
$tagAttributes = trim($tagAttributes);
// If there are non-whitespace characters in the attribute string
if (strlen($tagAttributes)) {
// Parse iteratively for well-formed attributes
preg_match_all('/([\w-]+)\s*=\s*(?:(")(.*?)"|(\')(.*?)\')/s', $tagAttributes, $matches);
// Initialize valid attribute accumulator
$tagAttributes = '';
// Iterate over each matched attribute
foreach ($matches[1] as $index => $attributeName) {
$attributeName = strtolower($attributeName);
$attributeDelimiter = empty($matches[2][$index]) ? $matches[4][$index] : $matches[2][$index];
$attributeValue = $matches[3][$index] === '' ? $matches[5][$index] : $matches[3][$index];
// If the attribute is not allowed, then remove it entirely
if (
! array_key_exists($attributeName, $this->tagsAllowed[$tagName])
&& ! array_key_exists($attributeName, $this->attributesAllowed)
) {
continue;
}
// Add the attribute to the accumulator
$tagAttributes .= " $attributeName=" . $attributeDelimiter
. $attributeValue . $attributeDelimiter;
}
}
// Reconstruct tags ending with "/>" as backwards-compatible XHTML tag
if (str_contains($tagEnd, '/')) {
$tagEnd = " $tagEnd";
}
// Return the filtered tag
return $tagStart . $tagName . $tagAttributes . $tagEnd;
}
}
PK uUhv[ src/DateTimeSelect.phpnu ٘ isNullOnEmpty()
&& (
empty($value['year'])
|| empty($value['month'])
|| empty($value['day'])
|| empty($value['hour'])
|| empty($value['minute'])
|| (isset($value['second']) && empty($value['second']))
)
) {
return;
}
if (
$this->isNullOnAllEmpty()
&& (
empty($value['year'])
&& empty($value['month'])
&& empty($value['day'])
&& empty($value['hour'])
&& empty($value['minute'])
&& (! isset($value['second']) || empty($value['second']))
)
) {
// Cannot handle this value
return;
}
if (! isset($value['second'])) {
$value['second'] = '00';
}
$this->filterable($value);
ksort($value);
$value = vsprintf($this->format, $value);
return $value;
}
}
PK uU+c src/Word/DashToUnderscore.phpnu ٘ setSearchSeparator($searchSeparator);
$this->setReplacementSeparator($replacementSeparator);
}
/**
* Sets a new separator to search for
*
* @param string $separator Separator to search for
* @return self
*/
public function setSearchSeparator($separator)
{
$this->searchSeparator = $separator;
return $this;
}
/**
* Returns the actual set separator to search for
*
* @return string
*/
public function getSearchSeparator()
{
return $this->searchSeparator;
}
/**
* Sets a new separator which replaces the searched one
*
* @param string $separator Separator which replaces the searched one
* @return self
*/
public function setReplacementSeparator($separator)
{
$this->replacementSeparator = $separator;
return $this;
}
/**
* Returns the actual set separator which replaces the searched one
*
* @return string
*/
public function getReplacementSeparator()
{
return $this->replacementSeparator;
}
/**
* Defined by Laminas\Filter\Filter
*
* Returns the string $value, replacing the searched separators with the defined ones
*
* @param string|mixed $value
* @return mixed
* @psalm-return ($value is string ? string : mixed)
*/
public function filter($value)
{
return self::applyFilterOnlyToStringableValuesAndStringableArrayValues(
$value,
Closure::fromCallable([$this, 'filterNormalizedValue'])
);
}
/**
* @param string $value
* @return string
*/
private function filterNormalizedValue($value)
{
if ($this->searchSeparator === null) {
throw new Exception\RuntimeException('You must provide a search separator for this filter to work.');
}
return preg_replace(
'#' . preg_quote($this->searchSeparator, '#') . '#',
$this->replacementSeparator,
$value
);
}
}
PK uUzPW # src/Word/UnderscoreToStudlyCase.phpnu [y separator . '\1', $this->separator . '\1'];
} else {
$pattern = ['#(?<=(?:[A-Z]))([A-Z]+)([A-Z][a-z])#', '#(?<=(?:[a-z0-9]))([A-Z])#'];
$replacement = ['\1' . $this->separator . '\2', $this->separator . '\1'];
}
return preg_replace($pattern, $replacement, $value);
}
}
PK uU}1 src/Word/CamelCaseToDash.phpnu ٘ separator, '#');
if (StringUtils::hasPcreUnicodeSupport()) {
$patterns = [
'#(' . $pregQuotedSeparator . ')(\P{Z}{1})#u',
'#(^\P{Z}{1})#u',
];
$replacements = [
static fn($matches): string => mb_strtoupper($matches[2], 'UTF-8'),
static fn($matches): string => mb_strtoupper($matches[1], 'UTF-8'),
];
} else {
$patterns = [
'#(' . $pregQuotedSeparator . ')([\S]{1})#',
'#(^[\S]{1})#',
];
$replacements = [
static fn($matches): string => strtoupper($matches[2]),
static fn($matches): string => strtoupper($matches[1]),
];
}
$filtered = $value;
foreach ($patterns as $index => $pattern) {
$filtered = preg_replace_callback($pattern, $replacements[$index], $filtered);
}
return $filtered;
}
}
PK uUP>;L L " src/Word/UnderscoreToSeparator.phpnu ٘ separator, $value);
}
}
PK uUZI I 0 src/Word/Service/SeparatorToSeparatorFactory.phpnu ٘ creationOptions = $creationOptions;
}
/**
* {@inheritDoc}
*/
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
{
return new SeparatorToSeparator(
$options['search_separator'] ?? ' ',
$options['replacement_separator'] ?? '-'
);
}
public function createService(ServiceLocatorInterface $serviceLocator)
{
return $this($serviceLocator, self::class, $this->creationOptions);
}
public function setCreationOptions(array $options)
{
$this->creationOptions = $options;
}
}
PK uUDf f src/Word/AbstractSeparator.phpnu ٘
*/
abstract class AbstractSeparator extends AbstractFilter
{
/** @var string */
protected $separator = ' ';
/**
* @param Options|string $separator Space by default
*/
public function __construct($separator = ' ')
{
if (is_array($separator) && isset($separator['separator']) && is_string($separator['separator'])) {
$this->setSeparator($separator['separator']);
return;
}
$this->setSeparator($separator);
}
/**
* Sets a new separator
*
* @param string $separator Separator
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setSeparator($separator)
{
if (! is_string($separator)) {
throw new Exception\InvalidArgumentException('"' . $separator . '" is not a valid separator.');
}
$this->separator = $separator;
return $this;
}
/**
* Returns the actual set separator
*
* @return string
*/
public function getSeparator()
{
return $this->separator;
}
}
PK uU,0 " src/Word/UnderscoreToCamelCase.phpnu ٘ setOptions($options);
}
}
/**
* Determine whether the in_array() call should be "strict" or not. See in_array docs.
*
* @param bool $strict
*/
public function setStrict($strict = true): void
{
$this->strict = (bool) $strict;
}
/**
* Returns whether the in_array() call should be "strict" or not. See in_array docs.
*
* @return bool
*/
public function getStrict()
{
return $this->strict;
}
/**
* Set the list of items to white-list.
*
* @param array|Traversable $list
*/
public function setList($list = []): void
{
if (! is_array($list)) {
$list = ArrayUtils::iteratorToArray($list);
}
$this->list = $list;
}
/**
* Get the list of items to white-list
*
* @return array
*/
public function getList()
{
return $this->list;
}
/**
* {@inheritDoc}
*
* Will return $value if its present in the white-list. If $value is rejected then it will return null.
*/
public function filter($value)
{
return in_array($value, $this->getList(), $this->getStrict()) ? $value : null;
}
}
PK uU src/Encrypt/BlockCipher.phpnu ٘ encryption key string
* 'key_iteration' => the number of iterations for the PBKDF2 key generation
* 'algorithm => cipher algorithm to use
* 'hash' => algorithm to use for the authentication
* 'vector' => initialization vector
* )
*/
protected $encryption = [
'key_iteration' => 5000,
'algorithm' => 'aes',
'hash' => 'sha256',
];
/**
* BlockCipher
*
* @var BlockCipher
*/
protected $blockCipher;
/**
* Internal compression
*
* @var array
*/
protected $compression;
/**
* @param string|array|Traversable $options Encryption Options
* @throws Exception\RuntimeException
* @throws Exception\InvalidArgumentException
*/
public function __construct($options)
{
$cipherPluginManager = CryptBlockCipher::getSymmetricPluginManager();
$cipherType = $cipherPluginManager->has('openssl') ? 'openssl' : 'mcrypt';
try {
$this->blockCipher = CryptBlockCipher::factory($cipherType, $this->encryption);
} catch (SymmetricException\RuntimeException) {
throw new Exception\RuntimeException(sprintf(
'The BlockCipher cannot be used without the %s extension',
$cipherType
));
}
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
} elseif (is_string($options)) {
$options = ['key' => $options];
} elseif (! is_array($options)) {
throw new Exception\InvalidArgumentException('Invalid options argument provided to filter');
}
if (array_key_exists('compression', $options)) {
$this->setCompression($options['compression']);
unset($options['compress']);
}
$this->setEncryption($options);
}
/**
* Returns the set encryption options
*
* @return array
*/
public function getEncryption()
{
return $this->encryption;
}
/**
* Sets new encryption options
*
* @param string|array $options Encryption options
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setEncryption($options)
{
if (is_string($options)) {
$this->blockCipher->setKey($options);
$this->encryption['key'] = $options;
return $this;
}
if (! is_array($options)) {
throw new Exception\InvalidArgumentException('Invalid options argument provided to filter');
}
$options += $this->encryption;
if (isset($options['key'])) {
$this->blockCipher->setKey($options['key']);
}
if (isset($options['algorithm'])) {
try {
$this->blockCipher->setCipherAlgorithm($options['algorithm']);
} catch (CryptException\InvalidArgumentException) {
throw new Exception\InvalidArgumentException(
"The algorithm '{$options['algorithm']}' is not supported"
);
}
}
if (isset($options['hash'])) {
try {
$this->blockCipher->setHashAlgorithm($options['hash']);
} catch (CryptException\InvalidArgumentException) {
throw new Exception\InvalidArgumentException("The algorithm '{$options['hash']}' is not supported");
}
}
if (isset($options['vector'])) {
$this->setVector($options['vector']);
}
if (isset($options['key_iteration'])) {
$this->blockCipher->setKeyIteration($options['key_iteration']);
}
$this->encryption = $options;
return $this;
}
/**
* Returns the initialization vector
*
* @return string
*/
public function getVector()
{
return $this->encryption['vector'];
}
/**
* Set the inizialization vector
*
* @param string $vector
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setVector($vector)
{
try {
$this->blockCipher->setSalt($vector);
} catch (CryptException\InvalidArgumentException $e) {
throw new Exception\InvalidArgumentException($e->getMessage());
}
$this->encryption['vector'] = $vector;
return $this;
}
/**
* Set the encryption key
*
* @param string $key
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setKey($key)
{
try {
$this->blockCipher->setKey($key);
} catch (CryptException\InvalidArgumentException $e) {
throw new Exception\InvalidArgumentException($e->getMessage());
}
$this->encryption['key'] = $key;
return $this;
}
/**
* Get the encryption key
*
* @return string
*/
public function getKey()
{
return $this->encryption['key'];
}
/**
* Returns the compression
*
* @return array
*/
public function getCompression()
{
return $this->compression;
}
/**
* Sets an internal compression for values to encrypt
*
* @param string|array $compression
* @return self
*/
public function setCompression($compression)
{
if (is_string($this->compression)) {
$compression = ['adapter' => $compression];
}
$this->compression = $compression;
return $this;
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Encrypts $value with the defined settings
*
* @param string $value The content to encrypt
* @throws Exception\InvalidArgumentException
* @return string The encrypted content
*/
public function encrypt($value)
{
// compress prior to encryption
if (! empty($this->compression)) {
$compress = new Compress($this->compression);
$value = $compress($value);
}
try {
$encrypted = $this->blockCipher->encrypt($value);
} catch (CryptException\InvalidArgumentException $e) {
throw new Exception\InvalidArgumentException($e->getMessage());
}
return $encrypted;
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Decrypts $value with the defined settings
*
* @param string $value Content to decrypt
* @return string The decrypted content
*/
public function decrypt($value)
{
$decrypted = $this->blockCipher->decrypt($value);
// decompress after decryption
if (! empty($this->compression)) {
$decompress = new Decompress($this->compression);
$decrypted = $decompress($decrypted);
}
return $decrypted;
}
/**
* Returns the adapter name
*
* @return string
*/
public function toString()
{
return 'BlockCipher';
}
}
PK uUyd4 4 src/Encrypt/Openssl.phpnu ٘ = 3. Use of this adapter should be avoided
*
* @psalm-type Options = array{
* public?: string,
* private?: string,
* envelope?: string,
* passphrase?: string,
* package?: bool,
* compression?: string|array{adapter: string},
* }
* @psalm-type CompressionOptions = array{
* adapter: string,
* }&array
* @final
*/
class Openssl implements EncryptionAlgorithmInterface
{
/**
* Definitions for encryption
*
* @internal
*
* @var array{
* public: string[],
* private: string[],
* envelope: string[],
* }
*/
protected $keys = [
'public' => [],
'private' => [],
'envelope' => [],
];
/**
* Internal passphrase
*
* @internal
*
* @var string|null
*/
protected $passphrase;
/**
* Internal compression
*
* @internal
*
* @var CompressionOptions|null
*/
protected $compression;
/**
* Internal create package
*
* @internal
*
* @var bool
*/
protected $package = false;
/**
* Available options
* 'public' => public key
* 'private' => private key
* 'envelope' => envelope key
* 'passphrase' => passphrase
* 'compression' => compress value with this compression adapter
* 'package' => pack envelope keys into encrypted string, simplifies decryption
*
* @param string|Options|Traversable $options Options for this adapter
* @throws Exception\ExtensionNotLoadedException
*/
public function __construct($options = [])
{
if (! extension_loaded('openssl')) {
throw new Exception\ExtensionNotLoadedException('This filter needs the openssl extension');
}
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
}
if (! is_array($options)) {
$options = ['public' => $options];
}
if (array_key_exists('passphrase', $options)) {
$this->setPassphrase($options['passphrase']);
unset($options['passphrase']);
}
if (array_key_exists('compression', $options)) {
$this->setCompression($options['compression']);
unset($options['compression']);
}
if (array_key_exists('package', $options)) {
$this->setPackage($options['package']);
unset($options['package']);
}
$this->_setKeys($options);
}
/**
* Sets the encryption keys
*
* @internal
*
* @param array $keys Key with type association
* @return $this
* @throws Exception\InvalidArgumentException
*/
protected function _setKeys($keys) // phpcs:ignore
{
if (! is_array($keys)) {
throw new Exception\InvalidArgumentException('Invalid options argument provided to filter');
}
foreach ($keys as $type => $key) {
if (is_string($key) && is_file($key) && is_readable($key)) {
$cert = file_get_contents($key);
} else {
$cert = $key;
$key = count($this->keys[$type]);
}
switch ($type) {
case 'public':
$test = openssl_pkey_get_public($cert);
if ($test === false) {
throw new Exception\InvalidArgumentException("Public key '{$cert}' not valid");
}
$this->keys['public'][$key] = $cert;
break;
case 'private':
if (null !== $this->getPassphrase()) {
$test = openssl_pkey_get_private($cert, $this->getPassphrase());
} else {
$test = openssl_pkey_get_private($cert);
}
if ($test === false) {
throw new Exception\InvalidArgumentException("Private key '{$cert}' not valid");
}
$this->keys['private'][$key] = $cert;
break;
case 'envelope':
$this->keys['envelope'][$key] = $cert;
break;
default:
break;
}
}
return $this;
}
/**
* Returns all public keys
*
* @return string[]
*/
public function getPublicKey()
{
return $this->keys['public'];
}
/**
* Sets public keys
*
* @param string|array $key Public keys
* @return self
*/
public function setPublicKey($key)
{
if (is_array($key)) {
foreach ($key as $type => $option) {
if ($type !== 'public') {
$key['public'] = $option;
unset($key[$type]);
}
}
} else {
$key = ['public' => $key];
}
return $this->_setKeys($key);
}
/**
* Returns all private keys
*
* @return string[]
*/
public function getPrivateKey()
{
return $this->keys['private'];
}
/**
* Sets private keys
*
* @param string|array $key Private key
* @param string|null $passphrase
* @return self
*/
public function setPrivateKey($key, $passphrase = null)
{
if (is_array($key)) {
foreach ($key as $type => $option) {
if ($type !== 'private') {
$key['private'] = $option;
unset($key[$type]);
}
}
} else {
$key = ['private' => $key];
}
if ($passphrase !== null) {
$this->setPassphrase($passphrase);
}
return $this->_setKeys($key);
}
/**
* Returns all envelope keys
*
* @return string[]
*/
public function getEnvelopeKey()
{
return $this->keys['envelope'];
}
/**
* Sets envelope keys
*
* @param string|array $key Envelope keys
* @return self
*/
public function setEnvelopeKey($key)
{
if (is_array($key)) {
foreach ($key as $type => $option) {
if ($type !== 'envelope') {
$key['envelope'] = $option;
unset($key[$type]);
}
}
} else {
$key = ['envelope' => $key];
}
return $this->_setKeys($key);
}
/**
* Returns the passphrase
*
* @return string|null
*/
public function getPassphrase()
{
return $this->passphrase;
}
/**
* Sets a new passphrase
*
* @param string $passphrase
* @return self
*/
public function setPassphrase($passphrase)
{
$this->passphrase = $passphrase;
return $this;
}
/**
* Returns the compression
*
* @return CompressionOptions|null
*/
public function getCompression()
{
return $this->compression;
}
/**
* Sets an internal compression for values to encrypt
*
* @param string|CompressionOptions $compression
* @return self
*/
public function setCompression($compression)
{
if (is_string($compression)) {
$compression = ['adapter' => $compression];
}
$this->compression = $compression;
return $this;
}
/**
* Returns if header should be packaged
*
* @return bool
*/
public function getPackage()
{
return $this->package;
}
/**
* Sets if the envelope keys should be included in the encrypted value
*
* @param bool $package
* @return self
*/
public function setPackage($package)
{
$this->package = (bool) $package;
return $this;
}
/**
* Encrypts $value with the defined settings
* Note that you also need the "encrypted" keys to be able to decrypt
*
* @param string $value Content to encrypt
* @return string The encrypted content
* @throws Exception\RuntimeException
*/
public function encrypt($value)
{
if (! $this->keys['public']) {
throw new Exception\RuntimeException('Openssl can not encrypt without public keys');
}
$encryptedkeys = [];
$keys = [];
$fingerprints = [];
$count = -1;
foreach ($this->keys['public'] as $key => $cert) {
$keys[$key] = openssl_pkey_get_public($cert);
assert($keys[$key] instanceof OpenSSLAsymmetricKey);
if ($this->package) {
$details = openssl_pkey_get_details($keys[$key]);
if ($details === false) {
$details = ['key' => 'Laminas'];
}
++$count;
$fingerprints[$count] = md5($details['key']);
}
}
// compress prior to encryption
if (! empty($this->compression)) {
$compress = new Compress($this->compression);
$value = $compress->filter($value);
}
$bytesSealed = openssl_seal($value, $encrypted, $encryptedkeys, array_values($keys), 'RC4');
if ($bytesSealed === false) {
throw new Exception\RuntimeException('Openssl was not able to encrypt your content with the given options');
}
$this->keys['envelope'] = $encryptedkeys;
// Pack data and envelope keys into single string
if ($this->package) {
$header = pack('n', count($this->keys['envelope']));
foreach ($this->keys['envelope'] as $key => $envKey) {
$header .= pack('H32n', $fingerprints[$key], strlen($envKey)) . $envKey;
}
$encrypted = $header . $encrypted;
}
return $encrypted;
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Decrypts $value with the defined settings
*
* @param string $value Content to decrypt
* @return string The decrypted content
* @throws Exception\RuntimeException
*/
public function decrypt($value)
{
$decrypted = '';
$envelope = current($this->getEnvelopeKey());
if (count($this->keys['private']) !== 1) {
throw new Exception\RuntimeException('Please give a private key for decryption with Openssl');
}
if (! $this->package && empty($envelope)) {
throw new Exception\RuntimeException('Please give an envelope key for decryption with Openssl');
}
foreach ($this->keys['private'] as $cert) {
if (null !== $this->getPassphrase()) {
$keys = openssl_pkey_get_private($cert, $this->getPassphrase());
} else {
$keys = openssl_pkey_get_private($cert);
}
}
if ($this->package) {
$details = openssl_pkey_get_details($keys);
if ($details !== false) {
$fingerprint = md5($details['key']);
} else {
$fingerprint = md5("Laminas");
}
$count = unpack('ncount', $value);
$count = $count['count'];
$length = 2;
for ($i = $count; $i > 0; --$i) {
$header = unpack('H32print/nsize', substr($value, $length, 18));
$length += 18;
if ($header['print'] === $fingerprint) {
$envelope = substr($value, $length, $header['size']);
}
$length += $header['size'];
}
// remainder of string is the value to decrypt
$value = substr($value, $length);
}
$crypt = openssl_open($value, $decrypted, $envelope, $keys, 'RC4');
if ($crypt === false) {
throw new Exception\RuntimeException('Openssl was not able to decrypt you content with the given options');
}
// decompress after decryption
if (! empty($this->compression)) {
$decompress = new Decompress($this->compression);
$decrypted = $decompress($decrypted);
}
return $decrypted;
}
/**
* Returns the adapter name
*
* @return string
*/
public function toString()
{
return 'Openssl';
}
}
PK uUD , src/Encrypt/EncryptionAlgorithmInterface.phpnu ٘ setOptions($options);
}
}
/**
* Determine whether the in_array() call should be "strict" or not. See in_array docs.
*
* @param bool $strict
*/
public function setStrict($strict = true): void
{
$this->strict = (bool) $strict;
}
/**
* Returns whether the in_array() call should be "strict" or not. See in_array docs.
*
* @return bool
*/
public function getStrict()
{
return $this->strict;
}
/**
* Set the list of items to black-list.
*
* @param array|Traversable $list
*/
public function setList($list = []): void
{
if (! is_array($list)) {
$list = ArrayUtils::iteratorToArray($list);
}
$this->list = $list;
}
/**
* Get the list of items to black-list
*
* @return array
*/
public function getList()
{
return $this->list;
}
/**
* {@inheritDoc}
*
* Will return null if $value is present in the black-list. If $value is NOT present then it will return $value.
*/
public function filter($value)
{
return in_array($value, $this->getList(), $this->getStrict()) ? null : $value;
}
}
PK uU}_ src/MonthSelect.phpnu ٘ setOptions($options);
}
}
/**
* @param bool $nullOnAllEmpty
* @return self
*/
public function setNullOnAllEmpty($nullOnAllEmpty)
{
$this->nullOnAllEmpty = $nullOnAllEmpty;
return $this;
}
/**
* @return bool
*/
public function isNullOnAllEmpty()
{
return $this->nullOnAllEmpty;
}
/**
* @param bool $nullOnEmpty
* @return self
*/
public function setNullOnEmpty($nullOnEmpty)
{
$this->nullOnEmpty = $nullOnEmpty;
return $this;
}
/**
* @return bool
*/
public function isNullOnEmpty()
{
return $this->nullOnEmpty;
}
/**
* Attempts to filter an array of date/time information to a formatted
* string.
*
* @param mixed $value input to the filter
* @return mixed|string|null
* @throws Exception\RuntimeException If filtering $value is impossible.
* @psalm-return ($value is array ? string|null : mixed)
*/
public function filter($value)
{
if (! is_array($value)) {
// nothing to do
return $value;
}
// Convert the date to a specific format
if (
$this->isNullOnEmpty()
&& array_reduce($value, self::class . '::reduce', false)
) {
return null;
}
if (
$this->isNullOnAllEmpty()
&& array_reduce($value, self::class . '::reduce', true)
) {
return null;
}
$this->filterable($value);
ksort($value);
$value = vsprintf($this->format, $value);
return $value;
}
/**
* Ensures there are enough inputs in the array to properly format the date.
*
* @param array $value
* @throws Exception\RuntimeException
*/
protected function filterable($value)
{
if (count($value) !== $this->expectedInputs) {
throw new Exception\RuntimeException(
sprintf(
'There are not enough values in the array to filter this date (Required: %d, Received: %d)',
$this->expectedInputs,
count($value)
)
);
}
}
/**
* Reduce to a single value
*
* @param string $soFar
* @param string $value
* @return bool
*/
public static function reduce($soFar, $value)
{
return $soFar || empty($value);
}
}
PK uUI src/Whitelist.phpnu ٘ > src/UpperCaseWords.phpnu ٘ null,
];
/**
* @param string|UnicodeOptions|iterable|null $encodingOrOptions OPTIONAL
*/
public function __construct($encodingOrOptions = null)
{
if ($encodingOrOptions !== null) {
if (self::isOptions($encodingOrOptions)) {
$this->setOptions($encodingOrOptions);
} else {
$this->setEncoding($encodingOrOptions);
}
}
}
/**
* {@inheritDoc}
*
* Returns the string $value, converting words to have an uppercase first character as necessary
*
* If the value provided is not a string, the value will remain unfiltered
*
* @param string|mixed $value
* @return string|mixed
* @psalm-return ($value is string ? string : mixed)
*/
public function filter($value)
{
if (! is_string($value)) {
return $value;
}
return mb_convert_case((string) $value, MB_CASE_TITLE, $this->getEncoding());
}
}
PK uU"}$ $ src/DataUnitFormatter.phpnu ٘ ,
* }
* @extends AbstractFilter
*/
final class DataUnitFormatter extends AbstractFilter
{
public const MODE_BINARY = 'binary';
public const MODE_DECIMAL = 'decimal';
public const BASE_BINARY = 1024;
public const BASE_DECIMAL = 1000;
/**
* A list of all possible filter modes:
*
* @var list
*/
private static array $modes = [
self::MODE_BINARY,
self::MODE_DECIMAL,
];
/**
* A list of standardized binary prefix formats for decimal and binary mode
*
* @link https://en.wikipedia.org/wiki/Binary_prefix
*
* @var array>
*/
private static array $standardizedPrefixes = [
// binary IEC units:
self::MODE_BINARY => ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi', 'Yi'],
// decimal SI units:
self::MODE_DECIMAL => ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'],
];
/**
* Default options:
*
* @var Options
*/
protected $options = [
'mode' => self::MODE_DECIMAL,
'unit' => '',
'precision' => 2,
'prefixes' => [],
];
/**
* @param Options $options
*/
public function __construct($options = [])
{
if (! self::isOptions($options)) {
throw new InvalidArgumentException('The unit filter needs options to work.');
}
if (! isset($options['unit'])) {
throw new InvalidArgumentException('The unit filter needs a unit to work with.');
}
$this->setOptions($options);
}
/**
* Define the mode of the filter. Possible values can be fount at self::$modes.
*
* @param string $mode
* @throws InvalidArgumentException
*/
protected function setMode($mode)
{
$mode = strtolower($mode);
if (! in_array($mode, self::$modes, true)) {
throw new InvalidArgumentException(sprintf('Invalid binary mode: %s', $mode));
}
$this->options['mode'] = $mode;
}
/**
* Get current filter mode
*
* @return string
*/
protected function getMode()
{
return $this->options['mode'];
}
/**
* Find out if the filter is in decimal mode.
*
* @return bool
*/
protected function isDecimalMode()
{
return $this->getMode() === self::MODE_DECIMAL;
}
/**
* Find out if the filter is in binary mode.
*
* @return bool
*/
protected function isBinaryMode()
{
return $this->getMode() === self::MODE_BINARY;
}
/**
* Define the unit of the filter. Possible values can be fount at self::$types.
*
* @param string $unit
*/
protected function setUnit($unit)
{
$this->options['unit'] = (string) $unit;
}
/**
* Get current filter type
*
* @return string
*/
protected function getUnit()
{
return $this->options['unit'];
}
/**
* Set the precision of the filtered result.
*
* @param int $precision
*/
protected function setPrecision($precision)
{
$this->options['precision'] = (int) $precision;
}
/**
* Get the precision of the filtered result.
*
* @return int
*/
protected function getPrecision()
{
return $this->options['precision'];
}
/**
* Set the precision of the result.
*
* @param list $prefixes
*/
protected function setPrefixes(array $prefixes)
{
$this->options['prefixes'] = $prefixes;
}
/**
* Get the predefined prefixes or use the build-in standardized lists of prefixes.
*
* @return list
*/
protected function getPrefixes()
{
$prefixes = $this->options['prefixes'];
if ($prefixes) {
return $prefixes;
}
return self::$standardizedPrefixes[$this->getMode()];
}
/**
* Find the prefix at a specific location in the prefixes array.
*
* @return string|null
*/
protected function getPrefixAt(mixed $index)
{
$prefixes = $this->getPrefixes();
return $prefixes[$index] ?? null;
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Returns a human readable format of the amount of bits or bytes.
*
* If the value provided is not numeric, the value will remain unfiltered
*
* @param mixed $value
* @return string|mixed
* @psalm-return ($value is numeric ? string : mixed)
*/
public function filter($value)
{
if (! is_numeric($value)) {
return $value;
}
// Parse to float and check if value is not zero
$amount = (float) $value;
if ($amount === 0.0) {
return $this->formatAmount($amount);
}
// Calculate the correct size and prefix:
$base = $this->isBinaryMode() ? self::BASE_BINARY : self::BASE_DECIMAL;
$power = floor(log($amount, $base));
$prefix = $this->getPrefixAt((int) $power);
// When the amount is too big, no prefix can be found:
if ($prefix === null) {
return $this->formatAmount($amount);
}
// return formatted value:
$result = $amount / $base ** $power;
$formatted = number_format($result, $this->getPrecision());
return $this->formatAmount($formatted, $prefix);
}
/**
* @param float|string $amount
* @param string|null $prefix
* @return string
*/
protected function formatAmount($amount, $prefix = null)
{
return sprintf('%s %s%s', (string) $amount, (string) $prefix, $this->getUnit());
}
}
PK uU src/StringTrim.phpnu ٘
*/
class StringTrim extends AbstractFilter
{
/** @var Options */
protected $options = [
'charlist' => null,
];
/**
* Sets filter options
*
* @param string|Options|iterable|null $charlistOrOptions
*/
public function __construct($charlistOrOptions = null)
{
if ($charlistOrOptions !== null) {
if (! is_array($charlistOrOptions) && ! $charlistOrOptions instanceof Traversable) {
$this->setCharList($charlistOrOptions);
} else {
$this->setOptions($charlistOrOptions);
}
}
}
/**
* Sets the charList option
*
* @param string $charList
* @return self Provides a fluent interface
*/
public function setCharList($charList)
{
if (! strlen($charList)) {
$charList = null;
}
$this->options['charlist'] = $charList;
return $this;
}
/**
* Returns the charList option
*
* @return string|null
*/
public function getCharList()
{
return $this->options['charlist'];
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Returns the string $value with characters stripped from the beginning and end
*
* @param mixed $value
* @return string|mixed
* @psalm-return ($value is string ? string : mixed)
*/
public function filter($value)
{
if (! is_string($value)) {
return $value;
}
$value = (string) $value;
if (null === $this->options['charlist']) {
return $this->unicodeTrim($value);
}
return $this->unicodeTrim($value, $this->options['charlist']);
}
/**
* Unicode aware trim method
* Fixes a PHP problem
*
* @param string $value
* @param string $charlist
* @return string
*/
protected function unicodeTrim($value, $charlist = '\\\\s')
{
$chars = preg_replace(
['/[\^\-\]\\\]/S', '/\\\{4}/S', '/\//'],
['\\\\\\0', '\\', '\/'],
$charlist
);
$pattern = '/^[' . $chars . ']+|[' . $chars . ']+$/usSD';
return preg_replace($pattern, '', $value);
}
}
PK uUDEw Ew src/FilterPluginManager.phpnu ٘
*/
class FilterPluginManager extends AbstractPluginManager
{
protected $aliases = [
// @codingStandardsIgnoreStart
// For the future
'int' => ToInt::class,
'Int' => ToInt::class,
'null' => ToNull::class,
'Null' => ToNull::class,
// I18n filters
'alnum' => Alnum::class,
'Alnum' => Alnum::class,
'alpha' => Alpha::class,
'Alpha' => Alpha::class,
'numberformat' => NumberFormat::class,
'numberFormat' => NumberFormat::class,
'NumberFormat' => NumberFormat::class,
'numberparse' => NumberParse::class,
'numberParse' => NumberParse::class,
'NumberParse' => NumberParse::class,
// Standard filters
'allowlist' => AllowList::class,
'allowList' => AllowList::class,
'AllowList' => AllowList::class,
'basename' => BaseName::class,
'Basename' => BaseName::class,
'blacklist' => DenyList::class,
'Blacklist' => DenyList::class,
'boolean' => Boolean::class,
'Boolean' => Boolean::class,
'callback' => Callback::class,
'Callback' => Callback::class,
'compress' => Compress::class,
'Compress' => Compress::class,
'dataunitformatter' => DataUnitFormatter::class,
'dataUnitFormatter' => DataUnitFormatter::class,
'DataUnitFormatter' => DataUnitFormatter::class,
'dateselect' => DateSelect::class,
'dateSelect' => DateSelect::class,
'DateSelect' => DateSelect::class,
'datetimeformatter' => DateTimeFormatter::class,
'datetimeFormatter' => DateTimeFormatter::class,
'DatetimeFormatter' => DateTimeFormatter::class,
'dateTimeFormatter' => DateTimeFormatter::class,
'DateTimeFormatter' => DateTimeFormatter::class,
'datetimeselect' => DateTimeSelect::class,
'datetimeSelect' => DateTimeSelect::class,
'DatetimeSelect' => DateTimeSelect::class,
'dateTimeSelect' => DateTimeSelect::class,
'DateTimeSelect' => DateTimeSelect::class,
'decompress' => Decompress::class,
'Decompress' => Decompress::class,
'decrypt' => Decrypt::class,
'Decrypt' => Decrypt::class,
'denylist' => DenyList::class,
'denyList' => DenyList::class,
'DenyList' => DenyList::class,
'digits' => Digits::class,
'Digits' => Digits::class,
'dir' => Dir::class,
'Dir' => Dir::class,
'encrypt' => Encrypt::class,
'Encrypt' => Encrypt::class,
'filedecrypt' => File\Decrypt::class,
'fileDecrypt' => File\Decrypt::class,
'FileDecrypt' => File\Decrypt::class,
'fileencrypt' => File\Encrypt::class,
'fileEncrypt' => File\Encrypt::class,
'FileEncrypt' => File\Encrypt::class,
'filelowercase' => File\LowerCase::class,
'fileLowercase' => File\LowerCase::class,
'FileLowercase' => File\LowerCase::class,
'fileLowerCase' => File\LowerCase::class,
'FileLowerCase' => File\LowerCase::class,
'filerename' => File\Rename::class,
'fileRename' => File\Rename::class,
'FileRename' => File\Rename::class,
'filerenameupload' => File\RenameUpload::class,
'fileRenameUpload' => File\RenameUpload::class,
'FileRenameUpload' => File\RenameUpload::class,
'fileuppercase' => File\UpperCase::class,
'fileUppercase' => File\UpperCase::class,
'FileUppercase' => File\UpperCase::class,
'fileUpperCase' => File\UpperCase::class,
'FileUpperCase' => File\UpperCase::class,
'htmlentities' => HtmlEntities::class,
'htmlEntities' => HtmlEntities::class,
'HtmlEntities' => HtmlEntities::class,
'inflector' => Inflector::class,
'Inflector' => Inflector::class,
'monthselect' => MonthSelect::class,
'monthSelect' => MonthSelect::class,
'MonthSelect' => MonthSelect::class,
'pregreplace' => PregReplace::class,
'pregReplace' => PregReplace::class,
'PregReplace' => PregReplace::class,
'realpath' => RealPath::class,
'realPath' => RealPath::class,
'RealPath' => RealPath::class,
'stringprefix' => StringPrefix::class,
'stringPrefix' => StringPrefix::class,
'StringPrefix' => StringPrefix::class,
'stringsuffix' => StringSuffix::class,
'stringSuffix' => StringSuffix::class,
'StringSuffix' => StringSuffix::class,
'stringtolower' => StringToLower::class,
'stringToLower' => StringToLower::class,
'StringToLower' => StringToLower::class,
'stringtoupper' => StringToUpper::class,
'stringToUpper' => StringToUpper::class,
'StringToUpper' => StringToUpper::class,
'stringtrim' => StringTrim::class,
'stringTrim' => StringTrim::class,
'StringTrim' => StringTrim::class,
'stripnewlines' => StripNewlines::class,
'stripNewlines' => StripNewlines::class,
'StripNewlines' => StripNewlines::class,
'striptags' => StripTags::class,
'stripTags' => StripTags::class,
'StripTags' => StripTags::class,
'toint' => ToInt::class,
'toInt' => ToInt::class,
'ToInt' => ToInt::class,
'tofloat' => ToFloat::class,
'toFloat' => ToFloat::class,
'ToFloat' => ToFloat::class,
'tonull' => ToNull::class,
'toNull' => ToNull::class,
'ToNull' => ToNull::class,
'uppercasewords' => UpperCaseWords::class,
'upperCaseWords' => UpperCaseWords::class,
'UpperCaseWords' => UpperCaseWords::class,
'urinormalize' => UriNormalize::class,
'uriNormalize' => UriNormalize::class,
'UriNormalize' => UriNormalize::class,
'whitelist' => AllowList::class,
'Whitelist' => AllowList::class,
'wordcamelcasetodash' => Word\CamelCaseToDash::class,
'wordCamelCaseToDash' => Word\CamelCaseToDash::class,
'WordCamelCaseToDash' => Word\CamelCaseToDash::class,
'wordcamelcasetoseparator' => Word\CamelCaseToSeparator::class,
'wordCamelCaseToSeparator' => Word\CamelCaseToSeparator::class,
'WordCamelCaseToSeparator' => Word\CamelCaseToSeparator::class,
'wordcamelcasetounderscore' => Word\CamelCaseToUnderscore::class,
'wordCamelCaseToUnderscore' => Word\CamelCaseToUnderscore::class,
'WordCamelCaseToUnderscore' => Word\CamelCaseToUnderscore::class,
'worddashtocamelcase' => Word\DashToCamelCase::class,
'wordDashToCamelCase' => Word\DashToCamelCase::class,
'WordDashToCamelCase' => Word\DashToCamelCase::class,
'worddashtoseparator' => Word\DashToSeparator::class,
'wordDashToSeparator' => Word\DashToSeparator::class,
'WordDashToSeparator' => Word\DashToSeparator::class,
'worddashtounderscore' => Word\DashToUnderscore::class,
'wordDashToUnderscore' => Word\DashToUnderscore::class,
'WordDashToUnderscore' => Word\DashToUnderscore::class,
'wordseparatortocamelcase' => Word\SeparatorToCamelCase::class,
'wordSeparatorToCamelCase' => Word\SeparatorToCamelCase::class,
'WordSeparatorToCamelCase' => Word\SeparatorToCamelCase::class,
'wordseparatortodash' => Word\SeparatorToDash::class,
'wordSeparatorToDash' => Word\SeparatorToDash::class,
'WordSeparatorToDash' => Word\SeparatorToDash::class,
'wordseparatortoseparator' => Word\SeparatorToSeparator::class,
'wordSeparatorToSeparator' => Word\SeparatorToSeparator::class,
'WordSeparatorToSeparator' => Word\SeparatorToSeparator::class,
'wordunderscoretocamelcase' => Word\UnderscoreToCamelCase::class,
'wordUnderscoreToCamelCase' => Word\UnderscoreToCamelCase::class,
'WordUnderscoreToCamelCase' => Word\UnderscoreToCamelCase::class,
'wordunderscoretostudlycase' => Word\UnderscoreToStudlyCase::class,
'wordUnderscoreToStudlyCase' => Word\UnderscoreToStudlyCase::class,
'WordUnderscoreToStudlyCase' => Word\UnderscoreToStudlyCase::class,
'wordunderscoretodash' => Word\UnderscoreToDash::class,
'wordUnderscoreToDash' => Word\UnderscoreToDash::class,
'WordUnderscoreToDash' => Word\UnderscoreToDash::class,
'wordunderscoretoseparator' => Word\UnderscoreToSeparator::class,
'wordUnderscoreToSeparator' => Word\UnderscoreToSeparator::class,
'WordUnderscoreToSeparator' => Word\UnderscoreToSeparator::class,
// Legacy Zend Framework aliases
'Zend\I18n\Filter\Alnum' => Alnum::class,
'Zend\I18n\Filter\Alpha' => Alpha::class,
'Zend\I18n\Filter\NumberFormat' => NumberFormat::class,
'Zend\I18n\Filter\NumberParse' => NumberParse::class,
'Zend\Filter\BaseName' => BaseName::class,
'Zend\Filter\Blacklist' => DenyList::class,
'Zend\Filter\Boolean' => Boolean::class,
'Zend\Filter\Callback' => Callback::class,
'Zend\Filter\Compress' => Compress::class,
'Zend\Filter\DataUnitFormatter' => DataUnitFormatter::class,
'Zend\Filter\DateSelect' => DateSelect::class,
'Zend\Filter\DateTimeFormatter' => DateTimeFormatter::class,
'Zend\Filter\DateTimeSelect' => DateTimeSelect::class,
'Zend\Filter\Decompress' => Decompress::class,
'Zend\Filter\Decrypt' => Decrypt::class,
'Zend\Filter\Digits' => Digits::class,
'Zend\Filter\Dir' => Dir::class,
'Zend\Filter\Encrypt' => Encrypt::class,
'Zend\Filter\File\Decrypt' => File\Decrypt::class,
'Zend\Filter\File\Encrypt' => File\Encrypt::class,
'Zend\Filter\File\LowerCase' => File\LowerCase::class,
'Zend\Filter\File\Rename' => File\Rename::class,
'Zend\Filter\File\RenameUpload' => File\RenameUpload::class,
'Zend\Filter\File\UpperCase' => File\UpperCase::class,
'Zend\Filter\HtmlEntities' => HtmlEntities::class,
'Zend\Filter\Inflector' => Inflector::class,
'Zend\Filter\ToInt' => ToInt::class,
'Zend\Filter\ToFloat' => ToFloat::class,
'Zend\Filter\MonthSelect' => MonthSelect::class,
'Zend\Filter\ToNull' => ToNull::class,
'Zend\Filter\UpperCaseWords' => UpperCaseWords::class,
'Zend\Filter\PregReplace' => PregReplace::class,
'Zend\Filter\RealPath' => RealPath::class,
'Zend\Filter\StringPrefix' => StringPrefix::class,
'Zend\Filter\StringSuffix' => StringSuffix::class,
'Zend\Filter\StringToLower' => StringToLower::class,
'Zend\Filter\StringToUpper' => StringToUpper::class,
'Zend\Filter\StringTrim' => StringTrim::class,
'Zend\Filter\StripNewlines' => StripNewlines::class,
'Zend\Filter\StripTags' => StripTags::class,
'Zend\Filter\UriNormalize' => UriNormalize::class,
'Zend\Filter\Whitelist' => AllowList::class,
'Zend\Filter\Word\CamelCaseToDash' => Word\CamelCaseToDash::class,
'Zend\Filter\Word\CamelCaseToSeparator' => Word\CamelCaseToSeparator::class,
'Zend\Filter\Word\CamelCaseToUnderscore' => Word\CamelCaseToUnderscore::class,
'Zend\Filter\Word\DashToCamelCase' => Word\DashToCamelCase::class,
'Zend\Filter\Word\DashToSeparator' => Word\DashToSeparator::class,
'Zend\Filter\Word\DashToUnderscore' => Word\DashToUnderscore::class,
'Zend\Filter\Word\SeparatorToCamelCase' => Word\SeparatorToCamelCase::class,
'Zend\Filter\Word\SeparatorToDash' => Word\SeparatorToDash::class,
'Zend\Filter\Word\SeparatorToSeparator' => Word\SeparatorToSeparator::class,
'Zend\Filter\Word\UnderscoreToCamelCase' => Word\UnderscoreToCamelCase::class,
'Zend\Filter\Word\UnderscoreToStudlyCase' => Word\UnderscoreToStudlyCase::class,
'Zend\Filter\Word\UnderscoreToDash' => Word\UnderscoreToDash::class,
'Zend\Filter\Word\UnderscoreToSeparator' => Word\UnderscoreToSeparator::class,
// v2 normalized FQCNs
'zendfiltertoint' => ToInt::class,
'zendfiltertofloat' => ToFloat::class,
'zendfiltertonull' => ToNull::class,
'zendi18nfilteralnum' => Alnum::class,
'zendi18nfilteralpha' => Alpha::class,
'zendi18nfilternumberformat' => NumberFormat::class,
'zendi18nfilternumberparse' => NumberParse::class,
'zendfilterbasename' => BaseName::class,
'zendfilterblacklist' => DenyList::class,
'zendfilterboolean' => Boolean::class,
'zendfiltercallback' => Callback::class,
'zendfiltercompress' => Compress::class,
'zendfilterdataunitformatter' => DataUnitFormatter::class,
'zendfilterdateselect' => DateSelect::class,
'zendfilterdatetimeformatter' => DateTimeFormatter::class,
'zendfilterdatetimeselect' => DateTimeSelect::class,
'zendfilterdecompress' => Decompress::class,
'zendfilterdecrypt' => Decrypt::class,
'zendfilterdigits' => Digits::class,
'zendfilterdir' => Dir::class,
'zendfilterencrypt' => Encrypt::class,
'zendfilterfiledecrypt' => File\Decrypt::class,
'zendfilterfileencrypt' => File\Encrypt::class,
'zendfilterfilelowercase' => File\LowerCase::class,
'zendfilterfilerename' => File\Rename::class,
'zendfilterfilerenameupload' => File\RenameUpload::class,
'zendfilterfileuppercase' => File\UpperCase::class,
'zendfilterhtmlentities' => HtmlEntities::class,
'zendfilterinflector' => Inflector::class,
'zendfiltermonthselect' => MonthSelect::class,
'zendfilterpregreplace' => PregReplace::class,
'zendfilterrealpath' => RealPath::class,
'zendfilterstringprefix' => StringPrefix::class,
'zendfilterstringsuffix' => StringSuffix::class,
'zendfilterstringtolower' => StringToLower::class,
'zendfilterstringtoupper' => StringToUpper::class,
'zendfilterstringtrim' => StringTrim::class,
'zendfilterstripnewlines' => StripNewlines::class,
'zendfilterstriptags' => StripTags::class,
'zendfilteruppercasewords' => UpperCaseWords::class,
'zendfilterurinormalize' => UriNormalize::class,
'zendfilterwhitelist' => AllowList::class,
'zendfilterwordcamelcasetodash' => Word\CamelCaseToDash::class,
'zendfilterwordcamelcasetoseparator' => Word\CamelCaseToSeparator::class,
'zendfilterwordcamelcasetounderscore' => Word\CamelCaseToUnderscore::class,
'zendfilterworddashtocamelcase' => Word\DashToCamelCase::class,
'zendfilterworddashtoseparator' => Word\DashToSeparator::class,
'zendfilterworddashtounderscore' => Word\DashToUnderscore::class,
'zendfilterwordseparatortocamelcase' => Word\SeparatorToCamelCase::class,
'zendfilterwordseparatortodash' => Word\SeparatorToDash::class,
'zendfilterwordseparatortoseparator' => Word\SeparatorToSeparator::class,
'zendfilterwordunderscoretocamelcase' => Word\UnderscoreToCamelCase::class,
'zendfilterwordunderscoretostudlycase' => Word\UnderscoreToStudlyCase::class,
'zendfilterwordunderscoretodash' => Word\UnderscoreToDash::class,
'zendfilterwordunderscoretoseparator' => Word\UnderscoreToSeparator::class,
// @codingStandardsIgnoreEnd
];
/**
* Default set of plugins factories
*
* @var array
*/
protected $factories = [
// I18n filters
Alnum::class => InvokableFactory::class,
Alpha::class => InvokableFactory::class,
NumberFormat::class => InvokableFactory::class,
NumberParse::class => InvokableFactory::class,
// Standard filters
AllowList::class => InvokableFactory::class,
BaseName::class => InvokableFactory::class,
Blacklist::class => InvokableFactory::class,
Boolean::class => InvokableFactory::class,
Callback::class => InvokableFactory::class,
Compress::class => InvokableFactory::class,
DataUnitFormatter::class => InvokableFactory::class,
DateSelect::class => InvokableFactory::class,
DateTimeFormatter::class => InvokableFactory::class,
DateTimeSelect::class => InvokableFactory::class,
Decompress::class => InvokableFactory::class,
Decrypt::class => InvokableFactory::class,
DenyList::class => InvokableFactory::class,
Digits::class => InvokableFactory::class,
Dir::class => InvokableFactory::class,
Encrypt::class => InvokableFactory::class,
File\Decrypt::class => InvokableFactory::class,
File\Encrypt::class => InvokableFactory::class,
File\LowerCase::class => InvokableFactory::class,
File\Rename::class => InvokableFactory::class,
File\RenameUpload::class => InvokableFactory::class,
File\UpperCase::class => InvokableFactory::class,
HtmlEntities::class => InvokableFactory::class,
Inflector::class => InvokableFactory::class,
ToInt::class => InvokableFactory::class,
ToFloat::class => InvokableFactory::class,
MonthSelect::class => InvokableFactory::class,
ToNull::class => InvokableFactory::class,
UpperCaseWords::class => InvokableFactory::class,
PregReplace::class => InvokableFactory::class,
RealPath::class => InvokableFactory::class,
StringPrefix::class => InvokableFactory::class,
StringSuffix::class => InvokableFactory::class,
StringToLower::class => InvokableFactory::class,
StringToUpper::class => InvokableFactory::class,
StringTrim::class => InvokableFactory::class,
StripNewlines::class => InvokableFactory::class,
StripTags::class => InvokableFactory::class,
ToInt::class => InvokableFactory::class,
ToNull::class => InvokableFactory::class,
UriNormalize::class => InvokableFactory::class,
Whitelist::class => InvokableFactory::class,
Word\CamelCaseToDash::class => InvokableFactory::class,
Word\CamelCaseToSeparator::class => InvokableFactory::class,
Word\CamelCaseToUnderscore::class => InvokableFactory::class,
Word\DashToCamelCase::class => InvokableFactory::class,
Word\DashToSeparator::class => InvokableFactory::class,
Word\DashToUnderscore::class => InvokableFactory::class,
Word\SeparatorToCamelCase::class => InvokableFactory::class,
Word\SeparatorToDash::class => InvokableFactory::class,
Word\SeparatorToSeparator::class => Word\Service\SeparatorToSeparatorFactory::class,
Word\UnderscoreToCamelCase::class => InvokableFactory::class,
Word\UnderscoreToStudlyCase::class => InvokableFactory::class,
Word\UnderscoreToDash::class => InvokableFactory::class,
Word\UnderscoreToSeparator::class => InvokableFactory::class,
// v2 canonical FQCNs
'laminasfiltertoint' => InvokableFactory::class,
'laminasfiltertofloat' => InvokableFactory::class,
'laminasfiltertonull' => InvokableFactory::class,
'laminasi18nfilteralnum' => InvokableFactory::class,
'laminasi18nfilteralpha' => InvokableFactory::class,
'laminasi18nfilternumberformat' => InvokableFactory::class,
'laminasi18nfilternumberparse' => InvokableFactory::class,
'laminasfilterbasename' => InvokableFactory::class,
'laminasfilterblacklist' => InvokableFactory::class,
'laminasfilterboolean' => InvokableFactory::class,
'laminasfiltercallback' => InvokableFactory::class,
'laminasfiltercompress' => InvokableFactory::class,
'laminasfilterdataunitformatter' => InvokableFactory::class,
'laminasfilterdateselect' => InvokableFactory::class,
'laminasfilterdatetimeformatter' => InvokableFactory::class,
'laminasfilterdatetimeselect' => InvokableFactory::class,
'laminasfilterdecompress' => InvokableFactory::class,
'laminasfilterdecrypt' => InvokableFactory::class,
'laminasfilterdigits' => InvokableFactory::class,
'laminasfilterdir' => InvokableFactory::class,
'laminasfilterencrypt' => InvokableFactory::class,
'laminasfilterfiledecrypt' => InvokableFactory::class,
'laminasfilterfileencrypt' => InvokableFactory::class,
'laminasfilterfilelowercase' => InvokableFactory::class,
'laminasfilterfilerename' => InvokableFactory::class,
'laminasfilterfilerenameupload' => InvokableFactory::class,
'laminasfilterfileuppercase' => InvokableFactory::class,
'laminasfilterhtmlentities' => InvokableFactory::class,
'laminasfilterinflector' => InvokableFactory::class,
'laminasfiltermonthselect' => InvokableFactory::class,
'laminasfilterpregreplace' => InvokableFactory::class,
'laminasfilterrealpath' => InvokableFactory::class,
'laminasfilterstringprefix' => InvokableFactory::class,
'laminasfilterstringsuffix' => InvokableFactory::class,
'laminasfilterstringtolower' => InvokableFactory::class,
'laminasfilterstringtoupper' => InvokableFactory::class,
'laminasfilterstringtrim' => InvokableFactory::class,
'laminasfilterstripnewlines' => InvokableFactory::class,
'laminasfilterstriptags' => InvokableFactory::class,
'laminasfilteruppercasewords' => InvokableFactory::class,
'laminasfilterurinormalize' => InvokableFactory::class,
'laminasfilterwhitelist' => InvokableFactory::class,
'laminasfilterwordcamelcasetodash' => InvokableFactory::class,
'laminasfilterwordcamelcasetoseparator' => InvokableFactory::class,
'laminasfilterwordcamelcasetounderscore' => InvokableFactory::class,
'laminasfilterworddashtocamelcase' => InvokableFactory::class,
'laminasfilterworddashtoseparator' => InvokableFactory::class,
'laminasfilterworddashtounderscore' => InvokableFactory::class,
'laminasfilterwordseparatortocamelcase' => InvokableFactory::class,
'laminasfilterwordseparatortodash' => InvokableFactory::class,
'laminasfilterwordseparatortoseparator' => Word\Service\SeparatorToSeparatorFactory::class,
'laminasfilterwordunderscoretocamelcase' => InvokableFactory::class,
'laminasfilterwordunderscoretostudlycase' => InvokableFactory::class,
'laminasfilterwordunderscoretodash' => InvokableFactory::class,
'laminasfilterwordunderscoretoseparator' => InvokableFactory::class,
];
protected $instanceOf = FilterInterface::class;
/**
* Whether or not to share by default; default to false (v2)
*
* @var bool
*/
protected $shareByDefault = false;
/**
* Whether or not to share by default; default to false (v3)
*
* @var bool
*/
protected $sharedByDefault = false;
/**
* {@inheritdoc}
*
* @psalm-assert FilterInterface|callable(mixed): mixed $plugin
*/
public function validate($plugin)
{
if ($plugin instanceof $this->instanceOf) {
// we're okay
return;
}
if (is_callable($plugin)) {
// also okay
return;
}
throw new InvalidServiceException(sprintf(
'Plugin of type %s is invalid; must implement %s\FilterInterface or be callable',
get_debug_type($plugin),
__NAMESPACE__
));
}
/**
* Validate the plugin (v2)
*
* Checks that the filter loaded is either a valid callback or an instance
* of FilterInterface.
*
* @return void
* @throws RuntimeException If invalid.
*/
public function validatePlugin(mixed $plugin)
{
try {
$this->validate($plugin);
} catch (InvalidServiceException $e) {
throw new RuntimeException($e->getMessage(), $e->getCode(), $e);
}
}
/**
* @inheritDoc
* @template InstanceType of FilterInterface
* @param class-string|string $name Service name of plugin to retrieve.
* @param null|array $options Options to use when creating the instance.
* @return InstanceType|callable(mixed): mixed
* @psalm-return ($name is class-string ? InstanceType : callable(mixed): mixed)
*/
public function get($name, ?array $options = null)
{
/** @psalm-suppress MixedReturnStatement */
return parent::get($name, $options);
}
/**
* @param string $name
* @param FilterInterface|callable(mixed): mixed $service
* @return void
* @psalm-suppress MoreSpecificImplementedParamType
*/
public function setService($name, $service)
{
parent::setService($name, $service);
}
}
PK uU> ɫ src/Callback.phpnu ٘ null,
'callback_params' => [],
];
/**
* @param callable|array|string|Traversable $callbackOrOptions
* @param array $callbackParams
*/
public function __construct($callbackOrOptions = [], $callbackParams = [])
{
if (is_callable($callbackOrOptions) || is_string($callbackOrOptions)) {
$this->setCallback($callbackOrOptions);
$this->setCallbackParams($callbackParams);
} else {
$this->setOptions($callbackOrOptions);
}
}
/**
* Sets a new callback for this filter
*
* @param callable $callback
* @throws Exception\InvalidArgumentException
* @return self
*/
public function setCallback($callback)
{
if (is_string($callback) && class_exists($callback)) {
$callback = new $callback();
}
if (! is_callable($callback)) {
throw new Exception\InvalidArgumentException(
'Invalid parameter for callback: must be callable'
);
}
$this->options['callback'] = $callback;
return $this;
}
/**
* Returns the set callback
*
* @return callable
*/
public function getCallback()
{
return $this->options['callback'];
}
/**
* Sets parameters for the callback
*
* @param array $params
* @return self
*/
public function setCallbackParams($params)
{
$this->options['callback_params'] = (array) $params;
return $this;
}
/**
* Get parameters for the callback
*
* @return array
*/
public function getCallbackParams()
{
return $this->options['callback_params'];
}
/**
* Calls the filter per callback
*
* @param mixed $value Options for the set callable
* @return mixed Result from the filter which was called
*/
public function filter($value)
{
$params = (array) $this->options['callback_params'];
array_unshift($params, $value);
return call_user_func_array($this->options['callback'], $params);
}
}
PK uU`* src/StringToLower.phpnu ٘ setEncoding($encodingOrOptions);
} else {
$this->setOptions($encodingOrOptions);
}
}
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Returns the string $value, converting characters to lowercase as necessary
*
* If the value provided is non-scalar, the value will remain unfiltered
*
* @param mixed $value
* @return string|mixed
* @psalm-return ($value is string ? string : $value)
*/
public function filter($value)
{
if (! is_scalar($value)) {
return $value;
}
return mb_strtolower((string) $value, $this->getEncoding());
}
}
PK uUaF src/Decrypt.phpnu ٘ adapter->decrypt($value);
}
}
PK uU src/File/LowerCase.phpnu ٘ null,
'use_upload_name' => false,
'use_upload_extension' => false,
'overwrite' => false,
'randomize' => false,
'stream_factory' => null,
'upload_file_factory' => null,
];
/**
* Store already filtered values, so we can filter multiple
* times the same file without being block by move_uploaded_file
* internal checks
*
* @var array
*/
protected $alreadyFiltered = [];
/**
* Constructor
*
* @param array|string $targetOrOptions The target file path or an options array
*/
public function __construct($targetOrOptions = [])
{
if (is_array($targetOrOptions)) {
$this->setOptions($targetOrOptions);
} else {
$this->setTarget($targetOrOptions);
}
}
/**
* @param StreamFactoryInterface $factory Factory to use to produce a PSR-7
* stream with which to seed a PSR-7 UploadedFileInterface.
* @return self
*/
public function setStreamFactory(StreamFactoryInterface $factory)
{
$this->options['stream_factory'] = $factory;
return $this;
}
/**
* @return null|StreamFactoryInterface
*/
public function getStreamFactory()
{
return $this->options['stream_factory'];
}
/**
* @param string $target Target file path or directory
* @return self
*/
public function setTarget($target)
{
if (! is_string($target)) {
throw new Exception\InvalidArgumentException(
'Invalid target, must be a string'
);
}
$this->options['target'] = $target;
return $this;
}
/**
* @return string Target file path or directory
*/
public function getTarget()
{
return $this->options['target'];
}
/**
* @param UploadedFileFactoryInterface $factory Factory to use to produce
* filtered PSR-7 UploadedFileInterface instances.
* @return self
*/
public function setUploadFileFactory(UploadedFileFactoryInterface $factory)
{
$this->options['upload_file_factory'] = $factory;
return $this;
}
/**
* @return null|UploadedFileFactoryInterface
*/
public function getUploadFileFactory()
{
return $this->options['upload_file_factory'];
}
/**
* @param bool $flag When true, this filter will use the $_FILES['name']
* as the target filename.
* Otherwise, it uses the default 'target' rules.
* @return self
*/
public function setUseUploadName($flag = true)
{
$this->options['use_upload_name'] = (bool) $flag;
return $this;
}
/**
* @return bool
*/
public function getUseUploadName()
{
return $this->options['use_upload_name'];
}
/**
* @param bool $flag When true, this filter will use the original file
* extension for the target filename
* @return self
*/
public function setUseUploadExtension($flag = true)
{
$this->options['use_upload_extension'] = (bool) $flag;
return $this;
}
/**
* @return bool
*/
public function getUseUploadExtension()
{
return $this->options['use_upload_extension'];
}
/**
* @param bool $flag Shall existing files be overwritten?
* @return self
*/
public function setOverwrite($flag = true)
{
$this->options['overwrite'] = (bool) $flag;
return $this;
}
/**
* @return bool
*/
public function getOverwrite()
{
return $this->options['overwrite'];
}
/**
* @param bool $flag Shall target files have a random postfix attached?
* @return self
*/
public function setRandomize($flag = true)
{
$this->options['randomize'] = (bool) $flag;
return $this;
}
/**
* @return bool
*/
public function getRandomize()
{
return $this->options['randomize'];
}
/**
* Defined by Laminas\Filter\Filter
*
* Renames the file $value to the new name set before
* Returns the file $value, removing all but digit characters
*
* @param string|array|UploadedFileInterface $value Full path of file to
* change; $_FILES data array; or UploadedFileInterface instance.
* @return string|array|UploadedFileInterface Returns one of the following:
* - New filename, for string $value
* - Array with tmp_name and name keys for array $value
* - UploadedFileInterface for UploadedFileInterface $value
* @throws Exception\RuntimeException
*/
public function filter($value)
{
// PSR-7 uploaded file
if ($value instanceof UploadedFileInterface) {
return $this->filterPsr7UploadedFile($value);
}
// File upload via traditional SAPI
if (is_array($value) && isset($value['tmp_name'])) {
return $this->filterSapiUploadedFile($value);
}
// String filename
if (is_string($value)) {
return $this->filterStringFilename($value);
}
// Unrecognized; return verbatim
return $value;
}
/**
* @param string $sourceFile Source file path
* @param string $targetFile Target file path
* @throws Exception\RuntimeException
* @return bool
*/
protected function moveUploadedFile($sourceFile, $targetFile)
{
ErrorHandler::start();
$result = move_uploaded_file($sourceFile, $targetFile);
$warningException = ErrorHandler::stop();
if (! $result || null !== $warningException) {
throw new Exception\RuntimeException(
sprintf("File '%s' could not be renamed. An error occurred while processing the file.", $sourceFile),
0,
$warningException
);
}
return $result;
}
/**
* @param string $targetFile Target file path
* @return void
* @throws Exception\InvalidArgumentException
*/
protected function checkFileExists($targetFile)
{
if (! file_exists($targetFile)) {
return;
}
if (! $this->getOverwrite()) {
throw new Exception\InvalidArgumentException(
sprintf("File '%s' could not be renamed. It already exists.", $targetFile)
);
}
unlink($targetFile);
}
/**
* @param string $source
* @param string|null $clientFileName
* @return string
*/
protected function getFinalTarget($source, $clientFileName)
{
$target = $this->getTarget();
if ($target === null || $target === '*') {
$target = $source;
}
// Get the target directory
if (is_dir($target)) {
$targetDir = $target;
$last = $target[strlen($target) - 1];
if (($last !== '/') && ($last !== '\\')) {
$targetDir .= DIRECTORY_SEPARATOR;
}
} else {
$info = pathinfo($target);
$targetDir = $info['dirname'] . DIRECTORY_SEPARATOR;
}
// Get the target filename
if ($this->getUseUploadName()) {
$targetFile = basename($clientFileName);
} elseif (! is_dir($target)) {
$targetFile = basename($target);
if ($this->getUseUploadExtension() && ! $this->getRandomize()) {
$targetInfo = pathinfo($targetFile);
$sourceinfo = pathinfo($clientFileName);
if (isset($sourceinfo['extension'])) {
$targetFile = $targetInfo['filename'] . '.' . $sourceinfo['extension'];
}
}
} else {
$targetFile = basename($source);
}
if ($this->getRandomize()) {
$targetFile = $this->applyRandomToFilename($clientFileName, $targetFile);
}
return $targetDir . $targetFile;
}
/**
* @param string $source
* @param string $filename
* @return string
*/
protected function applyRandomToFilename($source, $filename)
{
$info = pathinfo($filename);
$filename = $info['filename'] . str_replace('.', '_', uniqid('_', true));
$sourceinfo = pathinfo($source);
$extension = '';
if ($this->getUseUploadExtension() === true && isset($sourceinfo['extension'])) {
$extension .= '.' . $sourceinfo['extension'];
} elseif (isset($info['extension'])) {
$extension .= '.' . $info['extension'];
}
return $filename . $extension;
}
/**
* @param string $fileName
* @return string
*/
private function filterStringFilename($fileName)
{
if (isset($this->alreadyFiltered[$fileName])) {
return $this->alreadyFiltered[$fileName];
}
$targetFile = $this->getFinalTarget($fileName, $fileName);
if ($fileName === $targetFile || ! file_exists($fileName)) {
return $fileName;
}
$this->checkFileExists($targetFile);
$this->moveUploadedFile($fileName, $targetFile);
$this->alreadyFiltered[$fileName] = $targetFile;
return $this->alreadyFiltered[$fileName];
}
/**
* @param array $fileData
* @return array
*/
private function filterSapiUploadedFile(array $fileData)
{
$sourceFile = $fileData['tmp_name'];
if (isset($this->alreadyFiltered[$sourceFile])) {
return $this->alreadyFiltered[$sourceFile];
}
$clientFilename = $fileData['name'];
$targetFile = $this->getFinalTarget($sourceFile, $clientFilename);
if ($sourceFile === $targetFile || ! file_exists($sourceFile)) {
return $fileData;
}
$this->checkFileExists($targetFile);
$this->moveUploadedFile($sourceFile, $targetFile);
$this->alreadyFiltered[$sourceFile] = $fileData;
$this->alreadyFiltered[$sourceFile]['tmp_name'] = $targetFile;
return $this->alreadyFiltered[$sourceFile];
}
/**
* @return UploadedFileInterface
* @throws Exception\RuntimeException If no stream factory is composed in the filter.
* @throws Exception\RuntimeException If no uploaded file factory is composed in the filter.
*/
private function filterPsr7UploadedFile(UploadedFileInterface $uploadedFile)
{
$alreadyFilteredKey = spl_object_hash($uploadedFile);
if (isset($this->alreadyFiltered[$alreadyFilteredKey])) {
return $this->alreadyFiltered[$alreadyFilteredKey];
}
$sourceFile = $uploadedFile->getStream()->getMetadata('uri');
$clientFilename = $uploadedFile->getClientFilename();
$targetFile = $this->getFinalTarget($sourceFile, $clientFilename);
if ($sourceFile === $targetFile || ! file_exists($sourceFile)) {
return $uploadedFile;
}
$this->checkFileExists($targetFile);
$uploadedFile->moveTo($targetFile);
$streamFactory = $this->getStreamFactory();
if (! $streamFactory) {
throw new Exception\RuntimeException(sprintf(
'No PSR-17 %s present; cannot filter file. Please pass the stream_factory'
. ' option with a %s instance when creating the filter for use with PSR-7.',
StreamFactoryInterface::class,
StreamFactoryInterface::class
));
}
$stream = $streamFactory->createStreamFromFile($targetFile);
$uploadedFileFactory = $this->getUploadFileFactory();
if (! $uploadedFileFactory) {
throw new Exception\RuntimeException(sprintf(
'No PSR-17 %s present; cannot filter file. Please pass the upload_file_factory'
. ' option with a %s instance when creating the filter for use with PSR-7.',
UploadedFileFactoryInterface::class,
UploadedFileFactoryInterface::class
));
}
$this->alreadyFiltered[$alreadyFilteredKey] = $uploadedFileFactory->createUploadedFile(
$stream,
filesize($targetFile),
UPLOAD_ERR_OK,
$uploadedFile->getClientFilename(),
$uploadedFile->getClientMediaType()
);
return $this->alreadyFiltered[$alreadyFilteredKey];
}
}
PK uU1-ఢ src/File/Decrypt.phpnu ٘ filename;
}
/**
* Sets the new filename where the content will be stored
*
* @param string $filename (Optional) New filename to set
* @return self
*/
public function setFilename($filename = null)
{
$this->filename = $filename;
return $this;
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Decrypts the file $value with the defined settings
*
* @param string|array $value Full path of file to change or $_FILES data array
* @return string|array The filename which has been set
* @throws Exception\InvalidArgumentException
* @throws Exception\RuntimeException
*/
public function filter($value)
{
if (! is_scalar($value) && ! is_array($value)) {
return $value;
}
// An uploaded file? Retrieve the 'tmp_name'
$isFileUpload = false;
if (is_array($value)) {
if (! isset($value['tmp_name'])) {
return $value;
}
$isFileUpload = true;
$uploadData = $value;
$value = $value['tmp_name'];
}
if (! file_exists($value)) {
throw new Exception\InvalidArgumentException("File '$value' not found");
}
if (! isset($this->filename)) {
$this->filename = $value;
}
if (file_exists($this->filename) && ! is_writable($this->filename)) {
throw new Exception\RuntimeException("File '{$this->filename}' is not writable");
}
$content = file_get_contents($value);
if (! $content) {
throw new Exception\RuntimeException("Problem while reading file '$value'");
}
$decrypted = parent::filter($content);
$result = file_put_contents($this->filename, $decrypted);
if (! $result) {
throw new Exception\RuntimeException("Problem while writing file '{$this->filename}'");
}
if ($isFileUpload) {
$uploadData['tmp_name'] = $this->filename;
return $uploadData;
}
return $this->filename;
}
}
PK uU X src/File/Encrypt.phpnu ٘ filename;
}
/**
* Sets the new filename where the content will be stored
*
* @param string $filename (Optional) New filename to set
* @return self
*/
public function setFilename($filename = null)
{
$this->filename = $filename;
return $this;
}
/**
* Defined by Laminas\Filter\Filter
*
* Encrypts the file $value with the defined settings
*
* @param string|array $value Full path of file to change or $_FILES data array
* @return string|array The filename which has been set, or false when there were errors
* @throws Exception\InvalidArgumentException
* @throws Exception\RuntimeException
*/
public function filter($value)
{
if (! is_scalar($value) && ! is_array($value)) {
return $value;
}
// An uploaded file? Retrieve the 'tmp_name'
$isFileUpload = false;
if (is_array($value)) {
if (! isset($value['tmp_name'])) {
return $value;
}
$isFileUpload = true;
$uploadData = $value;
$value = $value['tmp_name'];
}
if (! file_exists($value)) {
throw new Exception\InvalidArgumentException("File '$value' not found");
}
if (! isset($this->filename)) {
$this->filename = $value;
}
if (file_exists($this->filename) && ! is_writable($this->filename)) {
throw new Exception\RuntimeException("File '{$this->filename}' is not writable");
}
$content = file_get_contents($value);
if (! $content) {
throw new Exception\RuntimeException("Problem while reading file '$value'");
}
$encrypted = parent::filter($content);
$result = file_put_contents($this->filename, $encrypted);
if (! $result) {
throw new Exception\RuntimeException("Problem while writing file '{$this->filename}'");
}
if ($isFileUpload) {
$uploadData['tmp_name'] = $this->filename;
return $uploadData;
}
return $this->filename;
}
}
PK uUޓ src/File/UpperCase.phpnu ٘ Source filename or directory which will be renamed
* 'target' => Target filename or directory, the new name of the source file
* 'overwrite' => Shall existing files be overwritten ?
* 'randomize' => Shall target files have a random postfix attached?
*
* @param string|array|Traversable $options Target file or directory to be renamed
* @throws Exception\InvalidArgumentException
*/
public function __construct($options = [])
{
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
} elseif (is_string($options)) {
$options = ['target' => $options];
} elseif (! is_array($options)) {
throw new Exception\InvalidArgumentException(
'Invalid options argument provided to filter'
);
}
$this->setFile($options);
}
/**
* Returns the files to rename and their new name and location
*
* @return array
*/
public function getFile()
{
return $this->files;
}
/**
* Sets a new file or directory as target, deleting existing ones
*
* Array accepts the following keys:
* 'source' => Source filename or directory which will be renamed
* 'target' => Target filename or directory, the new name of the sourcefile
* 'overwrite' => Shall existing files be overwritten?
* 'randomize' => Shall target files have a random postfix attached?
*
* @param string|array $options Old file or directory to be rewritten
* @return self
*/
public function setFile($options)
{
$this->files = [];
$this->addFile($options);
return $this;
}
/**
* Adds a new file or directory as target to the existing ones
*
* Array accepts the following keys:
* 'source' => Source filename or directory which will be renamed
* 'target' => Target filename or directory, the new name of the sourcefile
* 'overwrite' => Shall existing files be overwritten?
* 'randomize' => Shall target files have a random postfix attached?
*
* @param string|array $options Old file or directory to be rewritten
* @return Rename
* @throws Exception\InvalidArgumentException
*/
public function addFile($options)
{
if (is_string($options)) {
$options = ['target' => $options];
} elseif (! is_array($options)) {
throw new Exception\InvalidArgumentException(
'Invalid options to rename filter provided'
);
}
$this->_convertOptions($options);
return $this;
}
/**
* Returns only the new filename without moving it
* But existing files will be erased when the overwrite option is true
*
* @param string $value Full path of file to change
* @param bool $source Return internal information
* @return string The new filename which has been set
* @throws Exception\InvalidArgumentException If the target file already exists.
*/
public function getNewName($value, $source = false)
{
$file = $this->_getFileName($value);
if (! is_array($file)) {
return $file;
}
if ($file['source'] === $file['target']) {
return $value;
}
if (! file_exists($file['source'])) {
return $value;
}
if ($file['overwrite'] && file_exists($file['target'])) {
unlink($file['target']);
}
if (file_exists($file['target'])) {
throw new Exception\InvalidArgumentException(sprintf(
'"File "%s" could not be renamed to "%s"; target file already exists',
$value,
realpath($file['target'])
));
}
if ($source) {
return $file;
}
return $file['target'];
}
/**
* Defined by Laminas\Filter\Filter
*
* Renames the file $value to the new name set before
* Returns the file $value, removing all but digit characters
*
* @param string|array $value Full path of file to change or $_FILES data array
* @throws Exception\RuntimeException
* @return string|array The new filename which has been set
*/
public function filter($value)
{
if (! is_scalar($value) && ! is_array($value)) {
return $value;
}
// An uploaded file? Retrieve the 'tmp_name'
$isFileUpload = false;
if (is_array($value)) {
if (! isset($value['tmp_name'])) {
return $value;
}
$isFileUpload = true;
$uploadData = $value;
$value = $value['tmp_name'];
}
$file = $this->getNewName($value, true);
if (is_string($file)) {
if ($isFileUpload) {
return $uploadData;
} else {
return $file;
}
}
$result = rename($file['source'], $file['target']);
if ($result !== true) {
throw new Exception\RuntimeException(
sprintf(
"File '%s' could not be renamed. "
. "An error occurred while processing the file.",
$value
)
);
}
if ($isFileUpload) {
$uploadData['tmp_name'] = $file['target'];
return $uploadData;
}
return $file['target'];
}
/**
* Internal method for creating the file array
* Supports single and nested arrays
*
* @param array $options
* @return array
*/
// @codingStandardsIgnoreStart
protected function _convertOptions($options)
{
// @codingStandardsIgnoreEnd
$files = [];
foreach ($options as $key => $value) {
if (is_array($value)) {
$this->_convertOptions($value);
continue;
}
switch ($key) {
case "source":
$files['source'] = (string) $value;
break;
case 'target':
$files['target'] = (string) $value;
break;
case 'overwrite':
$files['overwrite'] = (bool) $value;
break;
case 'randomize':
$files['randomize'] = (bool) $value;
break;
default:
break;
}
}
if (empty($files)) {
return $this;
}
if (empty($files['source'])) {
$files['source'] = '*';
}
if (empty($files['target'])) {
$files['target'] = '*';
}
if (empty($files['overwrite'])) {
$files['overwrite'] = false;
}
if (empty($files['randomize'])) {
$files['randomize'] = false;
}
$found = false;
foreach ($this->files as $key => $value) {
if ($value['source'] === $files['source']) {
$this->files[$key] = $files;
$found = true;
}
}
if (! $found) {
$count = count($this->files);
$this->files[$count] = $files;
}
return $this;
}
/**
* Internal method to resolve the requested source
* and return all other related parameters
*
* @param string $file Filename to get the information for
* @return array|string
*/
// @codingStandardsIgnoreStart
protected function _getFileName($file)
{
// @codingStandardsIgnoreEnd
$rename = [];
foreach ($this->files as $value) {
if ($value['source'] === '*') {
if (! isset($rename['source'])) {
$rename = $value;
$rename['source'] = $file;
}
}
if ($value['source'] === $file) {
$rename = $value;
break;
}
}
if (! isset($rename['source'])) {
return $file;
}
if (! isset($rename['target']) || $rename['target'] === '*') {
$rename['target'] = $rename['source'];
}
if (is_dir($rename['target'])) {
$name = basename($rename['source']);
$last = $rename['target'][strlen($rename['target']) - 1];
if ($last !== '/' && $last !== '\\') {
$rename['target'] .= DIRECTORY_SEPARATOR;
}
$rename['target'] .= $name;
}
if ($rename['randomize']) {
$info = pathinfo($rename['target']);
$newTarget = $info['dirname'] . DIRECTORY_SEPARATOR
. $info['filename'] . uniqid('_', false);
if (isset($info['extension'])) {
$newTarget .= '.' . $info['extension'];
}
$rename['target'] = $newTarget;
}
return $rename;
}
}
PK uU;3ݖ` ` src/DateTimeFormatter.phpnu ٘ setOptions($options);
}
}
/**
* Set the format string accepted by date() to use when formatting a string
*
* @param string $format
* @return self
*/
public function setFormat($format)
{
$this->format = $format;
return $this;
}
/**
* Filter a datetime string by normalizing it to the filters specified format
*
* @param DateTime|string|int|mixed $value
* @throws Exception\InvalidArgumentException
* @return string|mixed
*/
public function filter($value)
{
try {
$result = $this->normalizeDateTime($value);
} catch (Throwable $e) {
// DateTime threw an exception, an invalid date string was provided
throw new Exception\InvalidArgumentException('Invalid date string provided', $e->getCode(), $e);
}
if ($result === false) {
return $value;
}
return $result;
}
/**
* Normalize the provided value to a formatted string
*
* @return string|mixed
*/
protected function normalizeDateTime(mixed $value)
{
if ($value === '' || $value === null) {
return $value;
}
if (! is_string($value) && ! is_int($value) && ! $value instanceof DateTime) {
return $value;
}
if (is_int($value)) {
//timestamp
$value = new DateTime('@' . $value);
} elseif (! $value instanceof DateTime) {
$value = new DateTime($value);
}
return $value->format($this->format);
}
}
PK uU!~ src/StripNewlines.phpnu ٘
*/
class StringSuffix extends AbstractFilter
{
/** @var Options */
protected $options = [
'suffix' => null,
];
/**
* @param Options|iterable|null $options
*/
public function __construct($options = null)
{
if ($options !== null) {
$this->setOptions($options);
}
}
/**
* Set the suffix string
*
* @param string $suffix
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setSuffix($suffix)
{
if (! is_string($suffix)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects "suffix" to be string; received "%s"',
__METHOD__,
is_object($suffix) ? $suffix::class : gettype($suffix)
));
}
$this->options['suffix'] = $suffix;
return $this;
}
/**
* Returns the suffix string, which is appended at the end of the input value
*
* @return string
* @throws Exception\InvalidArgumentException
*/
public function getSuffix()
{
if (! isset($this->options['suffix'])) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects a "suffix" option; none given',
self::class
));
}
return $this->options['suffix'];
}
/**
* {@inheritdoc}
*/
public function filter($value)
{
if (! is_scalar($value)) {
return $value;
}
$value = (string) $value;
return $value . $this->getSuffix();
}
}
PK uUs
src/Blacklist.phpnu ٘ setQuoteStyle($options['quotestyle']);
$this->setEncoding($options['encoding']);
$this->setDoubleQuote($options['doublequote']);
}
/**
* Returns the quoteStyle option
*
* @return int
*/
public function getQuoteStyle()
{
return $this->quoteStyle;
}
/**
* Sets the quoteStyle option
*
* @param int $quoteStyle
* @return self Provides a fluent interface
*/
public function setQuoteStyle($quoteStyle)
{
$this->quoteStyle = $quoteStyle;
return $this;
}
/**
* Get encoding
*
* @return string
*/
public function getEncoding()
{
return $this->encoding;
}
/**
* Set encoding
*
* @param string $value
* @return self
*/
public function setEncoding($value)
{
$this->encoding = (string) $value;
return $this;
}
/**
* Returns the charSet option
*
* Proxies to {@link getEncoding()}
*
* @return string
*/
public function getCharSet()
{
return $this->getEncoding();
}
/**
* Sets the charSet option
*
* Proxies to {@link setEncoding()}
*
* @param string $charSet
* @return self Provides a fluent interface
*/
public function setCharSet($charSet)
{
return $this->setEncoding($charSet);
}
/**
* Returns the doubleQuote option
*
* @return bool
*/
public function getDoubleQuote()
{
return $this->doubleQuote;
}
/**
* Sets the doubleQuote option
*
* @param bool $doubleQuote
* @return self Provides a fluent interface
*/
public function setDoubleQuote($doubleQuote)
{
$this->doubleQuote = (bool) $doubleQuote;
return $this;
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Returns the string $value, converting characters to their corresponding HTML entity
* equivalents where they exist
*
* If the value provided is non-scalar, the value will remain unfiltered
*
* @param mixed $value
* @return string|mixed
* @throws Exception\DomainException On encoding mismatches.
* @psalm-return ($value is scalar ? string : mixed)
*/
public function filter($value)
{
if (! is_scalar($value)) {
return $value;
}
$value = (string) $value;
$filtered = htmlentities($value, $this->getQuoteStyle(), $this->getEncoding(), $this->getDoubleQuote());
if (strlen($value) && ! strlen($filtered)) {
if (! function_exists('iconv')) {
throw new Exception\DomainException('Encoding mismatch has resulted in htmlentities errors');
}
$enc = $this->getEncoding();
$value = iconv('', $this->getEncoding() . '//IGNORE', $value);
$filtered = htmlentities($value, $this->getQuoteStyle(), $enc, $this->getDoubleQuote());
if (! strlen($filtered)) {
throw new Exception\DomainException('Encoding mismatch has resulted in htmlentities errors');
}
}
return $filtered;
}
}
PK uUKpTg g src/Encrypt.phpnu ٘ setAdapter($options);
}
/**
* Returns the adapter instance
*
* @throws Exception\RuntimeException
* @throws Exception\InvalidArgumentException
* @return Encrypt\EncryptionAlgorithmInterface
*/
public function getAdapterInstance()
{
if ($this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
return $this->adapter;
}
$adapter = $this->adapter;
$options = $this->getOptions();
if (! class_exists($adapter)) {
$adapter = self::class . '\\' . ucfirst($adapter);
if (! class_exists($adapter)) {
throw new Exception\RuntimeException(sprintf(
'%s unable to load adapter; class "%s" not found',
__METHOD__,
$this->adapter
));
}
}
$this->adapter = new $adapter($options);
if (! $this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'Encryption adapter "%s" does not implement %s\\EncryptionAlgorithmInterface',
$adapter,
self::class
));
}
return $this->adapter;
}
/**
* Returns the name of the set adapter
*
* @return string
*/
public function getAdapter()
{
return $this->adapter->toString();
}
/**
* Sets new encryption options
*
* @param string|array $options (Optional) Encryption options
* @return self
* @throws Exception\DomainException
* @throws Exception\InvalidArgumentException
*/
public function setAdapter($options = null)
{
if (is_string($options)) {
$adapter = $options;
} elseif (isset($options['adapter'])) {
$adapter = $options['adapter'];
unset($options['adapter']);
} else {
$adapter = 'BlockCipher';
}
if (! is_array($options)) {
$options = [];
}
if (class_exists('Laminas\Filter\Encrypt\\' . ucfirst($adapter))) {
$adapter = 'Laminas\Filter\Encrypt\\' . ucfirst($adapter);
} elseif (! class_exists($adapter)) {
throw new Exception\DomainException(
sprintf(
'%s expects a valid registry class name; received "%s", which did not resolve',
__METHOD__,
$adapter
)
);
}
$this->adapter = new $adapter($options);
if (! $this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
throw new Exception\InvalidArgumentException(
"Encoding adapter '" . $adapter
. "' does not implement Laminas\\Filter\\Encrypt\\EncryptionAlgorithmInterface"
);
}
return $this;
}
/**
* Calls adapter methods
*
* @param string $method Method to call
* @param string|array $options Options for this method
* @return mixed
* @throws Exception\BadMethodCallException
*/
public function __call($method, $options)
{
$part = substr($method, 0, 3);
if (($part !== 'get' && $part !== 'set') || ! method_exists($this->adapter, $method)) {
throw new Exception\BadMethodCallException("Unknown method '{$method}'");
}
return call_user_func_array([$this->adapter, $method], $options);
}
/**
* Defined by Laminas\Filter\Filter
*
* Encrypts the content $value with the defined settings
*
* @param string $value Content to encrypt
* @return string The encrypted content
*/
public function filter($value)
{
if (! is_string($value) && ! is_numeric($value)) {
return $value;
}
return $this->adapter->encrypt($value);
}
}
PK uU^z` src/FilterProviderInterface.phpnu ٘
*/
class Inflector extends AbstractFilter
{
/** @var FilterPluginManager */
protected $pluginManager;
/** @var string */
protected $target;
/** @var bool */
protected $throwTargetExceptionsOn = true;
/** @var string */
protected $targetReplacementIdentifier = ':';
/** @var array */
protected $rules = [];
/**
* @param string|array|Traversable $options Options to set
*/
public function __construct($options = null)
{
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
}
if (! is_array($options)) {
$options = func_get_args();
$temp = [];
if (! empty($options)) {
$temp['target'] = array_shift($options);
}
if (! empty($options)) {
$temp['rules'] = array_shift($options);
}
if (! empty($options)) {
$temp['throwTargetExceptionsOn'] = array_shift($options);
}
if (! empty($options)) {
$temp['targetReplacementIdentifier'] = array_shift($options);
}
$options = $temp;
}
$this->setOptions($options);
}
/**
* Retrieve plugin manager
*
* @return FilterPluginManager
*/
public function getPluginManager()
{
if (! $this->pluginManager instanceof FilterPluginManager) {
$this->setPluginManager(new FilterPluginManager(new ServiceManager()));
}
return $this->pluginManager;
}
/**
* Set plugin manager
*
* @return self
*/
public function setPluginManager(FilterPluginManager $manager)
{
$this->pluginManager = $manager;
return $this;
}
/**
* Set options
*
* @param array|Options|iterable $options
* @return self
*/
public function setOptions($options)
{
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
}
// Set plugin manager
if (array_key_exists('pluginManager', $options)) {
if (is_scalar($options['pluginManager']) && class_exists($options['pluginManager'])) {
$options['pluginManager'] = new $options['pluginManager']();
}
$this->setPluginManager($options['pluginManager']);
}
if (array_key_exists('throwTargetExceptionsOn', $options)) {
$this->setThrowTargetExceptionsOn($options['throwTargetExceptionsOn']);
}
if (array_key_exists('targetReplacementIdentifier', $options)) {
$this->setTargetReplacementIdentifier($options['targetReplacementIdentifier']);
}
if (array_key_exists('target', $options)) {
$this->setTarget($options['target']);
}
if (array_key_exists('rules', $options)) {
$this->addRules($options['rules']);
}
return $this;
}
/**
* Set Whether or not the inflector should throw an exception when a replacement
* identifier is still found within an inflected target.
*
* @param bool $throwTargetExceptionsOn
* @return self
*/
public function setThrowTargetExceptionsOn($throwTargetExceptionsOn)
{
$this->throwTargetExceptionsOn = (bool) $throwTargetExceptionsOn;
return $this;
}
/**
* Will exceptions be thrown?
*
* @return bool
*/
public function isThrowTargetExceptionsOn()
{
return $this->throwTargetExceptionsOn;
}
/**
* Set the Target Replacement Identifier, by default ':'
*
* @param string $targetReplacementIdentifier
* @return self
*/
public function setTargetReplacementIdentifier($targetReplacementIdentifier)
{
if ($targetReplacementIdentifier) {
$this->targetReplacementIdentifier = (string) $targetReplacementIdentifier;
}
return $this;
}
/**
* Get Target Replacement Identifier
*
* @return string
*/
public function getTargetReplacementIdentifier()
{
return $this->targetReplacementIdentifier;
}
/**
* Set a Target
* ex: 'scripts/:controller/:action.:suffix'
*
* @param string $target
* @return self
*/
public function setTarget($target)
{
$this->target = (string) $target;
return $this;
}
/**
* Retrieve target
*
* @return string
*/
public function getTarget()
{
return $this->target;
}
/**
* Set Target Reference
*
* @param string $target
* @return self
*/
public function setTargetReference(&$target)
{
$this->target = &$target;
return $this;
}
/**
* Is the same as calling addRules() with the exception that it
* clears the rules before adding them.
*
* @return self
*/
public function setRules(array $rules)
{
$this->clearRules();
$this->addRules($rules);
return $this;
}
/**
* Multi-call to setting filter rules.
*
* If prefixed with a ":" (colon), a filter rule will be added. If not
* prefixed, a static replacement will be added.
*
* ex:
* array(
* ':controller' => array('CamelCaseToUnderscore', 'StringToLower'),
* ':action' => array('CamelCaseToUnderscore', 'StringToLower'),
* 'suffix' => 'phtml'
* );
*
* @param array $rules
* @return self
*/
public function addRules(array $rules)
{
$keys = array_keys($rules);
foreach ($keys as $spec) {
if ($spec[0] === ':') {
$this->addFilterRule($spec, $rules[$spec]);
} else {
$this->setStaticRule($spec, $rules[$spec]);
}
}
return $this;
}
/**
* Get rules
*
* By default, returns all rules. If a $spec is provided, will return those
* rules if found, false otherwise.
*
* @param string $spec
* @return array|false
*/
public function getRules($spec = null)
{
if (null !== $spec) {
$spec = $this->_normalizeSpec($spec);
if (isset($this->rules[$spec])) {
return $this->rules[$spec];
}
return false;
}
return $this->rules;
}
/**
* Returns a rule set by setFilterRule(), a numeric index must be provided
*
* @param string $spec
* @param int $index
* @return FilterInterface|false
*/
public function getRule($spec, $index)
{
$spec = $this->_normalizeSpec($spec);
if (isset($this->rules[$spec]) && is_array($this->rules[$spec])) {
if (isset($this->rules[$spec][$index])) {
return $this->rules[$spec][$index];
}
}
return false;
}
/**
* Clears the rules currently in the inflector
*
* @return self
*/
public function clearRules()
{
$this->rules = [];
return $this;
}
/**
* Set a filtering rule for a spec. $ruleSet can be a string, Filter object
* or an array of strings or filter objects.
*
* @param string $spec
* @param array|string|FilterInterface $ruleSet
* @return self
*/
public function setFilterRule($spec, $ruleSet)
{
$spec = $this->_normalizeSpec($spec);
$this->rules[$spec] = [];
return $this->addFilterRule($spec, $ruleSet);
}
/**
* Add a filter rule for a spec
*
* @return self
*/
public function addFilterRule(mixed $spec, mixed $ruleSet)
{
$spec = $this->_normalizeSpec($spec);
if (! isset($this->rules[$spec])) {
$this->rules[$spec] = [];
}
if (! is_array($ruleSet)) {
$ruleSet = [$ruleSet];
}
if (is_string($this->rules[$spec])) {
$temp = $this->rules[$spec];
$this->rules[$spec] = [];
$this->rules[$spec][] = $temp;
}
foreach ($ruleSet as $rule) {
$this->rules[$spec][] = $this->_getRule($rule);
}
return $this;
}
/**
* Set a static rule for a spec. This is a single string value
*
* @param string $name
* @param string $value
* @return self
*/
public function setStaticRule($name, $value)
{
$name = $this->_normalizeSpec($name);
$this->rules[$name] = (string) $value;
return $this;
}
/**
* Set Static Rule Reference.
*
* This allows a consuming class to pass a property or variable
* in to be referenced when its time to build the output string from the
* target.
*
* @param string $name
* @return self
*/
public function setStaticRuleReference($name, mixed &$reference)
{
$name = $this->_normalizeSpec($name);
$this->rules[$name] = &$reference;
return $this;
}
/**
* Inflect
*
* @param string|array $source
* @throws Exception\RuntimeException
* @return string
*/
public function filter($source)
{
// clean source
foreach ((array) $source as $sourceName => $sourceValue) {
$source[ltrim($sourceName, ':')] = $sourceValue;
}
$pregQuotedTargetReplacementIdentifier = preg_quote($this->targetReplacementIdentifier, '#');
$processedParts = [];
foreach ($this->rules as $ruleName => $ruleValue) {
if (isset($source[$ruleName])) {
if (is_string($ruleValue)) {
// overriding the set rule
$processedParts['#' . $pregQuotedTargetReplacementIdentifier . $ruleName . '#'] = str_replace(
'\\',
'\\\\',
$source[$ruleName]
);
} elseif (is_array($ruleValue)) {
$processedPart = $source[$ruleName];
foreach ($ruleValue as $ruleFilter) {
$processedPart = $ruleFilter($processedPart);
}
$processedParts['#' . $pregQuotedTargetReplacementIdentifier . $ruleName . '#'] = str_replace(
'\\',
'\\\\',
$processedPart
);
}
} elseif (is_string($ruleValue)) {
$processedParts['#' . $pregQuotedTargetReplacementIdentifier . $ruleName . '#'] = str_replace(
'\\',
'\\\\',
$ruleValue
);
}
}
// all of the values of processedParts would have been str_replace('\\', '\\\\', ..)'d
// to disable preg_replace backreferences
$inflectedTarget = preg_replace(array_keys($processedParts), array_values($processedParts), $this->target);
if (
$this->throwTargetExceptionsOn
&& preg_match('#(?=' . $pregQuotedTargetReplacementIdentifier . '[A-Za-z]{1})#', $inflectedTarget)
) {
throw new Exception\RuntimeException(
'A replacement identifier ' . $this->targetReplacementIdentifier
. ' was found inside the inflected target, perhaps a rule was not satisfied with a target source? '
. 'Unsatisfied inflected target: ' . $inflectedTarget
);
}
return $inflectedTarget;
}
/**
* Normalize spec string
*
* @param string $spec
* @return string
*/
// @codingStandardsIgnoreStart
protected function _normalizeSpec($spec)
{
// @codingStandardsIgnoreEnd
return ltrim((string) $spec, ':&');
}
/**
* Resolve named filters and convert them to filter objects.
*
* @param string $rule
* @return FilterInterface|callable(mixed): mixed
*/
// @codingStandardsIgnoreStart
protected function _getRule($rule)
{
// @codingStandardsIgnoreEnd
if ($rule instanceof FilterInterface) {
return $rule;
}
$rule = (string) $rule;
return $this->getPluginManager()->get($rule);
}
}
PK uU! src/Boolean.phpnu ٘ ,
* casting: bool,
* translations: array,
* }
* @extends AbstractFilter
*/
class Boolean extends AbstractFilter
{
public const TYPE_BOOLEAN = 1;
public const TYPE_INTEGER = 2;
public const TYPE_FLOAT = 4;
public const TYPE_STRING = 8;
public const TYPE_ZERO_STRING = 16;
public const TYPE_EMPTY_ARRAY = 32;
public const TYPE_NULL = 64;
public const TYPE_PHP = 127;
public const TYPE_FALSE_STRING = 128;
public const TYPE_LOCALIZED = 256;
public const TYPE_ALL = 511;
/**
* @deprecated since 2.26 - superseded by self::CONSTANTS
*
* @var array
*/
protected $constants = self::CONSTANTS;
private const CONSTANTS = [
self::TYPE_BOOLEAN => 'boolean',
self::TYPE_INTEGER => 'integer',
self::TYPE_FLOAT => 'float',
self::TYPE_STRING => 'string',
self::TYPE_ZERO_STRING => 'zero',
self::TYPE_EMPTY_ARRAY => 'array',
self::TYPE_NULL => 'null',
self::TYPE_PHP => 'php',
self::TYPE_FALSE_STRING => 'false',
self::TYPE_LOCALIZED => 'localized',
self::TYPE_ALL => 'all',
];
/** @var Options */
protected $options = [
'type' => self::TYPE_PHP,
'casting' => true,
'translations' => [],
];
/**
* @param self::TYPE_*|value-of|list|Options|iterable|null $typeOrOptions
* @param bool $casting
* @param array $translations
*/
public function __construct($typeOrOptions = null, $casting = true, $translations = [])
{
if ($typeOrOptions instanceof Traversable) {
$typeOrOptions = ArrayUtils::iteratorToArray($typeOrOptions);
}
if (
is_array($typeOrOptions) && (
isset($typeOrOptions['type'])
|| isset($typeOrOptions['casting'])
|| isset($typeOrOptions['translations'])
)
) {
$this->setOptions($typeOrOptions);
return;
}
if (is_array($typeOrOptions) || is_int($typeOrOptions) || is_string($typeOrOptions)) {
$this->setType($typeOrOptions);
}
$this->setCasting($casting);
$this->setTranslations($translations);
}
/**
* Set boolean types
*
* @param self::TYPE_*|value-of|list|null $type
* @throws Exception\InvalidArgumentException
* @return self
*/
public function setType($type = null)
{
if (is_array($type)) {
$detected = 0;
foreach ($type as $value) {
if (is_int($value)) {
$detected |= $value;
} elseif (($found = array_search($value, self::CONSTANTS, true)) !== false) {
$detected |= $found;
}
}
$type = $detected;
} elseif (is_string($type) && ($found = array_search($type, self::CONSTANTS, true)) !== false) {
$type = $found;
}
if (! is_int($type) || ($type < 0) || ($type > self::TYPE_ALL)) {
throw new Exception\InvalidArgumentException(sprintf(
'Unknown type value "%s" (%s)',
$type,
gettype($type)
));
}
$this->options['type'] = $type;
return $this;
}
/**
* Returns defined boolean types
*
* @return int-mask-of
*/
public function getType()
{
return $this->options['type'];
}
/**
* Set the working mode
*
* @param bool $flag When true this filter works like cast
* When false it recognises only true and false
* and all other values are returned as is
* @return self
*/
public function setCasting($flag = true)
{
$this->options['casting'] = (bool) $flag;
return $this;
}
/**
* Returns the casting option
*
* @return bool
*/
public function getCasting()
{
return $this->options['casting'];
}
/**
* @param array|Traversable $translations
* @throws Exception\InvalidArgumentException
* @return self
*/
public function setTranslations($translations)
{
if (! is_array($translations) && ! $translations instanceof Traversable) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" expects an array or Traversable; received "%s"',
__METHOD__,
get_debug_type($translations)
));
}
foreach ($translations as $message => $flag) {
$this->options['translations'][$message] = (bool) $flag;
}
return $this;
}
/**
* @return array
*/
public function getTranslations()
{
return $this->options['translations'];
}
/**
* Defined by Laminas\Filter\FilterInterface
*
* Returns a boolean representation of $value
*
* @param null|array|bool|float|int|string $value
* @return bool|mixed
*/
public function filter($value)
{
$type = $this->getType();
$casting = $this->getCasting();
// LOCALIZED
if ($type & self::TYPE_LOCALIZED) {
if (is_string($value)) {
if (isset($this->options['translations'][$value])) {
return (bool) $this->options['translations'][$value];
}
}
}
// FALSE_STRING ('false')
if ($type & self::TYPE_FALSE_STRING) {
if (is_string($value) && strtolower($value) === 'false') {
return false;
}
if (! $casting && is_string($value) && strtolower($value) === 'true') {
return true;
}
}
// NULL (null)
if ($type & self::TYPE_NULL) {
if ($value === null) {
return false;
}
}
// EMPTY_ARRAY (array())
if ($type & self::TYPE_EMPTY_ARRAY) {
if (is_array($value) && $value === []) {
return false;
}
}
// ZERO_STRING ('0')
if ($type & self::TYPE_ZERO_STRING) {
if (is_string($value) && $value === '0') {
return false;
}
if (! $casting && is_string($value) && $value === '1') {
return true;
}
}
// STRING ('')
if ($type & self::TYPE_STRING) {
if (is_string($value) && $value === '') {
return false;
}
}
// FLOAT (0.0)
if ($type & self::TYPE_FLOAT) {
if (is_float($value) && $value === 0.0) {
return false;
}
if (! $casting && is_float($value) && $value === 1.0) {
return true;
}
}
// INTEGER (0)
if ($type & self::TYPE_INTEGER) {
if (is_int($value) && $value === 0) {
return false;
}
if (! $casting && is_int($value) && $value === 1) {
return true;
}
}
// BOOLEAN (false)
if ($type & self::TYPE_BOOLEAN) {
if (is_bool($value)) {
return $value;
}
}
if ($casting) {
return true;
}
return $value;
}
}
PK uU֓ src/AbstractUnicode.phpnu ٘
*/
abstract class AbstractUnicode extends AbstractFilter
{
/**
* Set the input encoding for the given string
*
* @param string|null $encoding
* @return self
* @throws Exception\InvalidArgumentException
* @throws Exception\ExtensionNotLoadedException
*/
public function setEncoding($encoding = null)
{
if ($encoding !== null) {
$encoding = strtolower($encoding);
$mbEncodings = array_map('strtolower', mb_list_encodings());
if (! in_array($encoding, $mbEncodings, true)) {
throw new Exception\InvalidArgumentException(sprintf(
"Encoding '%s' is not supported by mbstring extension",
$encoding
));
}
}
$this->options['encoding'] = $encoding;
return $this;
}
/**
* Returns the set encoding
*
* @return string
*/
public function getEncoding()
{
$encoding = $this->options['encoding'] ?? null;
assert($encoding === null || is_string($encoding));
if ($encoding === null) {
$encoding = mb_internal_encoding();
assert(is_string($encoding));
$this->options['encoding'] = $encoding;
}
return $encoding;
}
}
PK uUcģ src/AbstractFilter.phpnu ٘ $value) {
$setter = is_string($key)
? 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)))
: null;
if ($setter && method_exists($this, $setter)) {
$this->{$setter}($value);
} elseif (is_string($key) && array_key_exists($key, $this->options)) {
$this->options[$key] = $value;
} else {
throw new Exception\InvalidArgumentException(
sprintf(
'The option "%s" does not have a matching %s setter method or options[%s] array key',
$key,
(string) $setter,
$key
)
);
}
}
return $this;
}
/**
* Retrieve options representing object state
*
* @return TOptions
*/
public function getOptions()
{
return $this->options;
}
/**
* Invoke filter as a command
*
* Proxies to {@link filter()}
*
* @throws Exception\ExceptionInterface If filtering $value is impossible.
* @return mixed
*/
public function __invoke(mixed $value)
{
return $this->filter($value);
}
/**
* @return bool
*/
protected static function isOptions(mixed $options)
{
return is_iterable($options);
}
/**
* @internal
*
* @return mixed
*/
protected static function applyFilterOnlyToStringableValuesAndStringableArrayValues(
mixed $value,
callable $callback
) {
if (! is_array($value)) {
if (! is_scalar($value)) {
return $value;
}
return $callback((string) $value);
}
return $callback(array_map(static fn($item) => is_scalar($item) ? (string) $item : $item, $value));
}
}
PK uUIi~ ~ src/Decompress.phpnu ٘ filter($value);
}
/**
* Defined by FilterInterface
*
* Decompresses the content $value with the defined settings
*
* @param string $value Content to decompress
* @return string The decompressed content
*/
public function filter($value)
{
if (! is_string($value) && $value !== null) {
return $value;
}
return $this->getAdapter()->decompress($value);
}
}
PK uU . src/Compress/CompressionAlgorithmInterface.phpnu ٘
*/
class Zip extends AbstractCompressionAlgorithm
{
/**
* Compression Options
* array(
* 'archive' => Archive to use
* 'password' => Password to use
* 'target' => Target to write the files to
* )
*
* @var Options
*/
protected $options = [
'archive' => null,
'target' => null,
];
/**
* @param null|Options|iterable $options (Optional) Options to set
* @throws Exception\ExtensionNotLoadedException If zip extension not loaded.
*/
public function __construct($options = null)
{
if (! extension_loaded('zip')) {
throw new Exception\ExtensionNotLoadedException('This filter needs the zip extension');
}
parent::__construct($options);
}
/**
* Returns the set archive
*
* @return string|null
*/
public function getArchive()
{
return $this->options['archive'];
}
/**
* Sets the archive to use for de-/compression
*
* @param string $archive Archive to use
* @return self
*/
public function setArchive($archive)
{
$archive = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, (string) $archive);
$this->options['archive'] = $archive;
return $this;
}
/**
* Returns the set targetpath
*
* @return string|null
*/
public function getTarget()
{
return $this->options['target'];
}
/**
* Sets the target to use
*
* @param string $target
* @throws Exception\InvalidArgumentException
* @return self
*/
public function setTarget($target)
{
if (! file_exists(dirname($target))) {
throw new Exception\InvalidArgumentException("The directory '$target' does not exist");
}
$target = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, (string) $target);
$this->options['target'] = $target;
return $this;
}
/**
* Compresses the given content
*
* @param string $content
* @return string Compressed archive
* @throws Exception\RuntimeException If unable to open zip archive, or error during compression.
*/
public function compress($content)
{
$zip = new ZipArchive();
$res = $zip->open($this->getArchive(), ZipArchive::CREATE | ZipArchive::OVERWRITE);
if ($res !== true) {
throw new Exception\RuntimeException($this->errorString($res));
}
if (file_exists($content)) {
$content = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, realpath($content));
$basename = substr($content, strrpos($content, DIRECTORY_SEPARATOR) + 1);
if (is_dir($content)) {
$index = strrpos($content, DIRECTORY_SEPARATOR) + 1;
$content .= DIRECTORY_SEPARATOR;
$stack = [$content];
while (! empty($stack)) {
$current = array_pop($stack);
$files = [];
$dir = dir($current);
while (false !== ($node = $dir->read())) {
if ($node === '.' || $node === '..') {
continue;
}
if (is_dir($current . $node)) {
$stack[] = $current . $node . DIRECTORY_SEPARATOR;
}
if (is_file($current . $node)) {
$files[] = $node;
}
}
$local = substr($current, $index);
$zip->addEmptyDir(substr($local, 0, -1));
foreach ($files as $file) {
$zip->addFile($current . $file, $local . $file);
if ($res !== true) {
throw new Exception\RuntimeException($this->errorString($res));
}
}
}
} else {
$res = $zip->addFile($content, $basename);
if ($res !== true) {
throw new Exception\RuntimeException($this->errorString($res));
}
}
} else {
$file = $this->getTarget();
if (is_string($file) && ! is_dir($file)) {
$file = basename($file);
} else {
$file = 'zip.tmp';
}
$res = $zip->addFromString($file, $content);
if ($res !== true) {
throw new Exception\RuntimeException($this->errorString($res));
}
}
$zip->close();
return $this->options['archive'];
}
/**
* Decompresses the given content
*
* @param string $content
* @return string
* @throws Exception\RuntimeException If archive file not found, target directory not found,
* or error during decompression.
*/
public function decompress($content)
{
$archive = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, realpath($content));
if (empty($archive) || ! file_exists($archive)) {
throw new Exception\RuntimeException('ZIP Archive not found');
}
$zip = new ZipArchive();
$res = $zip->open($archive);
$target = $this->getTarget();
if (! empty($target) && ! is_dir($target)) {
$target = dirname($target);
}
if (! empty($target)) {
$target = rtrim($target, '/\\') . DIRECTORY_SEPARATOR;
}
if (empty($target) || ! is_dir($target)) {
throw new Exception\RuntimeException('No target for ZIP decompression set');
}
if ($res !== true) {
throw new Exception\RuntimeException($this->errorString($res));
}
$res = $zip->extractTo($target);
if ($res !== true) {
throw new Exception\RuntimeException($this->errorString($res));
}
$zip->close();
return $target;
}
/**
* Returns the proper string based on the given error constant
*
* @param string $error
* @return string
*/
public function errorString($error)
{
switch ($error) {
case ZipArchive::ER_MULTIDISK:
return 'Multidisk ZIP Archives not supported';
case ZipArchive::ER_RENAME:
return 'Failed to rename the temporary file for ZIP';
case ZipArchive::ER_CLOSE:
return 'Failed to close the ZIP Archive';
case ZipArchive::ER_SEEK:
return 'Failure while seeking the ZIP Archive';
case ZipArchive::ER_READ:
return 'Failure while reading the ZIP Archive';
case ZipArchive::ER_WRITE:
return 'Failure while writing the ZIP Archive';
case ZipArchive::ER_CRC:
return 'CRC failure within the ZIP Archive';
case ZipArchive::ER_ZIPCLOSED:
return 'ZIP Archive already closed';
case ZipArchive::ER_NOENT:
return 'No such file within the ZIP Archive';
case ZipArchive::ER_EXISTS:
return 'ZIP Archive already exists';
case ZipArchive::ER_OPEN:
return 'Can not open ZIP Archive';
case ZipArchive::ER_TMPOPEN:
return 'Failure creating temporary ZIP Archive';
case ZipArchive::ER_ZLIB:
return 'ZLib Problem';
case ZipArchive::ER_MEMORY:
return 'Memory allocation problem while working on a ZIP Archive';
case ZipArchive::ER_CHANGED:
return 'ZIP Entry has been changed';
case ZipArchive::ER_COMPNOTSUPP:
return 'Compression method not supported within ZLib';
case ZipArchive::ER_EOF:
return 'Premature EOF within ZIP Archive';
case ZipArchive::ER_INVAL:
return 'Invalid argument for ZLIB';
case ZipArchive::ER_NOZIP:
return 'Given file is no zip archive';
case ZipArchive::ER_INTERNAL:
return 'Internal error while working on a ZIP Archive';
case ZipArchive::ER_INCONS:
return 'Inconsistent ZIP archive';
case ZipArchive::ER_REMOVE:
return 'Can not remove ZIP Archive';
case ZipArchive::ER_DELETED:
return 'ZIP Entry has been deleted';
default:
return 'Unknown error within ZIP Archive';
}
}
/**
* Returns the adapter name
*
* @return string
*/
public function toString()
{
return 'Zip';
}
}
PK uU׃j - src/Compress/AbstractCompressionAlgorithm.phpnu ٘ setOptions($options);
}
}
/**
* Returns one or all set options
*
* @param string|null $option Option to return
* @return mixed
* @psalm-return ($option is null ? TOptions : mixed)
*/
public function getOptions($option = null)
{
if ($option === null) {
return $this->options;
}
if (! isset($this->options[$option])) {
return null;
}
return $this->options[$option];
}
/**
* Sets all or one option
*
* @return self
*/
public function setOptions(array $options)
{
foreach ($options as $key => $option) {
$method = 'set' . $key;
if (method_exists($this, $method)) {
$this->$method($option);
}
}
return $this;
}
}
PK uUrd src/Compress/Rar.phpnu ٘
*/
class Rar extends AbstractCompressionAlgorithm
{
/**
* Compression Options
* array(
* 'callback' => Callback for compression
* 'archive' => Archive to use
* 'password' => Password to use
* 'target' => Target to write the files to
* )
*
* @var Options
*/
protected $options = [
'callback' => null,
'archive' => null,
'password' => null,
'target' => '.',
];
/**
* @param Options|null $options (Optional) Options to set
* @throws Exception\ExtensionNotLoadedException If rar extension not loaded.
*/
public function __construct($options = null)
{
if (! extension_loaded('rar')) {
throw new Exception\ExtensionNotLoadedException('This filter needs the rar extension');
}
parent::__construct($options);
}
/**
* Returns the set callback for compression
*
* @return callable|null
*/
public function getCallback()
{
return $this->options['callback'];
}
/**
* Sets the callback to use
*
* @param callable $callback
* @return self
* @throws Exception\InvalidArgumentException If invalid callback provided.
*/
public function setCallback($callback)
{
if (! is_callable($callback)) {
throw new Exception\InvalidArgumentException('Invalid callback provided');
}
$this->options['callback'] = $callback;
return $this;
}
/**
* Returns the set archive
*
* @return string|null
*/
public function getArchive()
{
return $this->options['archive'];
}
/**
* Sets the archive to use for de-/compression
*
* @param string $archive Archive to use
* @return self
*/
public function setArchive($archive)
{
$archive = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $archive);
$this->options['archive'] = (string) $archive;
return $this;
}
/**
* Returns the set password
*
* @return string|null
*/
public function getPassword()
{
return $this->options['password'];
}
/**
* Sets the password to use
*
* @param string $password
* @return self
*/
public function setPassword($password)
{
$this->options['password'] = (string) $password;
return $this;
}
/**
* Returns the set targetpath
*
* @return string
*/
public function getTarget()
{
return $this->options['target'];
}
/**
* Sets the targetpath to use
*
* @param string $target
* @return self
* @throws Exception\InvalidArgumentException If specified target directory does not exist.
*/
public function setTarget($target)
{
if (! file_exists(dirname($target))) {
throw new Exception\InvalidArgumentException("The directory '$target' does not exist");
}
$target = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, (string) $target);
$this->options['target'] = $target;
return $this;
}
/**
* Compresses the given content
*
* @param string|array $content
* @return string|null
* @throws Exception\RuntimeException If no callback available, or error during compression.
*/
public function compress($content)
{
$callback = $this->getCallback();
if ($callback === null) {
throw new Exception\RuntimeException('No compression callback available');
}
$options = $this->getOptions();
unset($options['callback']);
$result = $callback($options, $content);
if ($result !== true) {
throw new Exception\RuntimeException('Error compressing the RAR Archive');
}
return $this->getArchive();
}
/**
* Decompresses the given content
*
* @param string $content
* @return bool
* @throws Exception\RuntimeException If archive not found, cannot be opened,
* or error during decompression.
*/
public function decompress($content)
{
if (! file_exists($content)) {
throw new Exception\RuntimeException('RAR Archive not found');
}
$archive = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, realpath($content));
$password = $this->getPassword();
if ($password !== null) {
$archive = rar_open($archive, $password);
} else {
$archive = rar_open($archive);
}
if (! $archive) {
throw new Exception\RuntimeException('Error opening the RAR Archive');
}
$target = $this->getTarget();
if (! is_dir($target)) {
$target = dirname($target);
}
$filelist = rar_list($archive);
if (! $filelist) {
throw new Exception\RuntimeException("Error reading the RAR Archive");
}
foreach ($filelist as $file) {
$file->extract($target);
}
rar_close($archive);
return true;
}
/**
* Returns the adapter name
*
* @return string
*/
public function toString()
{
return 'Rar';
}
}
PK uUNCA src/Compress/Snappy.phpnu ٘
*/
class Gz extends AbstractCompressionAlgorithm
{
/**
* Compression Options
* array(
* 'level' => Compression level 0-9
* 'mode' => Compression mode, can be 'compress', 'deflate'
* 'archive' => Archive to use
* )
*
* @var Options
*/
protected $options = [
'level' => 9,
'mode' => 'compress',
'archive' => null,
];
/**
* @param null|Options|iterable $options (Optional) Options to set
* @throws Exception\ExtensionNotLoadedException If zlib extension not loaded.
*/
public function __construct($options = null)
{
if (! extension_loaded('zlib')) {
throw new Exception\ExtensionNotLoadedException('This filter needs the zlib extension');
}
parent::__construct($options);
}
/**
* Returns the set compression level
*
* @return int
*/
public function getLevel()
{
return $this->options['level'];
}
/**
* Sets a new compression level
*
* @param int $level
* @throws Exception\InvalidArgumentException
* @return self
*/
public function setLevel($level)
{
if (($level < 0) || ($level > 9)) {
throw new Exception\InvalidArgumentException('Level must be between 0 and 9');
}
$this->options['level'] = (int) $level;
return $this;
}
/**
* Returns the set compression mode
*
* @return string
*/
public function getMode()
{
return $this->options['mode'];
}
/**
* Sets a new compression mode
*
* @param string $mode Supported are 'compress', 'deflate' and 'file'
* @return self
* @throws Exception\InvalidArgumentException For invalid $mode value.
*/
public function setMode($mode)
{
if ($mode !== 'compress' && $mode !== 'deflate') {
throw new Exception\InvalidArgumentException('Given compression mode not supported');
}
$this->options['mode'] = $mode;
return $this;
}
/**
* Returns the set archive
*
* @return string|null
*/
public function getArchive()
{
return $this->options['archive'];
}
/**
* Sets the archive to use for de-/compression
*
* @param string $archive Archive to use
* @return self
*/
public function setArchive($archive)
{
$this->options['archive'] = (string) $archive;
return $this;
}
/**
* Compresses the given content
*
* @param string $content
* @return string
* @throws Exception\RuntimeException If unable to open archive or error during decompression.
*/
public function compress($content)
{
$archive = $this->getArchive();
if (is_string($archive) && $archive !== '') {
$file = gzopen($archive, 'w' . $this->getLevel());
if (! $file) {
throw new Exception\RuntimeException("Error opening the archive '" . $archive . "'");
}
gzwrite($file, $content);
gzclose($file);
$compressed = true;
} elseif ($this->options['mode'] === 'deflate') {
$compressed = gzdeflate($content, $this->getLevel());
} else {
$compressed = gzcompress($content, $this->getLevel());
}
if (! $compressed) {
throw new Exception\RuntimeException('Error during compression');
}
return $compressed;
}
/**
* Decompresses the given content
*
* @param string $content
* @return string
* @throws Exception\RuntimeException If unable to open archive or error during decompression.
*/
public function decompress($content)
{
$archive = $this->getArchive();
$mode = $this->getMode();
//check if there are null byte characters before doing a file_exists check
if (null !== $content && ! str_contains($content, "\0") && file_exists($content)) {
$archive = $content;
}
if (null !== $archive && file_exists($archive)) {
$handler = fopen($archive, 'rb');
if (! $handler) {
throw new Exception\RuntimeException("Error opening the archive '" . $archive . "'");
}
fseek($handler, -4, SEEK_END);
$packet = fread($handler, 4);
$bytes = unpack('V', $packet);
$size = end($bytes);
fclose($handler);
$file = gzopen($archive, 'r');
$compressed = gzread($file, $size);
gzclose($file);
} elseif ($mode === 'deflate' && null !== $content) {
$compressed = gzinflate($content);
} elseif (null !== $content) {
$compressed = gzuncompress($content);
} else {
$compressed = false;
}
if ($compressed === false) {
throw new Exception\RuntimeException('Error during decompression');
}
return $compressed;
}
/**
* Returns the adapter name
*
* @return string
*/
public function toString()
{
return 'Gz';
}
}
PK uU0 src/Compress/Tar.phpnu ٘
*/
class Tar extends AbstractCompressionAlgorithm
{
/**
* Compression Options
* array(
* 'archive' => Archive to use
* 'target' => Target to write the files to
* )
*
* @var Options
*/
protected $options = [
'archive' => null,
'target' => '.',
'mode' => null,
];
/**
* @param Options $options (Optional) Options to set
* @throws Exception\ExtensionNotLoadedException If Archive_Tar component not available.
*/
public function __construct($options = null)
{
if (! class_exists('Archive_Tar')) {
throw new Exception\ExtensionNotLoadedException(
'This filter needs PEAR\'s Archive_Tar component. '
. 'Ensure loading Archive_Tar (registering autoload or require_once)'
);
}
parent::__construct($options);
}
/**
* Returns the set archive
*
* @return string|null
*/
public function getArchive()
{
return $this->options['archive'] ?? null;
}
/**
* Sets the archive to use for de-/compression
*
* @param string $archive Archive to use
* @return self
*/
public function setArchive($archive)
{
$archive = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, (string) $archive);
$this->options['archive'] = $archive;
return $this;
}
/**
* Returns the set target path
*
* @return string
*/
public function getTarget()
{
return $this->options['target'];
}
/**
* Sets the target path to use
*
* @param string $target
* @return self
* @throws Exception\InvalidArgumentException If target path does not exist.
*/
public function setTarget($target)
{
if (! file_exists(dirname($target))) {
throw new Exception\InvalidArgumentException("The directory '$target' does not exist");
}
$target = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, (string) $target);
$this->options['target'] = $target;
return $this;
}
/**
* Returns the set compression mode
*
* @return string|null
*/
public function getMode()
{
return $this->options['mode'] ?? null;
}
/**
* Compression mode to use
*
* Either Gz or Bz2.
*
* @param string $mode
* @return self
* @throws Exception\InvalidArgumentException For invalid $mode values.
* @throws Exception\ExtensionNotLoadedException If bz2 mode selected but extension not loaded.
* @throws Exception\ExtensionNotLoadedException If gz mode selected but extension not loaded.
*/
public function setMode($mode)
{
$mode = strtolower($mode);
if ($mode !== 'bz2' && $mode !== 'gz') {
throw new Exception\InvalidArgumentException("The mode '$mode' is unknown");
}
if ($mode === 'bz2' && ! extension_loaded('bz2')) {
throw new Exception\ExtensionNotLoadedException('This mode needs the bz2 extension');
}
if ($mode === 'gz' && ! extension_loaded('zlib')) {
throw new Exception\ExtensionNotLoadedException('This mode needs the zlib extension');
}
$this->options['mode'] = $mode;
return $this;
}
/**
* Compresses the given content
*
* @param string $content
* @return string
* @throws Exception\RuntimeException If unable to create temporary file.
* @throws Exception\RuntimeException If unable to create archive.
*/
public function compress($content)
{
$archive = new Archive_Tar($this->getArchive(), $this->getMode());
if (! file_exists($content)) {
$file = $this->getTarget();
if (is_dir($file)) {
$file .= DIRECTORY_SEPARATOR . 'tar.tmp';
}
$result = file_put_contents($file, $content);
if ($result === false) {
throw new Exception\RuntimeException('Error creating the temporary file');
}
$content = $file;
}
if (is_dir($content)) {
// collect all file infos
foreach (
new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($content, RecursiveDirectoryIterator::KEY_AS_PATHNAME),
RecursiveIteratorIterator::SELF_FIRST
) as $directory => $info
) {
if ($info->isFile()) {
$file[] = $directory;
}
}
$content = $file;
}
$result = $archive->create($content);
if ($result === false) {
throw new Exception\RuntimeException('Error creating the Tar archive');
}
return $this->getArchive();
}
/**
* Decompresses the given content
*
* @param string $content
* @return string
* @throws Exception\RuntimeException If unable to find archive.
* @throws Exception\RuntimeException If error occurs decompressing archive.
*/
public function decompress($content)
{
$archive = $this->getArchive();
if (file_exists($content)) {
$archive = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, realpath($content));
} elseif (empty($archive) || ! file_exists($archive)) {
throw new Exception\RuntimeException('Tar Archive not found');
}
$archive = new Archive_Tar($archive, $this->getMode());
$target = $this->getTarget();
if (! is_dir($target)) {
$target = dirname($target) . DIRECTORY_SEPARATOR;
}
$result = $archive->extract($target);
if ($result === false) {
throw new Exception\RuntimeException('Error while extracting the Tar archive');
}
return $target;
}
/**
* Returns the adapter name
*
* @return string
*/
public function toString()
{
return 'Tar';
}
}
PK uU/u src/Compress/Lzf.phpnu ٘
*/
class Bz2 extends AbstractCompressionAlgorithm
{
/**
* Compression Options
* array(
* 'blocksize' => Blocksize to use from 0-9
* 'archive' => Archive to use
* )
*
* @var Options
*/
protected $options = [
'blocksize' => 4,
'archive' => null,
];
/**
* @param null|Options|iterable $options (Optional) Options to set
* @throws Exception\ExtensionNotLoadedException If bz2 extension not loaded.
*/
public function __construct($options = null)
{
if (! extension_loaded('bz2')) {
throw new Exception\ExtensionNotLoadedException('This filter needs the bz2 extension');
}
parent::__construct($options);
}
/**
* Returns the set blocksize
*
* @return int
*/
public function getBlocksize()
{
return $this->options['blocksize'];
}
/**
* Sets a new blocksize
*
* @param int $blocksize
* @throws Exception\InvalidArgumentException
* @return self
*/
public function setBlocksize($blocksize)
{
if (($blocksize < 0) || ($blocksize > 9)) {
throw new Exception\InvalidArgumentException('Blocksize must be between 0 and 9');
}
$this->options['blocksize'] = (int) $blocksize;
return $this;
}
/**
* Returns the set archive
*
* @return string|null
*/
public function getArchive()
{
return $this->options['archive'];
}
/**
* Sets the archive to use for de-/compression
*
* @param string $archive Archive to use
* @return self
*/
public function setArchive($archive)
{
$this->options['archive'] = (string) $archive;
return $this;
}
/**
* Compresses the given content
*
* @param string $content
* @return string
* @throws Exception\RuntimeException
*/
public function compress($content)
{
$archive = $this->getArchive();
if (! empty($archive)) {
$file = bzopen($archive, 'w');
if (! $file) {
throw new Exception\RuntimeException("Error opening the archive '" . $archive . "'");
}
bzwrite($file, $content);
bzclose($file);
$compressed = true;
} else {
$compressed = bzcompress($content, $this->getBlocksize());
}
if (is_int($compressed)) {
throw new Exception\RuntimeException('Error during compression');
}
return $compressed;
}
/**
* Decompresses the given content
*
* @param string $content
* @return string
* @throws Exception\RuntimeException
*/
public function decompress($content)
{
$archive = $this->getArchive();
//check if there are null byte characters before doing a file_exists check
if (null !== $content && ! str_contains($content, "\0") && file_exists($content)) {
$archive = $content;
}
if (null !== $archive && file_exists($archive)) {
$file = bzopen($archive, 'r');
if (! $file) {
throw new Exception\RuntimeException("Error opening the archive '" . $content . "'");
}
$compressed = bzread($file);
bzclose($file);
} elseif (null !== $content) {
$compressed = bzdecompress($content);
} else {
// without strict types, bzdecompress(null) returns an empty string
// we need to simulate this behaviour to prevent a BC break!
$compressed = '';
}
if (is_int($compressed)) {
throw new Exception\RuntimeException('Error during decompression');
}
return $compressed;
}
/**
* Returns the adapter name
*
* @return string
*/
public function toString()
{
return 'Bz2';
}
}
PK uU~k3 src/ConfigProvider.phpnu ٘
*/
public function __invoke()
{
return [
'dependencies' => $this->getDependencyConfig(),
];
}
/**
* Return dependency mappings for this component.
*
* @return ServiceManagerConfigurationType
*/
public function getDependencyConfig()
{
return [
'aliases' => [
'FilterManager' => FilterPluginManager::class,
// Legacy Zend Framework aliases
'Zend\Filter\FilterPluginManager' => FilterPluginManager::class,
],
'factories' => [
FilterPluginManager::class => FilterPluginManagerFactory::class,
],
];
}
}
PK uUAU^ E E src/ToFloat.phpnu ٘ $provider->getDependencyConfig(),
];
}
/**
* Register a specification for the FilterManager with the ServiceListener.
*
* @param ModuleManager $moduleManager
* @return void
*/
public function init($moduleManager)
{
$event = $moduleManager->getEvent();
$container = $event->getParam('ServiceManager');
$serviceListener = $container->get('ServiceListener');
$serviceListener->addServiceManager(
'FilterManager',
'filters',
FilterProviderInterface::class,
'getFilterConfig'
);
}
}
PK uUr_E E
mkdocs.ymlnu ٘ docs_dir: docs/book
site_dir: docs/html
nav:
- Home: index.md
- Introduction: intro.md
- Reference:
- 'Standard Filters': standard-filters.md
- 'Word Filters': word.md
- 'File Filters': file.md
- 'Filter Chains': filter-chains.md
- 'String Inflection': inflector.md
- 'Static Filter': static-filter.md
- 'Writing Filters': writing-filters.md
site_name: laminas-filter
site_description: "Programmatically filter and normalize data and files."
repo_url: 'https://github.com/laminas/laminas-filter'
extra:
project: Components
PK uU0J .github/workflows/docs-build.ymlnu ٘ name: docs-build
on:
release:
types: [published]
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 }}
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
PK uU@ , .github/workflows/continuous-integration.ymlnu ٘ name: "Continuous Integration"
on:
pull_request:
push:
branches:
tags:
jobs:
ci:
uses: laminas/workflow-continuous-integration/.github/workflows/continuous-integration.yml@1.x
PK uU *ܾ 1 .github/workflows/release-on-milestone-closed.ymlnu ٘ name: "Automatic Releases"
on:
milestone:
types:
- "closed"
jobs:
release:
uses: laminas/workflow-automatic-releases/.github/workflows/release-on-milestone-closed.yml@1.x
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
ORGANIZATION_ADMIN_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
PK uU]p p .gitattributesnu ٘ /.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/docs/ export-ignore
/mkdocs.yml export-ignore
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
/composer.lock export-ignore
/renovate.json export-ignore
/psalm.xml export-ignore
/psalm-baseline.xml export-ignore
/test/ export-ignore
/.laminas-ci.json export-ignore
/.laminas-ci/
PK uUz!) test/DataUnitFormatterTest.phpnu ٘ DataUnitFormatterFilter::MODE_DECIMAL,
'unit' => 'B',
]);
self::assertSame($expected, $filter->filter($value));
}
/**
* @dataProvider binaryBytesTestProvider
*/
public function testBinaryBytes(float $value, string $expected): void
{
$filter = new DataUnitFormatterFilter([
'mode' => DataUnitFormatterFilter::MODE_BINARY,
'unit' => 'B',
]);
self::assertSame($expected, $filter->filter($value));
}
public function testPrecision(): void
{
$filter = new DataUnitFormatterFilter([
'unit' => 'B',
'precision' => 3,
]);
self::assertSame('1.500 kB', $filter->filter(1500));
}
public function testCustomPrefixes(): void
{
$filter = new DataUnitFormatterFilter([
'unit' => 'B',
'prefixes' => ['', 'kilos'],
]);
self::assertSame('1.50 kilosB', $filter->filter(1500));
}
public function testSettingNoOptions(): void
{
$this->expectException(Exception\InvalidArgumentException::class);
new DataUnitFormatterFilter();
}
public function testSettingNoUnit(): void
{
$this->expectException(Exception\InvalidArgumentException::class);
new DataUnitFormatterFilter([]);
}
public function testSettingFalseMode(): void
{
$this->expectException(Exception\InvalidArgumentException::class);
new DataUnitFormatterFilter([
'unit' => 'B',
'mode' => 'invalid',
]);
}
/** @return list */
public static function decimalBytesTestProvider(): array
{
return [
[0, '0 B'],
[1, '1.00 B'],
[1000 ** 1, '1.00 kB'],
[1500 ** 1, '1.50 kB'],
[1000 ** 2, '1.00 MB'],
[1000 ** 3, '1.00 GB'],
[1000 ** 4, '1.00 TB'],
[1000 ** 5, '1.00 PB'],
[1000 ** 6, '1.00 EB'],
[1000 ** 7, '1.00 ZB'],
[1000 ** 8, '1.00 YB'],
[1000 ** 9, 1000 ** 9 . ' B'],
];
}
/** @return list */
public static function binaryBytesTestProvider(): array
{
return [
[0, '0 B'],
[1, '1.00 B'],
[1024 ** 1, '1.00 KiB'],
[1536 ** 1, '1.50 KiB'],
[1024 ** 2, '1.00 MiB'],
[1024 ** 3, '1.00 GiB'],
[1024 ** 4, '1.00 TiB'],
[1024 ** 5, '1.00 PiB'],
[1024 ** 6, '1.00 EiB'],
[1024 ** 7, '1.00 ZiB'],
[1024 ** 8, '1.00 YiB'],
[1024 ** 9, 1024 ** 9 . ' B'],
];
}
}
PK uU )Ⰶ test/CompressTest.phpnu ٘ tmpDir = sprintf('%s/%s', sys_get_temp_dir(), uniqid('laminasfilter'));
mkdir($this->tmpDir, 0775, true);
}
public function tearDown(): void
{
if (is_dir($this->tmpDir)) {
foreach ($this->returnFilterType() as $parameters) {
if (file_exists($this->tmpDir . '/compressed.' . $parameters[0])) {
unlink($this->tmpDir . '/compressed.' . $parameters[0]);
}
}
rmdir($this->tmpDir);
}
}
/** @return iterable */
public function returnFilterType(): iterable
{
if (extension_loaded('bz2')) {
yield ['bz2'];
}
if (extension_loaded('zlib')) {
yield ['gz'];
}
}
/**
* Basic usage
*
* @dataProvider returnFilterType
*/
public function testBasicUsage(string $filterType): void
{
$filter = new CompressFilter($filterType);
$text = 'compress me';
$compressed = $filter($text);
self::assertNotEquals($text, $compressed);
$decompressed = $filter->decompress($compressed);
self::assertSame($text, $decompressed);
}
/**
* Setting Options
*
* @dataProvider returnFilterType
*/
public function testGetSetAdapterOptionsInConstructor(string $filterType): void
{
$filter = new CompressFilter([
'adapter' => $filterType,
'options' => [
'archive' => 'test.txt',
],
]);
self::assertSame(
['archive' => 'test.txt'],
$filter->getAdapterOptions()
);
$adapter = $filter->getAdapter();
self::assertSame('test.txt', $adapter->getArchive());
}
/**
* Setting Options through constructor
*
* @dataProvider returnFilterType
*/
public function testGetSetAdapterOptions(string $filterType): void
{
$filter = new CompressFilter($filterType);
$filter->setAdapterOptions([
'archive' => 'test.txt',
]);
self::assertSame(
['archive' => 'test.txt'],
$filter->getAdapterOptions()
);
$adapter = $filter->getAdapter();
self::assertSame('test.txt', $adapter->getArchive());
}
/**
* Setting Blocksize (works only for bz2)
*/
public function testGetSetBlocksize(): void
{
if (! extension_loaded('bz2')) {
self::markTestSkipped('Extension bz2 is required for this test');
}
$filter = new CompressFilter('bz2');
self::assertSame(4, $filter->getBlocksize());
$filter->setBlocksize(6);
self::assertSame(6, $filter->getOptions('blocksize'));
$this->expectException(Exception\InvalidArgumentException::class);
$this->expectExceptionMessage('must be between');
$filter->setBlocksize(15);
}
/**
* Setting Archive
*
* @dataProvider returnFilterType
*/
public function testGetSetArchive(string $filterType): void
{
$filter = new CompressFilter($filterType);
self::assertSame(null, $filter->getArchive());
$filter->setArchive('Testfile.txt');
self::assertSame('Testfile.txt', $filter->getArchive());
self::assertSame('Testfile.txt', $filter->getOptions('archive'));
}
/**
* Setting Archive
*
* @dataProvider returnFilterType
*/
public function testCompressToFile(string $filterType): void
{
$filter = new CompressFilter($filterType);
$archive = $this->tmpDir . '/compressed.' . $filterType;
$filter->setArchive($archive);
$content = $filter('compress me');
self::assertTrue($content);
$filter2 = new CompressFilter($filterType);
$content2 = $filter2->decompress($archive);
self::assertSame('compress me', $content2);
$filter3 = new CompressFilter($filterType);
$filter3->setArchive($archive);
$content3 = $filter3->decompress(null);
self::assertSame('compress me', $content3);
}
/**
* testing toString
*
* @dataProvider returnFilterType
*/
public function testToString(string $filterType): void
{
$filter = new CompressFilter($filterType);
self::assertEqualsIgnoringCase($filterType, $filter->toString());
}
/**
* testing getAdapter
*
* @dataProvider returnFilterType
*/
public function testGetAdapter(string $filterType): void
{
$filter = new CompressFilter($filterType);
$adapter = $filter->getAdapter();
self::assertInstanceOf(CompressionAlgorithmInterface::class, $adapter);
self::assertEqualsIgnoringCase($filterType, $filter->getAdapterName());
}
/**
* Setting Adapter
*/
public function testSetAdapter(): void
{
if (! extension_loaded('zlib')) {
self::markTestSkipped('This filter is tested with the zlib extension');
}
$filter = new CompressFilter();
self::assertSame('Gz', $filter->getAdapterName());
$filter->setAdapter(Boolean::class);
$this->expectException(Exception\InvalidArgumentException::class);
$this->expectExceptionMessage('does not implement');
$adapter = $filter->getAdapter();
}
/**
* Decompress archiv
*
* @dataProvider returnFilterType
*/
public function testDecompressArchive(string $filterType): void
{
$filter = new CompressFilter($filterType);
$archive = $this->tmpDir . '/compressed.' . $filterType;
$filter->setArchive($archive);
$content = $filter('compress me');
self::assertTrue($content);
$filter2 = new CompressFilter($filterType);
$content2 = $filter2->decompress($archive);
self::assertSame('compress me', $content2);
}
/**
* Setting invalid method
*/
public function testInvalidMethod(): void
{
$filter = new CompressFilter();
$this->expectException(Exception\BadMethodCallException::class);
$this->expectExceptionMessage('Unknown method');
$filter->invalidMethod();
}
/** @return iterable */
public function returnUnfilteredDataProvider(): iterable
{
foreach ($this->returnFilterType() as $parameters) {
yield [$parameters[0], null];
yield [$parameters[0], new stdClass()];
yield [
$parameters[0],
[
'compress me',
'compress me too, please',
],
];
}
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered(string $filterType, mixed $input): void
{
$filter = new CompressFilter($filterType);
self::assertSame($input, $filter($input));
}
}
PK uUz F F test/DecompressTest.phpnu ٘ tmpDir = sprintf('%s/%s', sys_get_temp_dir(), uniqid('laminasilter'));
mkdir($this->tmpDir, 0775, true);
}
public function tearDown(): void
{
if (is_dir($this->tmpDir)) {
foreach ($this->returnFilterType() as $parameters) {
if (file_exists($this->tmpDir . '/compressed.' . $parameters[0])) {
unlink($this->tmpDir . '/compressed.' . $parameters[0]);
}
}
rmdir($this->tmpDir);
}
}
/** @return iterable */
public function returnFilterType(): iterable
{
if (extension_loaded('bz2')) {
yield ['bz2'];
}
if (extension_loaded('zlib')) {
yield ['gz'];
}
}
/**
* Basic usage
*
* @dataProvider returnFilterType
*/
public function testBasicUsage(string $filterType): void
{
$filter = new DecompressFilter($filterType);
$text = 'compress me';
$compressed = $filter->compress($text);
self::assertNotEquals($text, $compressed);
$decompressed = $filter($compressed);
self::assertSame($text, $decompressed);
}
/**
* Setting Archive
*
* @dataProvider returnFilterType
*/
public function testCompressToFile(string $filterType): void
{
$filter = new DecompressFilter($filterType);
$archive = $this->tmpDir . '/compressed.' . $filterType;
$filter->setArchive($archive);
$content = $filter->compress('compress me');
self::assertTrue($content);
$filter2 = new DecompressFilter($filterType);
$content2 = $filter2($archive);
self::assertSame('compress me', $content2);
$filter3 = new DecompressFilter($filterType);
$filter3->setArchive($archive);
$content3 = $filter3(null);
self::assertSame('compress me', $content3);
}
/**
* Basic usage
*
* @dataProvider returnFilterType
*/
public function testDecompressArchive(string $filterType): void
{
$filter = new DecompressFilter($filterType);
$archive = $this->tmpDir . '/compressed.' . $filterType;
$filter->setArchive($archive);
$content = $filter->compress('compress me');
self::assertTrue($content);
$filter2 = new DecompressFilter($filterType);
$content2 = $filter2($archive);
self::assertSame('compress me', $content2);
}
/**
* @dataProvider returnFilterType
*/
public function testFilterMethodProxiesToDecompress(string $filterType): void
{
$filter = new DecompressFilter($filterType);
$archive = $this->tmpDir . '/compressed.' . $filterType;
$filter->setArchive($archive);
$content = $filter->compress('compress me');
self::assertTrue($content);
$filter2 = new DecompressFilter($filterType);
$content2 = $filter2->filter($archive);
self::assertSame('compress me', $content2);
}
/** @return iterable */
public function returnUnfilteredDataProvider(): iterable
{
foreach ($this->returnFilterType() as $parameter) {
yield [$parameter[0], new stdClass()];
yield [
$parameter[0],
[
'decompress me',
'decompress me too, please',
],
];
}
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered(string $filterType, mixed $input): void
{
$filter = new DecompressFilter($filterType);
self::assertSame($input, $filter($input));
}
}
PK uU2 test/MonthSelectTest.phpnu ٘ setOptions($options);
self::assertSame($expected, $sut->filter($input));
}
/** @return list */
public function provideFilter(): array
{
return [
[[], ['year' => '2014', 'month' => '10'], '2014-10'],
[['nullOnEmpty' => true], ['year' => null, 'month' => '10'], null],
[['null_on_empty' => true], ['year' => null, 'month' => '10'], null],
[['nullOnAllEmpty' => true], ['year' => null, 'month' => null], null],
[['null_on_all_empty' => true], ['year' => null, 'month' => null], null],
];
}
public function testInvalidInput(): void
{
$this->expectException(RuntimeException::class);
$sut = new MonthSelectFilter();
$sut->filter(['year' => '2120']);
}
}
PK uUhpw ' test/FilterPluginManagerFactoryTest.phpnu ٘ createMock(ContainerInterface::class);
$factory = new FilterPluginManagerFactory();
$filters = $factory($container, FilterPluginManagerFactory::class);
self::assertInstanceOf(FilterPluginManager::class, $filters);
if (method_exists($filters, 'configure')) {
// laminas-servicemanager v3
$r = new ReflectionObject($filters);
$p = $r->getProperty('creationContext');
$p->setAccessible(true);
self::assertSame($container, $p->getValue($filters));
} else {
// laminas-servicemanager v2
self::assertSame($container, $filters->getServiceLocator());
}
}
/**
* @depends testFactoryReturnsPluginManager
*/
public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void
{
$container = $this->createMock(ContainerInterface::class);
$filter = static fn($value) => $value;
$factory = new FilterPluginManagerFactory();
$filters = $factory($container, FilterPluginManagerFactory::class, [
'services' => [
'test' => $filter,
],
]);
self::assertSame($filter, $filters->get('test'));
}
/**
* @depends testFactoryReturnsPluginManager
*/
public function testFactoryConfiguresPluginManagerUnderServiceManagerV2()
{
$container = $this->createMock(ServiceLocatorInterface::class);
$filter = static fn($value) => $value;
$factory = new FilterPluginManagerFactory();
$factory->setCreationOptions([
'services' => [
'test' => $filter,
],
]);
$filters = $factory->createService($container);
self::assertSame($filter, $filters->get('test'));
}
public function testConfiguresFilterServicesWhenFound(): void
{
$filter = $this->createMock(FilterInterface::class);
$config = [
'filters' => [
'aliases' => [
'test' => Boolean::class,
],
'factories' => [
'test-too' => static fn($container): MockObject => $filter,
],
],
];
$container = $this->createMock(ServiceLocatorInterface::class);
$container->expects(self::atLeast(2))
->method('has')
->willReturnMap([
['ServiceListener', false],
['config', true],
]);
$container->expects(self::once())
->method('get')
->with('config')
->willReturn($config);
$factory = new FilterPluginManagerFactory();
$filters = $factory($container, 'FilterManager');
self::assertInstanceOf(FilterPluginManager::class, $filters);
self::assertTrue($filters->has('test'));
self::assertInstanceOf(Boolean::class, $filters->get('test'));
self::assertTrue($filters->has('test-too'));
self::assertSame($filter, $filters->get('test-too'));
}
public function testDoesNotConfigureFilterServicesWhenServiceListenerPresent(): void
{
$container = $this->createMock(ServiceLocatorInterface::class);
$container->expects(self::once())
->method('has')
->with('ServiceListener')
->willReturn(true);
$factory = new FilterPluginManagerFactory();
$filters = $factory($container, 'FilterManager');
self::assertInstanceOf(FilterPluginManager::class, $filters);
self::assertFalse($filters->has('test'));
self::assertFalse($filters->has('test-too'));
}
public function testDoesNotConfigureFilterServicesWhenConfigServiceNotPresent(): void
{
$container = $this->createMock(ServiceLocatorInterface::class);
$container->expects(self::exactly(2))
->method('has')
->willReturnMap([
['ServiceListener', false],
['config', false],
]);
$container->expects(self::never())->method('get');
$factory = new FilterPluginManagerFactory();
$filters = $factory($container, 'FilterManager');
self::assertInstanceOf(FilterPluginManager::class, $filters);
}
public function testDoesNotConfigureFilterServicesWhenConfigServiceDoesNotContainFiltersConfig(): void
{
$container = $this->createMock(ServiceLocatorInterface::class);
$container->expects(self::exactly(2))
->method('has')
->willReturnMap([
['ServiceListener', false],
['config', true],
]);
$container->expects(self::once())
->method('get')
->with('config')
->willReturn(['foo' => 'bar']);
$factory = new FilterPluginManagerFactory();
$filters = $factory($container, 'FilterManager');
self::assertInstanceOf(FilterPluginManager::class, $filters);
self::assertFalse($filters->has('foo'));
}
}
PK uU>^/ test/BaseNameTest.phpnu ٘ 'filename',
'/path/to/filename.ext' => 'filename.ext',
];
foreach ($valuesExpected as $input => $output) {
self::assertSame($output, $filter($input));
}
}
/** @return list */
public function returnUnfilteredDataProvider(): array
{
return [
[null],
[new stdClass()],
[
[
'/path/to/filename',
'/path/to/filename.ext',
],
],
];
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered(mixed $input): void
{
$filter = new BaseNameFilter();
self::assertSame($input, $filter($input));
}
}
PK uU/ test/TestAsset/LowerCase.phpnu ٘ 0,
'1' => 1,
'-1' => -1,
'1.1' => 1,
'-1.1' => -1,
'0.9' => 0,
'-0.9' => 0,
];
foreach ($valuesExpected as $input => $output) {
self::assertSame($output, $filter($input));
}
}
/** @return list */
public function returnUnfilteredDataProvider(): array
{
return [
[null],
[new stdClass()],
[
[
'1',
-1,
],
],
];
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered(mixed $input): void
{
$filter = new ToIntFilter();
self::assertSame($input, $filter($input));
}
}
PK uUM4!c - test/FilterPluginManagerCompatibilityTest.phpnu ٘ getPluginManager();
$r = new ReflectionProperty($pluginManager, 'aliases');
$r->setAccessible(true);
$aliases = $r->getValue($pluginManager);
foreach ($aliases as $alias => $target) {
// Skipping as laminas-i18n is not required by this package
if (strpos($target, '\\I18n\\')) {
continue;
}
// Skipping as it has required options
if (strpos($target, 'DataUnitFormatter')) {
continue;
}
yield $alias => [$alias, $target];
}
}
}
PK uU
test/DigitsTest.phpnu ٘ unicodeEnabled = (bool) @preg_match('/\pL/u', 'a');
}
/**
* Ensures that the filter follows expected behavior
*/
public function testBasic(): void
{
$filter = new DigitsFilter();
if ($this->unicodeEnabled) {
// Filter for the value with mbstring
/**
* The first element of $valuesExpected contains multibyte digit characters.
* But , Laminas_Filter_Digits is expected to return only singlebyte digits.
*
* The second contains multibyte or singebyte space, and also alphabet.
* The third contains various multibyte characters.
* The last contains only singlebyte digits.
*/
$valuesExpected = [
'192八3四8' => '123',
'C 4.5B 6' => '456',
'9壱8@7.6,5#4' => '987654',
'789' => '789',
];
} else {
// POSIX named classes are not supported, use alternative 0-9 match
// Or filter for the value without mbstring
$valuesExpected = [
'abc123' => '123',
'abc 123' => '123',
'abcxyz' => '',
'AZ@#4.3' => '43',
'1.23' => '123',
'0x9f' => '09',
];
}
foreach ($valuesExpected as $input => $output) {
self::assertSame(
$output,
$result = $filter($input),
"Expected '$input' to filter to '$output', but received '$result' instead"
);
}
}
/** @return list */
public function returnUnfilteredDataProvider(): array
{
return [
[null],
[new stdClass()],
[
[
'abc123',
'abc 123',
],
],
[true],
[false],
];
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered(mixed $input): void
{
$filter = new DigitsFilter();
self::assertSame($input, $filter($input));
}
}
PK uU&0 0 test/DecryptTest.phpnu ٘ 'BlockCipher']);
$valuesExpected = [
'STRING' => 'STRING',
'ABC1@3' => 'ABC1@3',
'A b C' => 'A B C',
];
$enc = $filter->getEncryption();
$filter->setKey('1234567890123456');
foreach ($valuesExpected as $input => $output) {
self::assertNotEquals($output, $filter($input));
}
}
/**
* Ensures that the encryption works fine
*/
public function testDecryptBlockCipher(): void
{
$decrypt = new DecryptFilter(['adapter' => 'BlockCipher', 'key' => 'testkey']);
$decrypt->setVector('1234567890123456890');
// @codingStandardsIgnoreStart
$decrypted = $decrypt->filter('ec133eb7460682b0020b736ad6d2ef14c35de0f1e5976330ae1dd096ef3b4cb7MTIzNDU2Nzg5MDEyMzQ1NoZvxY1JkeL6TnQP3ug5F0k=');
// @codingStandardsIgnoreEnd
self::assertSame($decrypted, 'test');
}
/**
* Ensures that the filter follows expected behavior
*/
public function testBasicOpenssl(): void
{
if (! extension_loaded('openssl')) {
self::markTestSkipped('Openssl extension not installed');
}
$filter = new DecryptFilter(['adapter' => 'Openssl']);
$filter->setPassphrase('zPUp9mCzIrM7xQOEnPJZiDkBwPBV9UlITY0Xd3v4bfIwzJ12yPQCAkcR5BsePGVw
RK6GS5RwXSLrJu9Qj8+fk0wPj6IPY5HvA9Dgwh+dptPlXppeBm3JZJ+92l0DqR2M
ccL43V3Z4JN9OXRAfGWXyrBJNmwURkq7a2EyFElBBWK03OLYVMevQyRJcMKY0ai+
tmnFUSkH2zwnkXQfPUxg9aV7TmGQv/3TkK1SziyDyNm7GwtyIlfcigCCRz3uc77U
Izcez5wgmkpNElg/D7/VCd9E+grTfPYNmuTVccGOes+n8ISJJdW0vYX1xwWv5l
bK22CwD/l7SMBOz4M9XH0Jb0OhNxLza4XMDu0ANMIpnkn1KOcmQ4gB8fmAbBt');
$filter->setPrivateKey(__DIR__ . '/_files/privatekey.pem');
$key = $filter->getPrivateKey();
self::assertSame(
[
__DIR__ . '/_files/privatekey.pem'
=> '-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQDKTIp7FntJt1BioBZ0lmWBE8CyzngeGCHNMcAC4JLbi1Y0LwT4
CSaQarbvAqBRmc+joHX+rcURm89wOibRaThrrZcvgl2pomzu7shJc0ObiRZC8H7p
xTkZ1HHjN8cRSQlOHkcdtE9yoiSGSO+zZ9K5ReU1DOsFFDD4V7XpcNU63QIDAQAB
AoGBALr0XY4/SpTnmpxqwhXg39GYBZ+5e/yj5KkTbxW5oT7P2EzFn1vyaPdSB9l+
ndaLxP68zg8dXGBXlC9tLm6dRQtocGupUPB1HOEQbUIlQdiKF/W7/8w6uzLNXdid
qCSLrSJ4cfkYKtS29Xi6qooRw2DOvUFngXy/ELtmTeiBcihpAkEA8+oUesTET+TO
IYM0+l5JrTOpCPZt+aY4JPmWoKz9bshJT/DP2KPgmqd8/Vy+i23yIfOwUxbpwbna
aKzNPi/uywJBANRSl7RNL7jh1BJRQC7+mvUVTE8iQwbyGtIipcLC7bxwhNQzuPKS
P4o/a1+HEVB9Nv1Em7DqKTwBnlkJvaFZ3/cCQQCcvx0SGEkgHqXpG2x8SQOH7t7+
B399I7iI6mxGLWVgQA389YBcdFPujxvfpi49ZBZqgzQY8WyfNlSJWCM9h4gpAkAu
qxzHN7QGmjSn9g36hmH+/rhwKGK9MxfsGkt+/KOOqNi5X8kGIFkxBPGP5LtMisk8
cAkcoMuBcgWhIn/46C1PAkEAzLK/ibrdMQLOdO4SuDgj/2nc53NZ3agl61ew8Os6
d/fxzPfuO/bLpADozTAnYT9Hu3wPrQVLeAfCp0ojqH7DYg==
-----END RSA PRIVATE KEY-----
',
],
$key
);
}
public function testSettingAdapterManually(): void
{
if (! extension_loaded('openssl')) {
self::markTestSkipped('Openssl extension not installed');
}
$filter = new DecryptFilter();
$filter->setAdapter('Openssl');
self::assertSame('Openssl', $filter->getAdapter());
self::assertInstanceOf(EncryptionAlgorithmInterface::class, $filter->getAdapterInstance());
$filter->setAdapter('BlockCipher');
self::assertSame('BlockCipher', $filter->getAdapter());
self::assertInstanceOf(EncryptionAlgorithmInterface::class, $filter->getAdapterInstance());
$this->expectException(Exception\InvalidArgumentException::class);
$this->expectExceptionMessage('does not implement');
$filter->setAdapter(stdClass::class);
}
public function testCallingUnknownMethod(): void
{
$this->expectException(Exception\BadMethodCallException::class);
$this->expectExceptionMessage('Unknown method');
$filter = new DecryptFilter();
$filter->getUnknownMethod();
}
public function returnUnfilteredDataProvider()
{
return [
[null],
[new stdClass()],
// @codingStandardsIgnoreStart
[[
'ec133eb7460682b0020b736ad6d2ef14c35de0f1e5976330ae1dd096ef3b4cb7MTIzNDU2Nzg5MDEyMzQ1NoZvxY1JkeL6TnQP3ug5F0k=',
'decrypt me too, please'
]]
// @codingStandardsIgnoreEnd
];
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered($input): void
{
$decrypt = new DecryptFilter(['adapter' => 'BlockCipher', 'key' => 'testkey']);
$decrypt->setVector('1234567890123456890');
$decrypted = $decrypt->filter($input);
self::assertSame($input, $decrypted);
}
}
PK uU8l1 1 ' test/Word/CamelCaseToUnderscoreTest.phpnu ٘ */
public function returnUnfilteredDataProvider(): array
{
return [
[null],
[new stdClass()],
];
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered(mixed $input): void
{
$filter = new SeparatorToSeparatorFilter('=', '?');
self::assertSame($input, $filter($input));
}
/**
* @return array[]
*/
public function returnNonStringScalarValues(): array
{
return [
[1],
[1.0],
[true],
[false],
];
}
/**
* @dataProvider returnNonStringScalarValues
*/
public function testShouldFilterNonStringScalarValues(float|bool|int $input): void
{
$filter = new SeparatorToSeparatorFilter('=', '?');
self::assertSame((string) $input, $filter($input));
}
}
PK uU{2 ! test/Word/DashToCamelCaseTest.phpnu ٘ */
public function returnUnfilteredDataProvider(): array
{
return [
[null],
[new stdClass()],
];
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered(mixed $input): void
{
$filter = new SeparatorToCamelCaseFilter();
self::assertSame($input, $filter($input));
}
/**
* @return array[]
*/
public function returnNonStringScalarValues(): array
{
return [
[1],
[1.0],
[true],
[false],
];
}
/**
* @dataProvider returnNonStringScalarValues
*/
public function testShouldFilterNonStringScalarValues(float|bool|int $input): void
{
$filter = new SeparatorToCamelCaseFilter();
self::assertSame((string) $input, $filter($input));
}
}
PK uUs/9 ! test/Word/DashToSeparatorTest.phpnu ٘ */
public function returnUnfilteredDataProvider(): array
{
return [
[null],
[new stdClass()],
];
}
/**
* @dataProvider returnUnfilteredDataProvider
*/
public function testReturnUnfiltered(mixed $input): void
{
$filter = new DashToSeparatorFilter();
self::assertSame($input, $filter($input));
}
/**
* @return array[]
*/
public function returnNonStringScalarValues(): array
{
return [
[1],
[1.0],
[true],
[false],
];
}
/**
* @dataProvider returnNonStringScalarValues
*/
public function testShouldFilterNonStringScalarValues(float|bool|int $input): void
{
$filter = new DashToSeparatorFilter();
self::assertSame((string) $input, $filter($input));
}
}
PK uUNA
A
&