onepress / wp-config
收集配置值并安全地使用 define() 定义它们
v1.0.0
2024-05-03 06:57 UTC
Requires
- php: >=7.1
Requires (Dev)
- php-coveralls/php-coveralls: ^2.2
- phpunit/phpunit: ^7.5
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.5
README
Config::define('WP_DEBUG_DISPLAY', false); Config::define('WP_DEBUG_DISPLAY', true); Config::apply(); echo WP_DEBUG_DISPLAY; // true
\Onepress\WPConfig
需求
此库需要 PHP 7.1+。如果你需要 PHP 5.6 支持:使用 [1.0.0]。
测试
只需运行 make
就可以完成所有操作
我们使用 PHPUnit 7,因为它与 PHP 7.1 兼容
有 3 个测试命令
make test
从 PHP 7.1 运行到 7.4 的完整测试套件make test-fast
运行 PHP 7 测试make test-coverage
在./coverage
生成 html 测试覆盖率报告