packagefactory/component-engine 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

packagefactory/component-engine

最新稳定版本:1.0.0-alpha4

Composer 安装命令:

composer require packagefactory/component-engine

包简介

Universal View Components for PHP

README 文档

README

Development

For common automated development tasks, the repository contains several scripts which can be run via:

./scripts/{script-name}
script-namedescription
lintRun code style checks with PHP_CodeSniffer
analyseRun static code analysis with phpstan
benchmarkRun benchmarks with phpbench
build Build LALR(1) parser files with PackageFactory.Grammar
testRun tests with phpunit
behatRun behavior tests with behat

Running unit tests

There's a test suite for unit tests and another one for grammar tests. By default only the unit test suite is run, because the grammar test suite is quite large and only needs to be run, if there have been changes to the grammar.

If you wish to run the grammar test suite separately, you can use:

./scripts/test --testsuite grammar

If you wish to run all tests, use:

./scripts/test --testsuite all

Running behavior tests

To test the end-to-end behavior of the PHP component engine implementation, run:

./scripts/behat

Running Benchmarks

When developing a performance-critical feature, you can track the performance impact by first taking a benchmark snapshot before starting development:

time ./scripts/benchmark --tag=before.my_feature --retry-threshold=5 --iterations=10

The --tag parameter instructs phpbench to save the snapshot under the identifier before.my_feature.

When your feature is finished, you can run the benchmarks again, while comparing them against the snapshot:

time ./scripts/benchmark --ref=before.my_feature --retry-threshold=5 --iterations=10

The --ref parameter instructs phpbench to compare the results with the given snapshot.

phpbench will highlight significant changes in performance. You need not worry about small percentage deltas, but significant drops (like +20%) are worth having a closer look at.

License

see LICENSE

统计信息

  • 总下载量: 33
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2025-11-02