{"id":15014449,"url":"https://github.com/mybuilder/phpunit-accelerator","last_synced_at":"2025-10-24T06:42:02.408Z","repository":{"id":14983929,"uuid":"17709118","full_name":"mybuilder/phpunit-accelerator","owner":"mybuilder","description":"Listeners to speed up PHPUnit tests","archived":false,"fork":false,"pushed_at":"2018-06-08T13:33:42.000Z","size":26,"stargazers_count":136,"open_issues_count":5,"forks_count":12,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-29T05:10:04.929Z","etag":null,"topics":["php","phpunit"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"avelino/awesome-go","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mybuilder.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":"2014-03-13T12:23:23.000Z","updated_at":"2025-01-29T19:38:11.000Z","dependencies_parsed_at":"2022-07-19T05:47:02.066Z","dependency_job_id":null,"html_url":"https://github.com/mybuilder/phpunit-accelerator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mybuilder%2Fphpunit-accelerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mybuilder%2Fphpunit-accelerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mybuilder%2Fphpunit-accelerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mybuilder%2Fphpunit-accelerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mybuilder","download_url":"https://codeload.github.com/mybuilder/phpunit-accelerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294541,"owners_count":20915340,"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":["php","phpunit"],"created_at":"2024-09-24T19:45:38.855Z","updated_at":"2025-10-24T06:42:02.340Z","avatar_url":"https://github.com/mybuilder.png","language":"PHP","readme":"# PHPUnit Accelerator\n\n[![Build Status](https://secure.travis-ci.org/mybuilder/phpunit-accelerator.svg?branch=master)](http://travis-ci.org/mybuilder/phpunit-accelerator)\n\nInspired by [Kris Wallsmith faster PHPUnit article](http://kriswallsmith.net/post/18029585104/faster-phpunit), we've created a [PHPUnit](http://phpunit.de) test listener that speeds up PHPUnit tests about 20% by freeing memory.\n\n## Installation\n\nTo install this library, run the command below and you will get the latest version\n\n``` bash\ncomposer require mybuilder/phpunit-accelerator --dev\n```\n\n## Usage\n\nJust add to your `phpunit.xml` configuration\n\n```xml\n\u003cphpunit\u003e\n    \u003clisteners\u003e\n        \u003clistener class=\"\\MyBuilder\\PhpunitAccelerator\\TestListener\"/\u003e\n    \u003c/listeners\u003e\n\u003c/phpunit\u003e\n```\n\n### Ignoring Tests\n\nSometimes it is necessary to ignore specific tests, where freeing their properties is undesired. For this use case, you have the ability to *extend the behaviour* of the listener by implementing the `IgnoreTestPolicy` interface.\n\nAs an example, if we hypothetically wanted to ignore all tests which include \"Legacy\" in their test filename, we could create a custom ignore policy as follows\n\n```php\n\u003c?php\n\nuse MyBuilder\\PhpunitAccelerator\\IgnoreTestPolicy;\n\nclass IgnoreLegacyTestPolicy implements IgnoreTestPolicy {\n    public function shouldIgnore(\\ReflectionObject $testReflection) {\n        return strpos($testReflection-\u003egetFilename(), 'Legacy') !== false;\n    }\n}\n```\n\nAnd pass it to the constructor of our test listener in `phpunit.xml` configuration\n\n```xml\n\u003cphpunit\u003e\n    \u003clisteners\u003e\n        \u003clistener class=\"\\MyBuilder\\PhpunitAccelerator\\TestListener\"\u003e\n            \u003carguments\u003e\n                \u003cobject class=\"\\IgnoreLegacyTestPolicy\"/\u003e\n            \u003c/arguments\u003e\n        \u003c/listener\u003e\n    \u003c/listeners\u003e\n\u003c/phpunit\u003e\n```\n\n---\n\nCreated by [MyBuilder](http://www.mybuilder.com/) - Check out our [blog](http://tech.mybuilder.com/) for more insight into this and other open-source projects we release.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmybuilder%2Fphpunit-accelerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmybuilder%2Fphpunit-accelerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmybuilder%2Fphpunit-accelerator/lists"}