Skip to content

Commit

Permalink
Add installation section
Browse files Browse the repository at this point in the history
  • Loading branch information
maks-rafalko authored May 3, 2024
1 parent afdc476 commit c083331
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c083331

Please sign in to comment.