testflowlabs/test-attributes
Composer 安装命令:
composer require testflowlabs/test-attributes
包简介
PHP 8 attributes for testing - BDD steps and test traceability
README 文档
README
PHP 8 attributes for testing - BDD steps and test traceability
Lightweight PHP 8 attributes for use with testing plugins.
Installation
composer require testflowlabs/test-attributes
Attributes
| Attribute | Target | Purpose | Used By |
|---|---|---|---|
#[Given] |
Method/Function | BDD step - Arrange | testflowlabs/pest-plugin-bdd |
#[When] |
Method/Function | BDD step - Act | testflowlabs/pest-plugin-bdd |
#[Then] |
Method/Function | BDD step - Assert | testflowlabs/pest-plugin-bdd |
#[TestedBy] |
Method | Mark production method as tested by specific test | testflowlabs/testlink |
#[Links] |
Method | Link test to production code (traceability only) | testflowlabs/testlink |
#[LinksAndCovers] |
Method | Link test to production code + coverage | testflowlabs/testlink |
All attributes are repeatable.
Why Separate Package?
This package is a production dependency, while testing plugins remain dev dependencies.
{
"require": {
"testflowlabs/test-attributes": "^1.0"
},
"require-dev": {
"testflowlabs/pest-plugin-bdd": "^0.1",
"testflowlabs/testlink": "^0.1"
}
}
This allows annotating code with attributes without pulling in test runners.
License
MIT License. See LICENSE for details.
testflowlabs/test-attributes 适用场景与选型建议
testflowlabs/test-attributes 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 164 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 12 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「BDD」 「attributes」 「coverage」 「traceability」 「test-attributes」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 testflowlabs/test-attributes 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 testflowlabs/test-attributes 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 testflowlabs/test-attributes 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Helper that decorates any SUS with a phpspec lazy object wrapper
Behat Context for testing Symfony Api
Provides access to magento2 object manager from behat and allows to change magento config settings temporarly
A library that allows you to easily use the PHP-VCR library in your PHPUnit tests.
This Package provides some usefully console features like the attribute syntax for arguments and options, validation, auto ask and casting.
Specification-oriented BDD helpers for PHPUnit
统计信息
- 总下载量: 164
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 20
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-03