{"id":21194471,"url":"https://github.com/cspray/amp-phpunit10-example","last_synced_at":"2025-10-09T19:18:16.367Z","repository":{"id":143070780,"uuid":"605276606","full_name":"cspray/amp-phpunit10-example","owner":"cspray","description":"An example showing PHPUnit 10 Extension eating exceptions in Revolt EventLoop","archived":false,"fork":false,"pushed_at":"2023-03-05T22:04:48.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T19:18:15.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cspray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"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}},"created_at":"2023-02-22T20:27:57.000Z","updated_at":"2023-02-22T20:28:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6ae0b20-72bf-429e-9097-f18b377625e9","html_url":"https://github.com/cspray/amp-phpunit10-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cspray/amp-phpunit10-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cspray%2Famp-phpunit10-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cspray%2Famp-phpunit10-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cspray%2Famp-phpunit10-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cspray%2Famp-phpunit10-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cspray","download_url":"https://codeload.github.com/cspray/amp-phpunit10-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cspray%2Famp-phpunit10-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001984,"owners_count":26083243,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-20T19:22:26.289Z","updated_at":"2025-10-09T19:18:16.362Z","avatar_url":"https://github.com/cspray.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amp PHPUnit 10 Extension Example\n\nThis example shows the Extension system in PHPUnit 10 eating thrown exceptions, allowing for tests to pass when in reality \nthe EventLoop crashed with an unhandled exception.\n\n## Installation\n\nThis repo is not meant to be a package installed through Packagist. Please clone this repo using git if you'd like to run \nit.\n\n## Usage\n\nIf you invoke this test case directly, without setting any environment variables, you will see that it passes.\n\n```\n$\u003e ./vendor/bin/phpunit\nPHPUnit 10.0.11 by Sebastian Bergmann and contributors.\n\nRuntime:       PHP 8.2.3\nConfiguration: /home/cspray/Code/personal/amp-phpunit10-example/phpunit.xml\n\n.                                                                   1 / 1 (100%)\n\nTime: 00:00.005, Memory: 8.00 MB\n\nOK (1 test, 1 assertion)\n```\n\nIf you invoke this test passing in the environment variable `EXIT_ON_EXCEPTION=1` you will see that the Extension \nexperienced an exception that was eaten in the original test run.\n\n```\n$\u003e EXIT_ON_EXCEPTION=1 ./vendor/bin/phpunit\nPHPUnit 10.0.11 by Sebastian Bergmann and contributors.\n\nRuntime:       PHP 8.2.3\nConfiguration: /home/cspray/Code/personal/amp-phpunit10-example/phpunit.xml\n\nUncaught RuntimeException thrown in event loop callback Cspray\\PhpUnit10Example\\ExampleTest::Cspray\\PhpUnit10Example\\{closure} defined in /home/cspray/Code/personal/amp-phpunit10-example/tests/ExampleTest.php:12; use Revolt\\EventLoop::setErrorHandler() to gracefully handle such exceptions: Threw exception in EventLoop\n```\n\nThis spike is meant to demonstrate that the new PHPUnit 10 Extension system is not suitable for the next version of AsyncTestCase.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcspray%2Famp-phpunit10-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcspray%2Famp-phpunit10-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcspray%2Famp-phpunit10-example/lists"}