c33s / parameter-objects-bundle
用于简化自动装配的 Symfony 参数值的普通 PHP 对象
1.0.1
2020-12-16 15:56 UTC
Requires
- php: ^7.1.0|^8.0
- symfony/config: ^3.4|^4.0|^5.0
- symfony/dependency-injection: ^3.4|^4.0|^5.0
- symfony/http-kernel: ^3.4|^4.0|^5.0
Requires (Dev)
- codeception/codeception: 4.1.12
- codeception/module-asserts: 1.3.1
- codeception/module-cli: 1.1.0
- codeception/module-filesystem: 1.0.3
- composer/semver: ^3.2.4
- doctrine/annotations: ^1.11.1
- roave/security-advisories: dev-latest
- symfony/finder: ^3.4|^4.0|^5.0
- voku/stringy: ^6.4.0
README
注入普通 PHP 类,而不是绑定字符串参数,以便可以自动装配到您的服务中。
类及其相应的参数
\C33s\ParameterObjects\KernelEnvironment
:%kernel.environment%
\C33s\ParameterObjects\KernelProjectDir
:%kernel.project_dir%
测试
环境变量
由集成测试使用
SYMFONY_VERSION
版本约束,将传递给composer create-project
,例如~4.4.0
COMPOSER_PHAR
要使用的 composer phar,默认为与 robo 一同安装的版本.robo/bin/composer.phar
SYMFONY_INTEGRATION_TEST_INITIALIZED
可以设置为 true 以防止项目初始化SYMFONY_INTEGRATION_TEST_FORCE_REINITIALIZE
将此设置为 true 以强制项目重新初始化