Skip to content

Commit f051037

Browse files
HedicGuibertondrejmirtes
authored andcommitted
Update README.md
1 parent c50afb8 commit f051037

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,22 @@ require __DIR__.'/../config/bootstrap.php';
9797
$kernel = new \App\Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
9898
return new \Symfony\Bundle\FrameworkBundle\Console\Application($kernel);
9999
```
100+
101+
You may then encounter an error with PhpParser:
102+
103+
```bash
104+
Compile Error: Cannot Declare interface PhpParser\NodeVisitor, because the name is already in use
105+
```
106+
107+
If this is the case, you should create a new environment for your application that will disable inlining. In `config/packages/phpstan_env/parameters.yaml`:
108+
109+
```yaml
110+
parameters:
111+
container.dumper.inline_class_loader: false
112+
```
113+
114+
Call the new env in your `console-application.php`:
115+
116+
```php
117+
$kernel = new \App\Kernel('phpstan_env', (bool) $_SERVER['APP_DEBUG']);
118+
```

0 commit comments

Comments
 (0)