chimera / routing-mezzio
Laminas Mezzio 对 chimera/routing 的实现
Requires
- php: ^7.4 || ^8.0
- chimera/foundation: ^0.4
- chimera/routing: ^0.4
- laminas/laminas-diactoros: ^2.5
- mezzio/mezzio: ^3.3
- mezzio/mezzio-fastroute: ^3.1
- mezzio/mezzio-helpers: ^5.4
- mezzio/mezzio-router: ^3.3
- psr/http-message: ^1.0
Requires (Dev)
- infection/infection: ^0.21
- lcobucci/coding-standard: ^6.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^0.12
- phpstan/phpstan-deprecation-rules: ^0.12
- phpstan/phpstan-phpunit: ^0.12
- phpstan/phpstan-strict-rules: ^0.12
- phpunit/phpunit: ^9.5
Provides
Replaces
- 1.0.x-dev
- 0.4.x-dev
- 0.4.0
- dev-renovate/configure
- dev-dependabot/composer/symfony/console-6.2.7
- dev-dependabot/composer/nikic/php-parser-4.15.4
- dev-dependabot/composer/symfony/filesystem-6.2.7
- dev-dependabot/composer/phpunit/php-code-coverage-9.2.26
- dev-dependabot/composer/phpunit/phpunit-9.6.4
- dev-dependabot/composer/phpstan/phpstan-1.10.4
- dev-dependabot/composer/phpstan/phpstan-phpunit-1.3.10
- dev-dependabot/composer/symfony/string-6.2.7
- dev-dependabot/github_actions/actions/cache-3.2.6
- dev-dependabot/github_actions/ridedott/merge-me-action-2.10.43
- dev-dependabot/composer/ramsey/uuid-4.7.3
- dev-dependabot/composer/laminas/laminas-httphandlerrunner-2.5.0
- dev-dependabot/composer/slevomat/coding-standard-8.8.0
- dev-dependabot/composer/laminas/laminas-diactoros-2.24.0
- dev-dependabot/composer/sanmai/pipeline-6.3
- dev-dependabot/composer/phpstan/phpdoc-parser-1.13.1
- dev-dependabot/composer/composer/pcre-3.1.0
- dev-dependabot/composer/symfony/polyfill-mbstring-1.27.0
- dev-dependabot/composer/symfony/polyfill-php81-1.27.0
- dev-dependabot/composer/symfony/polyfill-intl-normalizer-1.27.0
- dev-dependabot/composer/symfony/polyfill-intl-grapheme-1.27.0
- dev-dependabot/composer/symfony/polyfill-ctype-1.27.0
This package is auto-updated.
Last update: 2024-09-15 03:55:12 UTC
README
术语 Chimera (/kɪˈmɪərə/ 或 /kaɪˈmɪərə/)用来描述任何由多种动物的部分组成的神话或虚构动物,或描述任何由非常不同的部分组成的东西,或被视为充满想象力、不切实际或令人眼花缭乱的东西。
PHP 社区中有许多令人惊叹的库,随着 PSRs 的创建和采用,我们不必一定依赖全栈框架来创建复杂且设计良好的软件。选择要使用的组件并将它们组合在一起有时可能有点挑战。
这组包的目标是使其更容易做到这一点(不牺牲质量),让您专注于软件的行为。
此包仅提供对 Laminas Mezzio v3.0 的适配器,使其可以作为 HTTP 应用程序使用。
安装
该包可在 Packagist 上获得,您可以使用 Composer 安装它。
composer require chimera/routing-mezzio
PHP 配置
为了确保我们处理的是正确的数据,我们使用了 assert()
,这是 PHP 中一个非常有趣的功能,但并不常用。关于 assert()
的好处是我们可以(并且应该)在生产模式下禁用它,以免出现无用的语句。
因此,对于生产模式,我们建议您在您的 php.ini
中将 zend.assertions
设置为 -1
。对于开发,您应该将 zend.assertions
保持为 1
并将 assert.exception
设置为 1
,这将使 PHP 在出错时抛出 AssertionError
。
有关更多信息,请参阅文档:https://php.ac.cn/assert
用法
要使用此包,您需要配置您的 Laminas Mezzio 应用程序以使用我们的包(如此处所述)并在您的 DI 容器中注册 Chimera\Routing\Mezzio\UriGenerator
和 Chimera\Routing\Mezzio\RouteParamsExtractor
的实例。
许可证
MIT,请参阅LICENSE。