From 3f91a91924888211ac4526ad653eaf7379f189e1 Mon Sep 17 00:00:00 2001 From: Arslan Imamutdinov Date: Sat, 22 Aug 2026 16:41:03 +0400 Subject: [PATCH 1/8] [AEGISORA-69047465] Setup composer. --- composer.json | 15 +- composer.lock | 2005 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2013 insertions(+), 7 deletions(-) create mode 100644 composer.lock diff --git a/composer.json b/composer.json index 93655db..c2e1da5 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,12 @@ { - "name": "aegisora/", + "name": "aegisora/string-length-rule", "description": "", "type": "library", "keywords": ["php", "aegisora", "aegisora-ecosystem"], - "homepage": "https://github.com/Aegisora/", + "homepage": "https://github.com/Aegisora/string-length-rule", "support": { - "issues": "https://github.com/Aegisora//issues", - "source": "https://github.com/Aegisora/" + "issues": "https://github.com/Aegisora/string-length-rule/issues", + "source": "https://github.com/Aegisora/string-length-rule" }, "authors": [ { @@ -17,7 +17,8 @@ ], "license": "MIT", "require": { - "php": ">=7.4" + "php": ">=7.4", + "aegisora/rule-contract": "^1.0" }, "require-dev": { "phpunit/phpunit": "^9.6", @@ -26,12 +27,12 @@ }, "autoload": { "psr-4": { - "Aegisora\\\\": "src/" + "Aegisora\\Rules\\": "src/" } }, "autoload-dev": { "psr-4": { - "Aegisora\\\\Tests\\": "tests/" + "Aegisora\\Rules\\Tests\\": "tests/" } }, "config": { diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..1a20249 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2005 @@ +{ + "_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": "320c9c57725c3aef8336c3faeb11dce3", + "packages": [ + { + "name": "aegisora/rule-contract", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/Aegisora/rule-contract.git", + "reference": "ce959e39cc25ee7fdba7f4f1498ea11315e5843b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Aegisora/rule-contract/zipball/ce959e39cc25ee7fdba7f4f1498ea11315e5843b", + "reference": "ce959e39cc25ee7fdba7f4f1498ea11315e5843b", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Aegisora\\RuleContract\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arslan Imamutdinov", + "email": "ara.imamutdinov@gmail.com" + } + ], + "description": "Contracts for rule-based validation in Aegisora ecosystem", + "homepage": "https://github.com/Aegisora/rule-contract", + "keywords": [ + "aegisora", + "aegisora-ecosystem", + "contracts", + "php", + "rule-contract", + "rules", + "validation" + ], + "support": { + "issues": "https://github.com/Aegisora/rule-contract/issues", + "source": "https://github.com/Aegisora/rule-contract" + }, + "time": "2026-08-15T12:33:13+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "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.30 || ^5.4" + }, + "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.5.0" + }, + "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-12-30T00:15:36+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "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", + "phpspec/prophecy": "^1.10", + "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.13.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-08-01T08:46:24+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.8.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-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/v5.8.0" + }, + "time": "2026-07-04T14:30:18+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "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.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "2.2.9", + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/13d6b4f347bad222da436580c8304fa6f83e6bd0", + "reference": "13d6b4f347bad222da436580c8304fa6f83e6bd0", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "OndΕ™ej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" + } + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2026-08-22T07:38:16+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.2.x-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", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:23:01+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.6.36", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "abab27ed286d3e1246fbbfe6b56bfd732d945ec9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/abab27ed286d3e1246fbbfe6b56bfd732d945ec9", + "reference": "abab27ed286d3e1246fbbfe6b56bfd732d945ec9", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.5.0 || ^2", + "ext-dom": "*", + "ext-filter": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.10", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.9", + "sebastian/global-state": "^5.0.8", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-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", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.36" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsoring.html", + "type": "other" + } + ], + "time": "2026-08-11T06:25:15+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "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.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+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.10", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e4df00b9b3571187db2831ae9aada2c6efbd715d", + "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d", + "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.10" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" + } + ], + "time": "2026-01-24T09:22:56+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "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.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "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.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "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.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "4352c1a3df741a7ba9e61af6fed51d1fee41cbf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/4352c1a3df741a7ba9e61af6fed51d1fee41cbf7", + "reference": "4352c1a3df741a7ba9e61af6fed51d1fee41cbf7", + "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.9" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "time": "2026-08-11T04:55:59+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "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.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", + "type": "tidelift" + } + ], + "time": "2025-08-10T07:10:35+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "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.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+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.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "c85be6922b7fd365942b986b9a50397d65407611" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c85be6922b7fd365942b986b9a50397d65407611", + "reference": "c85be6922b7fd365942b986b9a50397d65407611", + "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": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "time": "2026-08-11T05:25:24+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "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": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-14T16:00:52+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "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.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13: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": "squizlabs/php_codesniffer", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "bbdc3d0532623e21838b7041a4364383a8126f96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/bbdc3d0532623e21838b7041a4364383a8126f96", + "reference": "bbdc3d0532623e21838b7041a4364383a8126f96", + "shasum": "" + }, + "require": { + "ext-libxml": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=7.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31" + }, + "suggest": { + "ext-iconv": "For accurate character length calculation when the checked files contain multi-byte characters.", + "ext-pcntl": "For parallel processing support via the --parallel CLI option." + }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2026-08-06T02:45:27+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "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.3.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2025-11-17T20:03:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.4" + }, + "platform-dev": {}, + "plugin-api-version": "2.9.0" +} From 7b169176e06a71b7e43abbeb13bc7e3611cde891 Mon Sep 17 00:00:00 2001 From: Arslan Imamutdinov Date: Sat, 22 Aug 2026 16:58:01 +0400 Subject: [PATCH 2/8] [AEGISORA-69047465] Implemented rule. --- src/StringLengthRule.php | 110 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 src/StringLengthRule.php diff --git a/src/StringLengthRule.php b/src/StringLengthRule.php new file mode 100644 index 0000000..412361a --- /dev/null +++ b/src/StringLengthRule.php @@ -0,0 +1,110 @@ +min = $min; + $this->minInclusive = $minInclusive; + $this->max = $max; + $this->maxInclusive = $maxInclusive; + } + + public static function createGreaterThan(int $length): self + { + return new self($length, false, null, false); + } + + public static function createGreaterThanOrEqualTo(int $length): self + { + return new self($length, true, null, false); + } + + public static function createLessThan(int $length): self + { + return new self(null, false, $length, false); + } + + public static function createLessThanOrEqualTo(int $length): self + { + return new self(null, false, $length, true); + } + + public static function createBetween( + int $min, + int $max + ): self { + return new self($min, true, $max, true); + } + + public static function createBetweenExclusive( + int $min, + int $max + ): self { + return new self($min, false, $max, false); + } + + public static function createBetweenMinExclusive( + int $min, + int $max + ): self { + return new self($min, false, $max, true); + } + + public static function createBetweenMaxExclusive( + int $min, + int $max + ): self { + return new self($min, true, $max, false); + } + + protected function executeValidate(Context $context): Result + { + $value = $context->getValue(); + + if (!is_string($value)) { + throw new InvalidRuleContextException(); + } + + return $this->isSatisfiedBy(mb_strlen($value)) ? + $this->getDefaultValidResult() : + $this->getDefaultInvalidResult(); + } + + private function isSatisfiedBy(int $length): bool + { + if (!is_null($this->min)) { + $satisfiesMin = $this->minInclusive ? ($length >= $this->min) : ($length > $this->min); + + if (!$satisfiesMin) { + return false; + } + } + + if (!is_null($this->max)) { + $satisfiesMax = $this->maxInclusive ? ($length <= $this->max) : ($length < $this->max); + + if (!$satisfiesMax) { + return false; + } + } + + return true; + } +} From 708a104cead97d8b5345c94370d16b5f1f2c479a Mon Sep 17 00:00:00 2001 From: Github Actions Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Aug 2026 12:59:18 +0000 Subject: [PATCH 3/8] Update code coverage badge --- clover.xml | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/clover.xml b/clover.xml index e354a07..58b078d 100644 --- a/clover.xml +++ b/clover.xml @@ -1,6 +1,50 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 9843f23911e11a63c6248636c9515d7c167d2b24 Mon Sep 17 00:00:00 2001 From: Arslan Imamutdinov Date: Sat, 22 Aug 2026 17:03:24 +0400 Subject: [PATCH 4/8] [AEGISORA-69047465] Implemented unit test. --- tests/Unit/StringLengthRuleTest.php | 455 ++++++++++++++++++++++++++++ 1 file changed, 455 insertions(+) create mode 100644 tests/Unit/StringLengthRuleTest.php diff --git a/tests/Unit/StringLengthRuleTest.php b/tests/Unit/StringLengthRuleTest.php new file mode 100644 index 0000000..70d75f5 --- /dev/null +++ b/tests/Unit/StringLengthRuleTest.php @@ -0,0 +1,455 @@ + [ + 'rule' => StringLengthRule::createGreaterThan(3), + ], + 'greater than or equal to' => [ + 'rule' => StringLengthRule::createGreaterThanOrEqualTo(3), + ], + 'less than' => [ + 'rule' => StringLengthRule::createLessThan(3), + ], + 'less than or equal to' => [ + 'rule' => StringLengthRule::createLessThanOrEqualTo(3), + ], + 'between' => [ + 'rule' => StringLengthRule::createBetween(2, 4), + ], + 'between exclusive' => [ + 'rule' => StringLengthRule::createBetweenExclusive(2, 4), + ], + 'between min exclusive' => [ + 'rule' => StringLengthRule::createBetweenMinExclusive(2, 4), + ], + 'between max exclusive' => [ + 'rule' => StringLengthRule::createBetweenMaxExclusive(2, 4), + ], + ]; + } + + /** + * @dataProvider getGreaterThanProvidedData + */ + public function testGreaterThan( + Context $context, + int $length, + array $expectedResult + ): void { + self::assertActualResultEqualsExpected( + StringLengthRule::createGreaterThan($length)->validate($context), + $expectedResult + ); + } + + public static function getGreaterThanProvidedData(): array + { + return [ + 'shorter than boundary' => [ + 'context' => Context::create('ab'), + 'length' => 3, + 'expectedResult' => self::invalidResult(), + ], + 'equal to boundary' => [ + 'context' => Context::create('abc'), + 'length' => 3, + 'expectedResult' => self::invalidResult(), + ], + 'longer than boundary' => [ + 'context' => Context::create('abcd'), + 'length' => 3, + 'expectedResult' => self::validResult(), + ], + 'multibyte longer than boundary' => [ + 'context' => Context::create('foo '), + 'length' => 3, + 'expectedResult' => self::validResult(), + ], + ]; + } + + /** + * @dataProvider getGreaterThanOrEqualToProvidedData + */ + public function testGreaterThanOrEqualTo( + Context $context, + int $length, + array $expectedResult + ): void { + self::assertActualResultEqualsExpected( + StringLengthRule::createGreaterThanOrEqualTo($length)->validate($context), + $expectedResult + ); + } + + public static function getGreaterThanOrEqualToProvidedData(): array + { + return [ + 'shorter than boundary' => [ + 'context' => Context::create('ab'), + 'length' => 3, + 'expectedResult' => self::invalidResult(), + ], + 'equal to boundary' => [ + 'context' => Context::create('abc'), + 'length' => 3, + 'expectedResult' => self::validResult(), + ], + 'longer than boundary' => [ + 'context' => Context::create('abcd'), + 'length' => 3, + 'expectedResult' => self::validResult(), + ], + ]; + } + + /** + * @dataProvider getLessThanProvidedData + */ + public function testLessThan( + Context $context, + int $length, + array $expectedResult + ): void { + self::assertActualResultEqualsExpected( + StringLengthRule::createLessThan($length)->validate($context), + $expectedResult + ); + } + + public static function getLessThanProvidedData(): array + { + return [ + 'empty string' => [ + 'context' => Context::create(''), + 'length' => 3, + 'expectedResult' => self::validResult(), + ], + 'shorter than boundary' => [ + 'context' => Context::create('ab'), + 'length' => 3, + 'expectedResult' => self::validResult(), + ], + 'equal to boundary' => [ + 'context' => Context::create('abc'), + 'length' => 3, + 'expectedResult' => self::invalidResult(), + ], + 'longer than boundary' => [ + 'context' => Context::create('abcd'), + 'length' => 3, + 'expectedResult' => self::invalidResult(), + ], + ]; + } + + /** + * @dataProvider getLessThanOrEqualToProvidedData + */ + public function testLessThanOrEqualTo( + Context $context, + int $length, + array $expectedResult + ): void { + self::assertActualResultEqualsExpected( + StringLengthRule::createLessThanOrEqualTo($length)->validate($context), + $expectedResult + ); + } + + public static function getLessThanOrEqualToProvidedData(): array + { + return [ + 'shorter than boundary' => [ + 'context' => Context::create('ab'), + 'length' => 3, + 'expectedResult' => self::validResult(), + ], + 'equal to boundary' => [ + 'context' => Context::create('abc'), + 'length' => 3, + 'expectedResult' => self::validResult(), + ], + 'longer than boundary' => [ + 'context' => Context::create('abcd'), + 'length' => 3, + 'expectedResult' => self::invalidResult(), + ], + ]; + } + + /** + * @dataProvider getBetweenProvidedData + */ + public function testBetween( + Context $context, + int $minLength, + int $maxLength, + array $expectedResult + ): void { + self::assertActualResultEqualsExpected( + StringLengthRule::createBetween($minLength, $maxLength)->validate($context), + $expectedResult + ); + } + + public static function getBetweenProvidedData(): array + { + return [ + 'below min' => [ + 'context' => Context::create('a'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::invalidResult(), + ], + 'equal to min' => [ + 'context' => Context::create('ab'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::validResult(), + ], + 'inside range' => [ + 'context' => Context::create('abc'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::validResult(), + ], + 'equal to max' => [ + 'context' => Context::create('abcd'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::validResult(), + ], + 'above max' => [ + 'context' => Context::create('abcde'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::invalidResult(), + ], + ]; + } + + /** + * @dataProvider getBetweenExclusiveProvidedData + */ + public function testBetweenExclusive( + Context $context, + int $minLength, + int $maxLength, + array $expectedResult + ): void { + self::assertActualResultEqualsExpected( + StringLengthRule::createBetweenExclusive($minLength, $maxLength)->validate($context), + $expectedResult + ); + } + + public static function getBetweenExclusiveProvidedData(): array + { + return [ + 'equal to min' => [ + 'context' => Context::create('ab'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::invalidResult(), + ], + 'inside range' => [ + 'context' => Context::create('abc'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::validResult(), + ], + 'equal to max' => [ + 'context' => Context::create('abcd'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::invalidResult(), + ], + ]; + } + + /** + * @dataProvider getBetweenMinExclusiveProvidedData + */ + public function testBetweenMinExclusive( + Context $context, + int $minLength, + int $maxLength, + array $expectedResult + ): void { + self::assertActualResultEqualsExpected( + StringLengthRule::createBetweenMinExclusive($minLength, $maxLength)->validate($context), + $expectedResult + ); + } + + public static function getBetweenMinExclusiveProvidedData(): array + { + return [ + 'equal to min' => [ + 'context' => Context::create('ab'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::invalidResult(), + ], + 'inside range' => [ + 'context' => Context::create('abc'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::validResult(), + ], + 'equal to max' => [ + 'context' => Context::create('abcd'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::validResult(), + ], + ]; + } + + /** + * @dataProvider getBetweenMaxExclusiveProvidedData + */ + public function testBetweenMaxExclusive( + Context $context, + int $minLength, + int $maxLength, + array $expectedResult + ): void { + self::assertActualResultEqualsExpected( + StringLengthRule::createBetweenMaxExclusive($minLength, $maxLength)->validate($context), + $expectedResult + ); + } + + public static function getBetweenMaxExclusiveProvidedData(): array + { + return [ + 'equal to min' => [ + 'context' => Context::create('ab'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::validResult(), + ], + 'inside range' => [ + 'context' => Context::create('abc'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::validResult(), + ], + 'equal to max' => [ + 'context' => Context::create('abcd'), + 'minLength' => 2, + 'maxLength' => 4, + 'expectedResult' => self::invalidResult(), + ], + ]; + } + + /** + * @dataProvider getInvalidContextProvidedData + */ + public function testThrowsInvalidRuleContextException(Context $context): void + { + $this->expectException(InvalidRuleContextException::class); + + StringLengthRule::createGreaterThanOrEqualTo(3)->validate($context); + } + + public static function getInvalidContextProvidedData(): array + { + return [ + 'context value - true' => [ + 'context' => Context::create(true), + ], + 'context value - false' => [ + 'context' => Context::create(false), + ], + 'context value - zero integer' => [ + 'context' => Context::create(0), + ], + 'context value - positive integer' => [ + 'context' => Context::create(1), + ], + 'context value - negative integer' => [ + 'context' => Context::create(-1), + ], + 'context value - zero float' => [ + 'context' => Context::create(0.0), + ], + 'context value - positive float' => [ + 'context' => Context::create(0.01), + ], + 'context value - negative float' => [ + 'context' => Context::create(-0.01), + ], + 'context value - null' => [ + 'context' => Context::create(null), + ], + 'context value - not empty array' => [ + 'context' => Context::create([123,]), + ], + 'context value - empty array' => [ + 'context' => Context::create([]), + ], + 'context value - object' => [ + 'context' => Context::create(new stdClass()), + ], + 'context value - callable' => [ + 'context' => Context::create( + static function () { + } + ), + ], + 'context value - resource' => [ + 'context' => Context::create(tmpfile()), + ], + ]; + } + + private static function validResult(): array + { + return [ + 'isValid' => true, + 'failedRuleCode' => null, + ]; + } + + private static function invalidResult(): array + { + return [ + 'isValid' => false, + 'failedRuleCode' => 'string_length_rule', + ]; + } + + private static function assertActualResultEqualsExpected( + Result $result, + array $expectedResult + ): void { + self::assertEquals($expectedResult['isValid'], $result->isValid()); + self::assertEquals($expectedResult['failedRuleCode'], $result->getFailedRuleCode()); + } +} From 4e61a506c9bf1a938d6d74e43b91819d6c3d0511 Mon Sep 17 00:00:00 2001 From: Github Actions Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Aug 2026 13:05:29 +0000 Subject: [PATCH 5/8] Update code coverage badge --- badge.svg | 8 ++--- clover.xml | 86 +++++++++++++++++++++++++++--------------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/badge.svg b/badge.svg index e8c81e7..7b19671 100644 --- a/badge.svg +++ b/badge.svg @@ -8,9 +8,9 @@ coverage coverage - - - 0 % - 0 % + + + 100 % + 100 % \ No newline at end of file diff --git a/clover.xml b/clover.xml index 58b078d..575b105 100644 --- a/clover.xml +++ b/clover.xml @@ -1,50 +1,50 @@ - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + From c18d73e1fbc48e3b71e91db6643920ef5a656795 Mon Sep 17 00:00:00 2001 From: Arslan Imamutdinov Date: Sat, 22 Aug 2026 17:08:04 +0400 Subject: [PATCH 6/8] [AEGISORA-69047465] Implemented readme. --- README.md | 250 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 247 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9420c2b..f9afc64 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,264 @@ -# Simple component template +# Aegisora String Length Rule +[![Latest Version](https://img.shields.io/packagist/v/aegisora/string-length-rule?style=flat-square)](https://packagist.org/packages/aegisora/string-length-rule) +[![Total Downloads](https://img.shields.io/packagist/dt/aegisora/string-length-rule?style=flat-square)](https://packagist.org/packages/aegisora/string-length-rule) ![Code Coverage Badge](./badge.svg) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) ![PHPStan Badge](https://img.shields.io/badge/PHPStan-level%209-brightgreen.svg?style=flat) +String Length Rule provides a simple, rule-based string length validation implementation for the Aegisora ecosystem. + +It is built on top of [`aegisora/rule-contract`](https://github.com/Aegisora/rule-contract) and follows its strict validation architecture, ensuring consistent and predictable behavior across applications. + +This rule is useful for validating user input, form fields, usernames, passwords, API request parameters, database column constraints, and any other string that must satisfy a length boundary. + +--- + +## πŸ“‘ Table of Contents +- [Features](#-features) +- [Installation](#-installation) +- [Core Concept](#-core-concept) +- [Basic Usage](#-basic-usage) +- [Valid vs Invalid](#-valid-vs-invalid) +- [Validation Result](#-validation-result) +- [Guardian Usage](#-guardian-usage) +- [Real-World Examples](#-real-world-examples) +- [Factory Methods](#-factory-methods) +- [Architecture](#-architecture) +- [License](#-license) +- [Contributing](#-contributing) +- [Support](#-support) + +--- + +## ✨ Features +- πŸ”Ή Lightweight and dependency-free except `aegisora/rule-contract` +- πŸ”Ή Validates a string length against a lower bound, an upper bound, or a range +- πŸ”Ή Supports strict (`>`, `<`) and inclusive (`>=`, `<=`) comparisons +- πŸ”Ή Counts characters (not bytes) via native `mb_strlen()`, so multibyte strings are measured correctly +- πŸ”Ή Rejects non-string input as an invalid context +- πŸ”Ή Fully compatible with Aegisora validation pipeline +- πŸ”Ή Strict `Context` β†’ `Result` validation flow +- πŸ”Ή No raw booleans β€” only structured results +- πŸ”Ή Safe execution via base `Rule` abstraction +- πŸ”Ή Expressive factory API for every boundary variation +- πŸ”Ή Ready to use out of the box + +--- + +## πŸ“¦ Installation + +```bash +composer require aegisora/string-length-rule +``` + +--- + +## πŸš€ Core Concept + +This package implements a single validation rule with several factory variations: + +- accepts a string value via `Context` +- checks whether the string length satisfies the configured boundary +- returns a standardized `Result` + +Under the hood it wraps the common boilerplate: + +```php +$length = mb_strlen($value); + +if ($length < $min || $length > $max) { + // length is out of the allowed boundary +} +``` + +into a reusable rule that reports its outcome through a `Result` object instead of a raw boolean. + +--- + +## πŸ—οΈ Basic Usage + +```php +use Aegisora\RuleContract\Models\Context; +use Aegisora\Rules\StringLengthRule; + +$result = StringLengthRule::createGreaterThanOrEqualTo(8)->validate(Context::create('super-secret')); + +if ($result->isValid()) { + // length satisfies the boundary +} else { + // length is out of the allowed boundary +} +``` + +--- + +## βœ… Valid vs Invalid + +The rule passes when the string length satisfies the configured boundary and fails otherwise. The length is measured in characters via `mb_strlen()`. + +### Lower bound + +```php +StringLengthRule::createGreaterThan(3)->validate(Context::create('abcd')); // valid β€” 4 > 3 +StringLengthRule::createGreaterThan(3)->validate(Context::create('abc')); // invalid β€” 3 is not > 3 + +StringLengthRule::createGreaterThanOrEqualTo(3)->validate(Context::create('abc')); // valid β€” 3 >= 3 +StringLengthRule::createGreaterThanOrEqualTo(3)->validate(Context::create('ab')); // invalid β€” 2 < 3 +``` + +### Upper bound + +```php +StringLengthRule::createLessThan(3)->validate(Context::create('ab')); // valid β€” 2 < 3 +StringLengthRule::createLessThan(3)->validate(Context::create('abc')); // invalid β€” 3 is not < 3 + +StringLengthRule::createLessThanOrEqualTo(3)->validate(Context::create('abc')); // valid β€” 3 <= 3 +StringLengthRule::createLessThanOrEqualTo(3)->validate(Context::create('abcd')); // invalid β€” 4 > 3 +``` + +### Range + +```php +StringLengthRule::createBetween(2, 4)->validate(Context::create('abc')); // valid β€” 2 <= 3 <= 4 +StringLengthRule::createBetween(2, 4)->validate(Context::create('a')); // invalid β€” 1 < 2 + +StringLengthRule::createBetweenExclusive(2, 4)->validate(Context::create('abc')); // valid β€” 2 < 3 < 4 +StringLengthRule::createBetweenExclusive(2, 4)->validate(Context::create('ab')); // invalid β€” 2 is not > 2 + +StringLengthRule::createBetweenMinExclusive(2, 4)->validate(Context::create('abcd')); // valid β€” 2 < 4 <= 4 +StringLengthRule::createBetweenMinExclusive(2, 4)->validate(Context::create('ab')); // invalid β€” 2 is not > 2 + +StringLengthRule::createBetweenMaxExclusive(2, 4)->validate(Context::create('ab')); // valid β€” 2 <= 2 < 4 +StringLengthRule::createBetweenMaxExclusive(2, 4)->validate(Context::create('abcd')); // invalid β€” 4 is not < 4 +``` + +--- + +## πŸ§ͺ Validation Result + +If the length satisfies the boundary, the rule returns a valid result. + +`$result->isValid(); // true` + +If the length is out of the boundary, the rule returns an invalid result. + +```php +$result->isValid(); // false +$result->getFailedRuleCode(); // string_length_rule +``` + +If the context value is not a string, the rule throws: + +`Aegisora\RuleContract\Exceptions\InvalidRuleContextException` + +--- + +## πŸ”— Guardian Usage + +This rule can be used together with `aegisora/guardian` to build fluent validation pipelines. + +```php +use Aegisora\Guardian\Guardian; +use Aegisora\Rules\StringLengthRule; +use App\Exceptions\InvalidUsernameException; + +$guardian = new Guardian(); + +$guardian + ->that($username) + ->must(StringLengthRule::createBetween(3, 32), new InvalidUsernameException()) + ->validate(); +``` + +If the length is out of the allowed boundary, `Guardian` throws the provided domain exception. + +--- + +## 🧭 Real-World Examples + +String Length Rule is useful for enforcing length constraints before values are persisted or processed. + +Examples + +```text +User Registration: + +require a username between 3 and 32 characters +``` +```text +Security: + +require a password of at least 8 characters +``` +```text +Database: + +ensure a value fits a VARCHAR column limit +``` +```text +API: + +reject request parameters that exceed a maximum length +``` + +--- + +## 🧩 Factory Methods +`StringLengthRule::createGreaterThan($length);` +- passes when the string length is strictly greater than `$length` + +`StringLengthRule::createGreaterThanOrEqualTo($length);` +- passes when the string length is greater than or equal to `$length` + +`StringLengthRule::createLessThan($length);` +- passes when the string length is strictly less than `$length` + +`StringLengthRule::createLessThanOrEqualTo($length);` +- passes when the string length is less than or equal to `$length` + +`StringLengthRule::createBetween($min, $max);` +- passes when the string length is between `$min` and `$max`, both boundaries inclusive (`$min <= length <= $max`) + +`StringLengthRule::createBetweenExclusive($min, $max);` +- passes when the string length is between `$min` and `$max`, both boundaries exclusive (`$min < length < $max`) + +`StringLengthRule::createBetweenMinExclusive($min, $max);` +- passes when the string length is between `$min` (exclusive) and `$max` (inclusive) (`$min < length <= $max`) + +`StringLengthRule::createBetweenMaxExclusive($min, $max);` +- passes when the string length is between `$min` (inclusive) and `$max` (exclusive) (`$min <= length < $max`) + +`StringLengthRule::createGreaterThanOrEqualTo($length)->validate($context);` +- `$context` β€” `Context` wrapping the string value to validate + +--- + +## πŸ›οΈ Architecture + +This package relies on [`aegisora/rule-contract`](https://github.com/Aegisora/rule-contract). + +Flow: +1. `validate()` is called +2. `Context` is passed in +3. The string value is extracted from context (non-strings raise `InvalidRuleContextException`) +4. The length is measured with `mb_strlen()` +5. The length is compared against the configured boundary +6. `Result` is returned β€” valid on success, invalid with the `string_length_rule` code on failure + +All logic is safely handled by Rule contract. + --- ## βš–οΈ License -This package is open-source and licensed under the MIT License. See the LICENSE for details. +This package is open-source and licensed under the MIT License. See the [LICENSE](LICENSE) for details. --- ## 🌱 Contributing -Contributions are welcome and greatly appreciated!. See the CONTRIBUTING for details. +Contributions are welcome and greatly appreciated! See the [CONTRIBUTING](CONTRIBUTING.md) for details. --- From 46fe4c1f5b340e923bb9e6a1080010295159d6b5 Mon Sep 17 00:00:00 2001 From: Arslan Imamutdinov Date: Sat, 22 Aug 2026 17:08:38 +0400 Subject: [PATCH 7/8] [AEGISORA-69047465] Improved composer. --- composer.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c2e1da5..402d97f 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,22 @@ { "name": "aegisora/string-length-rule", - "description": "", + "description": "String Length Rule provides a simple, rule-based string length validation implementation for the Aegisora ecosystem", "type": "library", - "keywords": ["php", "aegisora", "aegisora-ecosystem"], + "keywords": [ + "php", + "aegisora", + "aegisora-ecosystem", + "rule", + "validation", + "validator", + "string", + "string-length", + "length", + "min-length", + "max-length", + "range", + "mbstring" + ], "homepage": "https://github.com/Aegisora/string-length-rule", "support": { "issues": "https://github.com/Aegisora/string-length-rule/issues", From d6d84d8b73f21c385d46957131c834c2252d8802 Mon Sep 17 00:00:00 2001 From: Github Actions Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Aug 2026 13:09:55 +0000 Subject: [PATCH 8/8] Update code coverage badge --- clover.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clover.xml b/clover.xml index 575b105..8a9a9d1 100644 --- a/clover.xml +++ b/clover.xml @@ -1,6 +1,6 @@ - - + +