{"id":15014393,"url":"https://github.com/eliashaeussler/phpunit-attributes","last_synced_at":"2026-03-07T22:11:00.545Z","repository":{"id":253670612,"uuid":"844119529","full_name":"eliashaeussler/phpunit-attributes","owner":"eliashaeussler","description":"🧙 Additional attributes for tests with PHPUnit","archived":false,"fork":false,"pushed_at":"2026-02-27T09:50:24.000Z","size":705,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-27T12:16:46.079Z","etag":null,"topics":["attributes","php","phpunit","test","testing","unit"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eliashaeussler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["eliashaeussler"],"custom":["https://paypal.me/eliashaeussler"]}},"created_at":"2024-08-18T12:52:33.000Z","updated_at":"2026-02-27T05:37:08.000Z","dependencies_parsed_at":"2024-08-26T08:26:31.233Z","dependency_job_id":"5c3dc095-a591-4acf-a147-9e8bddd8dc7d","html_url":"https://github.com/eliashaeussler/phpunit-attributes","commit_stats":{"total_commits":51,"total_committers":2,"mean_commits":25.5,"dds":0.4117647058823529,"last_synced_commit":"1b0ed434bb98337ab2df35861688c84b7cba6ff6"},"previous_names":["eliashaeussler/phpunit-attributes"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/eliashaeussler/phpunit-attributes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliashaeussler%2Fphpunit-attributes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliashaeussler%2Fphpunit-attributes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliashaeussler%2Fphpunit-attributes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliashaeussler%2Fphpunit-attributes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eliashaeussler","download_url":"https://codeload.github.com/eliashaeussler/phpunit-attributes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliashaeussler%2Fphpunit-attributes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30233432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attributes","php","phpunit","test","testing","unit"],"created_at":"2024-09-24T19:45:34.708Z","updated_at":"2026-03-07T22:11:00.495Z","avatar_url":"https://github.com/eliashaeussler.png","language":"PHP","funding_links":["https://github.com/sponsors/eliashaeussler","https://paypal.me/eliashaeussler"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# PHPUnit Attributes\n\n[![Coverage](https://img.shields.io/coverallsCoverage/github/eliashaeussler/phpunit-attributes?logo=coveralls)](https://coveralls.io/github/eliashaeussler/phpunit-attributes)\n[![Maintainability](https://img.shields.io/codeclimate/maintainability/eliashaeussler/phpunit-attributes?logo=codeclimate)](https://codeclimate.com/github/eliashaeussler/phpunit-attributes/maintainability)\n[![CGL](https://img.shields.io/github/actions/workflow/status/eliashaeussler/phpunit-attributes/cgl.yaml?label=cgl\u0026logo=github)](https://github.com/eliashaeussler/phpunit-attributes/actions/workflows/cgl.yaml)\n[![Tests](https://img.shields.io/github/actions/workflow/status/eliashaeussler/phpunit-attributes/tests.yaml?label=tests\u0026logo=github)](https://github.com/eliashaeussler/phpunit-attributes/actions/workflows/tests.yaml)\n[![Supported PHP Versions](https://img.shields.io/packagist/dependency-v/eliashaeussler/phpunit-attributes/php?logo=php)](https://packagist.org/packages/eliashaeussler/phpunit-attributes)\n\n\u003c/div\u003e\n\nA Composer library with additional attributes to enhance testing with PHPUnit.\n\n## 🔥 Installation\n\n[![Packagist](https://img.shields.io/packagist/v/eliashaeussler/phpunit-attributes?label=version\u0026logo=packagist)](https://packagist.org/packages/eliashaeussler/phpunit-attributes)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/eliashaeussler/phpunit-attributes?color=brightgreen)](https://packagist.org/packages/eliashaeussler/phpunit-attributes)\n\n```bash\ncomposer require --dev eliashaeussler/phpunit-attributes\n```\n\n## ⚡ Usage\n\nThe library ships with a ready-to-use PHPUnit extension. It must be registered\nin your PHPUnit configuration file:\n\n```diff\n \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003cphpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:noNamespaceSchemaLocation=\"vendor/phpunit/phpunit/phpunit.xsd\"\n          bootstrap=\"vendor/autoload.php\"\n \u003e\n+    \u003cextensions\u003e\n+        \u003cbootstrap class=\"EliasHaeussler\\PHPUnitAttributes\\PHPUnitAttributesExtension\" /\u003e\n+    \u003c/extensions\u003e\n     \u003ctestsuites\u003e\n         \u003ctestsuite name=\"unit\"\u003e\n             \u003cdirectory\u003etests\u003c/directory\u003e\n         \u003c/testsuite\u003e\n     \u003c/testsuites\u003e\n     \u003csource\u003e\n         \u003cinclude\u003e\n             \u003cdirectory\u003esrc\u003c/directory\u003e\n         \u003c/include\u003e\n     \u003c/source\u003e\n \u003c/phpunit\u003e\n```\n\nSome attributes can be configured with custom extension parameters. These must\nbe added to the extension registration section like follows:\n\n```diff\n     \u003cextensions\u003e\n-        \u003cbootstrap class=\"EliasHaeussler\\PHPUnitAttributes\\PHPUnitAttributesExtension\" /\u003e\n+        \u003cbootstrap class=\"EliasHaeussler\\PHPUnitAttributes\\PHPUnitAttributesExtension\"\u003e\n+            \u003cparameter name=\"fancyParameterName\" value=\"fancyParameterValue\" /\u003e\n+        \u003c/bootstrap\u003e\n     \u003c/extensions\u003e\n```\n\n## 🎢 Attributes\n\nThe following attributes are shipped with this library:\n\n### PHP class\n\n* [`#[ForbidsClass]`](docs/attributes/forbids-class.md)\n* [`#[RequiresClass]`](docs/attributes/requires-class.md)\n\n### PHP constant\n\n* [`#[ForbidsConstant]`](docs/attributes/forbids-constant.md)\n* [`#[RequiresConstant]`](docs/attributes/requires-constant.md)\n\n### Composer package\n\n* [`#[ForbidsPackage]`](docs/attributes/forbids-package.md)\n* [`#[RequiresPackage]`](docs/attributes/requires-package.md)\n\n### Environment\n\n* [`#[ForbidsEnv]`](docs/attributes/forbids-env.md)\n* [`#[RequiresEnv]`](docs/attributes/requires-env.md)\n\n## 🧑‍💻 Contributing\n\nPlease have a look at [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\n## ⭐ License\n\nThis project is licensed under [GNU General Public License 3.0 (or later)](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliashaeussler%2Fphpunit-attributes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliashaeussler%2Fphpunit-attributes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliashaeussler%2Fphpunit-attributes/lists"}