Easy to use http-client with fluent api.
Run the tests directly with PHP 8.5, Composer 2 and the PHP extensions curl,
dom, mbstring, xml, xmlwriter and yaml:
composer install
composer testThe test bootstrap starts PHP's built-in web server on a free local port and stops it after the tests. No Kickstart, Docker or separate web server is required. GitHub Actions uses the same command with PHP 8.5.
Test dependencies use stable PHPUnit 12.5 and phore/filesystem 1.x releases.
Known dependency deprecations are covered by phpunit-baseline.xml; new
deprecations fail the test run.
$response = phore_http_request("http://localhost/test.php?case=200")
->send();
echo $response->getBody();More executable examples are available in examples/.
Request Caching requires phore/cache package to be installed
$cache = new Cache(new ObjectStore(new FileSystemObjectStoreDriver("/tmp/cache1")));
$req = phore_http_request("http://localhost/")->withCache($cache)->send();
if ($req->isFromCache() === true)
echo "From Cache: " . $req->getBody();
Examples: see examples/ and examples/README.md.