Skip to content

Commit

Permalink
Document the --memory-limit setting
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Sep 4, 2019
1 parent 944412b commit adbee1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ADDED:

- Support for preloading for PHP 7.4+
- Support for property injection based on property type declarations
- Support for setting the memory limit

CHANGED:

Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,14 @@ by default.
$container = new Container();
```

Besides from the CLI, you can also build the Container from PHP itself:
In case of very big projects, you might run out of memory when building the container. You can circumvent this issue by manually
setting the memory limit:

```bash
./vendor/bin/zen --memory-limit="128M" build /var/www/app/Container/Container.php "App\\Container\\CompilerConfig"
```

Besides via the CLI, you can also build the Container via PHP itself:

```php
$builder = new FileSystemContainerBuilder(new CompilerConfig(), "/var/www/src/Container/CompiledContainer.php");
Expand Down

0 comments on commit adbee1e

Please sign in to comment.