{"repo":"ciareis/bypass","free":true,"listed":false,"github":"https://github.com/ciareis/bypass","clone":"git clone https://github.com/ciareis/bypass.git","description":"↪️ Bypass for PHP creates a custom HTTP Server to return predefined responses to client requests. Useful for tests with Pest PHP or PHPUnit.","language":"PHP","stars":120,"topics":["bypass-server","bypass-service","routes-bypass-serves","api","faker","api-faker"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Bypass for PHP About Requirements Installation Writing Tests API Reference Examples Troubleshooting Contributing Credits Inspired --- About Bypass for PHP provides a quick way to create a custom HTTP Server to return predefined responses to client requests. This is useful in tests when your application makes requests to external services, and you need to simulate different situations like returning specific data or unexpected server errors. Just open a Bypass server and configure your application/service to reach Bypass instead of the real-world API end point. --- Requirements - PHP : 8.2 or higher (tested up to PHP 8.4) - Composer : For dependency management Known Issues - PHP 8.4 : You may see deprecation warnings from testing dependencies (Pest/PHPUnit) related to ReflectionMethod::setAccessible() . These warnings are harmless and come from the testing frameworks themselves, not from Bypass. They will be resolved when the dependencies are updated to support PHP 8.4 fully. --- Installation To install via composer, run the following command: --- Video demo Pest and Bypass Writing Tests Content - Open Bypass Server - Bypass URL and Port - Routes - Standard Route - File Route - Bypass Serve and Route Helpers - Assert Route - Stop or shut down 🔥 Check out full code examples here section. 1. Open a Bypass Server To write a test, first open a Bypass server: Bypass will always run at http://localhost listening to a random port number. To specify a custom port, just pass it in the","default_branch":null,"files":null,"tree":[],"storefront":"/r/ciareis","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ciareis/bypass/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}