{"id":24609529,"url":"https://github.com/genkiroid/phpunit-filter-blocker","last_synced_at":"2025-05-05T23:45:47.772Z","repository":{"id":62509981,"uuid":"240895224","full_name":"genkiroid/phpunit-filter-blocker","owner":"genkiroid","description":"PHPUnitFilterBlocker is custom implementation of PHPUnit Framework TestListener.","archived":false,"fork":false,"pushed_at":"2023-01-28T01:16:09.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T03:01:55.016Z","etag":null,"topics":["phpunit","phpunit-listener"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/genkiroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-16T13:20:08.000Z","updated_at":"2020-02-19T06:52:58.000Z","dependencies_parsed_at":"2023-02-15T13:45:48.702Z","dependency_job_id":null,"html_url":"https://github.com/genkiroid/phpunit-filter-blocker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fphpunit-filter-blocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fphpunit-filter-blocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fphpunit-filter-blocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fphpunit-filter-blocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genkiroid","download_url":"https://codeload.github.com/genkiroid/phpunit-filter-blocker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596328,"owners_count":21773842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["phpunit","phpunit-listener"],"created_at":"2025-01-24T18:15:01.437Z","updated_at":"2025-05-05T23:45:47.752Z","avatar_url":"https://github.com/genkiroid.png","language":"PHP","readme":"# PHPUnitFilterBlocker\n\nPHPUnitFilterBlocker is custom implementation of PHPUnit Framework TestListener. It mainly blocks PHPUnit's filter option to prevent misconfiguration in CI.\n\n![CI](https://github.com/genkiroid/phpunit-filter-blocker/workflows/CI/badge.svg?branch=master)\n\n## Installation\n\n```\n$ composer require genkiroid/phpunit-filter-blocker\n```\n\n## Settings\n\nTo attach PHPUnitFilterBlocker as test listener, add following element to phpunit.xml. (Parent element is `\u003cphpunit\u003e`.)\n\n```xml\n\u003clisteners\u003e\n    \u003clistener class=\"PHPUnitFilterBlocker\\Listener\"\u003e\n        \u003carguments\u003e\n            \u003carray\u003e\n                \u003celement key=\"blockGroup\"\u003e\n                    \u003cboolean\u003efalse\u003c/boolean\u003e\n                \u003c/element\u003e\n                \u003celement key=\"blockExcludeGroup\"\u003e\n                    \u003cboolean\u003efalse\u003c/boolean\u003e\n                \u003c/element\u003e\n            \u003c/array\u003e\n        \u003c/arguments\u003e\n    \u003c/listener\u003e\n\u003c/listeners\u003e\n```\n\nIf you want to block `--group` and `--exclude-group` options too, change `false` to `true` setting value above.\n\n## About blocking\n\nBlock test case specification. (Fixed)\n```\n$ vendor/bin/phpunit tests/exampleTest.php\nPHPUnit 9.0.1 by Sebastian Bergmann and contributors.\n\nTest case specification has been disabled by phpunit-filter-blocker. Stopped phpunit.\n```\n\nBlock `--filter` option. (Fixed)\n```\n$ vendor/bin/phpunit tests/ --filter=\"Hello\"\nPHPUnit 9.0.1 by Sebastian Bergmann and contributors.\n\n--filter option has been disabled by phpunit-filter-blocker. Stopped phpunit.\n```\n\nBlock `--group` option. (Option)\n```\n$ vendor/bin/phpunit tests/ --group=hello\nPHPUnit 9.0.1 by Sebastian Bergmann and contributors.\n\n--group option has been disabled by phpunit-filter-blocker. Stopped phpunit.\n```\n\nBlock `--exclude-group` option. (Option)\n```\n$ vendor/bin/phpunit tests/ --exclude-group=hello\nPHPUnit 9.0.1 by Sebastian Bergmann and contributors.\n\n--exclude-group option has been disabled by phpunit-filter-blocker. Stopped phpunit.\n```\n\nNo blocking example.\n```\n$ vendor/bin/phpunit tests/\nPHPUnit 9.0.1 by Sebastian Bergmann and contributors.\n\n..                                                                  2 / 2 (100%)\n\nTime: 83 ms, Memory: 6.00 MB\n\nOK (2 tests, 2 assertions)\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenkiroid%2Fphpunit-filter-blocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenkiroid%2Fphpunit-filter-blocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenkiroid%2Fphpunit-filter-blocker/lists"}