Skip to content

Commit

Permalink
Merge pull request #557 from jolicode/doc-stub-phpstan
Browse files Browse the repository at this point in the history
Add some documentation about stubs and phpstan
  • Loading branch information
lyrixx authored Nov 5, 2024
2 parents 158b785 + 372a429 commit f43870d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,16 @@ classes and would not provide any autocompletion in your castor files.
We suggest you to add this file to your `.gitignore` to not version it in git.
Castor will automatically update this file the first time you run Castor after
you install or update it.

> [!TIP]
> If you want to analyze your tasks with PHPStan, you will need to make PHPStan
> aware of some classes and functions definitions from Castor and its dependencies.
> To achieve this, add the stubs file in the `scanFiles` section of your `phpstan.neon`
> configuration file:

```neon
parameters:
# ...
scanFiles:
- .castor.stub.php
```

0 comments on commit f43870d

Please sign in to comment.