Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/provokateurin/php-stubs-updater
Update your PHP stubs for Psalm and PHPStan
https://github.com/provokateurin/php-stubs-updater
Last synced: 7 days ago
JSON representation
Update your PHP stubs for Psalm and PHPStan
- Host: GitHub
- URL: https://github.com/provokateurin/php-stubs-updater
- Owner: provokateurin
- Created: 2024-09-15T14:45:25.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-21T11:04:12.000Z (3 months ago)
- Last Synced: 2024-12-08T06:07:36.420Z (15 days ago)
- Language: PHP
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP-Stubs-Generator
*Update your PHP stubs for Psalm and PHPStan.*
## Usage
1. Create a folder to store your stubs (e.g. `tests/stubs`)
2. Create empty files (inside your stubs folder) for the stubs you need following this pattern: `Some\Namespace\SomeClass` =>
`some_namespace_someclass.php`.
3. Collect the list of folders that contain PHP files you need stubs for. Make sure to make this as specific as possible
to reduce the time needed to update the stubs.
4. Run `update-stubs.php tests/stubs folder1 folder2 ...`### Creating empty stub files
Instead of manually creating the empty stub files manually you can use `generate-empty-psalm-stubs.php` after adding all the stub entries to your psalm.xml.
All missing stub files will be created with empty content.