From c083331bc0cd1cd319ac1b7a08e3ad4a34aa7992 Mon Sep 17 00:00:00 2001 From: Maks Rafalko Date: Fri, 3 May 2024 23:48:06 +0200 Subject: [PATCH] Add installation section --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index d336e38..bdc9bcb 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,12 @@ It's a [Stream Wrapper](https://www.php.net/manual/en/book.stream.php) that wraps a [`file://`](https://www.php.net/manual/en/wrappers.file.php) protocol and allows overriding content of any (auto) loaded file, including files autoloaded by Composer package manager. +## Installation + +```bash +composer require infection/include-interceptor +``` + ## How it works If you want to replace the content of the file whenever it's loaded (by executing `include '/path/to/file.php`, by calling `file_get_contents('/path/to/file.php')`, etc.), you need to register `IncludeInterceptor` _before_ loading original file: