From 3486a4937e8c72aefd1e1243274c745d3e8b8a7d Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Wed, 18 Nov 2026 09:24:21 +0400 Subject: [PATCH] chore(error-handler): publish the plugin as a split package The split workflow already listens for `error-handler-*` tags, but release-please never cut one because the package was missing from its config and manifest. The plugin also gets the mirror README and the workflow that closes pull requests opened against the read-only php-testo/error-handler repository. Assisted-By: Claude Opus 5.5 --- .github/.release-please-config.json | 6 +++ .../.github/workflows/close-prs.yml | 14 +++++++ plugin/error-handler/README.md | 41 +++++++++++++++++++ resources/version.json | 1 + 4 files changed, 62 insertions(+) create mode 100644 plugin/error-handler/.github/workflows/close-prs.yml create mode 100644 plugin/error-handler/README.md diff --git a/.github/.release-please-config.json b/.github/.release-please-config.json index a5a269f5..af7a02d1 100644 --- a/.github/.release-please-config.json +++ b/.github/.release-please-config.json @@ -95,6 +95,12 @@ "include-component-in-tag": true, "changelog-path": "CHANGELOG.md" }, + "plugin/error-handler": { + "package-name": "testo/error-handler", + "component": "error-handler", + "include-component-in-tag": true, + "changelog-path": "CHANGELOG.md" + }, "bridge/symfony-console": { "package-name": "testo/bridge-symfony-console", "component": "bridge-symfony-console", diff --git a/plugin/error-handler/.github/workflows/close-prs.yml b/plugin/error-handler/.github/workflows/close-prs.yml new file mode 100644 index 00000000..7640d59f --- /dev/null +++ b/plugin/error-handler/.github/workflows/close-prs.yml @@ -0,0 +1,14 @@ +name: Close PRs + +on: + pull_request_target: + types: [opened, reopened] + +permissions: + pull-requests: write + +jobs: + close: + uses: php-testo/gh-actions/.github/workflows/close-foreign-prs.yml@v1 + with: + upstream-url: https://github.com/php-testo/testo diff --git a/plugin/error-handler/README.md b/plugin/error-handler/README.md new file mode 100644 index 00000000..807db230 --- /dev/null +++ b/plugin/error-handler/README.md @@ -0,0 +1,41 @@ +

+ TESTO +

+ +

Error handler plugin

+ +
+ +[![Documentation](https://img.shields.io/badge/Documentation-blue?style=for-the-badge&logo=gitbook&logoColor=white)](https://php-testo.github.io) +[![Support on Boosty](https://img.shields.io/static/v1?style=for-the-badge&label=&message=Sponsorship&logo=Boosty&logoColor=white&color=%23F15F2C)](https://boosty.to/roxblnfk) + +
+ +
+ +> [!IMPORTANT] +> ## 🪞 This is a read-only mirror. +> +> Active development of the Testo project lives in [**php-testo/testo**](https://github.com/php-testo/testo) under `plugin/error-handler/`. This repository is **automatically synchronized** from there on every release. +> +> File issues and pull requests in the [main monorepo](https://github.com/php-testo/testo/issues), not here. + +## About + +Puts an error handler around every test and records the PHP warnings, notices and deprecations it raises on the test result, so they no longer scroll by while the test passes. Unhandled errors are printed to the stderr channel as PHP would print them, and with `failOnError` any captured error fails the test. + +A handler installed before the test, such as an application bootstrap, still runs first. A test that installs its own handler and leaves it in place is reported as Risky unless it declares the change with `#[ExpectErrorHandlerChange]`. + +## Install + +```bash +composer require --dev testo/error-handler +``` + +[![PHP](https://img.shields.io/packagist/php-v/testo/error-handler.svg?style=flat-square&logo=php)](https://packagist.org/packages/testo/error-handler) +[![Latest Version on Packagist](https://img.shields.io/packagist/v/testo/error-handler.svg?style=flat-square&logo=packagist)](https://packagist.org/packages/testo/error-handler) +[![License](https://img.shields.io/packagist/l/testo/error-handler.svg?style=flat-square)](https://github.com/php-testo/testo/blob/1.x/LICENSE.md) +[![Total Downloads](https://img.shields.io/packagist/dt/testo/error-handler.svg?style=flat-square)](https://packagist.org/packages/testo/error-handler/stats) diff --git a/resources/version.json b/resources/version.json index 18c83202..56811c8c 100644 --- a/resources/version.json +++ b/resources/version.json @@ -14,6 +14,7 @@ "plugin/facade": "0.1.1", "plugin/fiber": "0.1.3", "plugin/skip": "0.1.1", + "plugin/error-handler": "0.1.0", "bridge/double": "0.1.2", "bridge/symfony-console": "0.1.14", "bridge/infection": "0.1.9",