Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Jun 16, 2024
1 parent b2a5685 commit 7a3aa4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ potentially very difficult to debug due to dissimilar or unsupported package ver
- [Usage](#usage)
- [Configuration](docs/configuration.md#configuration)
- [Prefix](docs/configuration.md#prefix)
- [PHP Version](docs/configuration.md#php-version)
- [Output directory](docs/configuration.md#output-directory)
- [Finders and paths](docs/configuration.md#finders-and-paths)
- [Patchers](docs/configuration.md#patchers)
Expand Down
12 changes: 12 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Configuration

- [Prefix](#prefix)
- [PHP-Version](#php-version)
- [Output directory](#output-directory)
- [Finders and paths](#finders-and-paths)
- [Patchers](#patchers)
Expand Down Expand Up @@ -28,6 +29,7 @@ use Isolated\Symfony\Component\Finder\Finder;

return [
'prefix' => null, // string|null
'php-version' => null, // string|null
'output-dir' => null, // string|null
'finders' => [], // list<Finder>
'patchers' => [], // list<callable(string $filePath, string $prefix, string $contents): string>
Expand Down Expand Up @@ -56,6 +58,15 @@ The prefix to be used to isolate the code. If `null` or `''` (empty string) is g
then a random prefix will be automatically generated.


### PHP Version

The PHP version provided is used to configure the underlying [PHP-Parser] Parser and Printer. This will not affect
the PHP internal symbols used by PHP-Scoper but may affect what code can be parsed and how the code will be printed.

If `null` or `''` (empty string) is given, then the host version will be used, i.e. executing it with PHP 8.4 will
result in PHP 8.4 being used as the PHP version.


### Output directory

The base output directory where the prefixed files will be generated. If `null`
Expand Down Expand Up @@ -476,5 +487,6 @@ namespace Humbug\Acme;

[box]: https://github.com/box-project/box
[php-scoper-integration]: https://github.com/humbug/box#isolating-the-phar
[PHP-Parser]: https://github.com/nikic/PHP-Parser
[phpstorm-stubs]: https://github.com/JetBrains/phpstorm-stubs
[symfony_finder]: https://symfony.com/doc/current/components/finder.html

0 comments on commit 7a3aa4d

Please sign in to comment.