Commit 6cad491
feat: Add PHPStan type testing (#970)
* feat: add PHPStan type checking configuration and composer script
Add PHPStan configuration for type assertion testing and a new composer script for running type checks. This includes:
- New phpstan.types.neon.dist configuration file for type checking
- New types/ directory with helper function type assertions
- New composer script 'check:types' for running type analysis
This enhancement allows developers to validate type assertions for helper functions and ensure type safety across the codebase.
* Add comprehensive PHPStan type tests for all helper functions (#971)
* Initial plan
* feat: add comprehensive type tests for all helper functions
Co-authored-by: huangdijia <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: huangdijia <[email protected]>
* Move call() tests to Functions.php and update type assertions
Deleted Command/Functions.php and moved its call() tests to Helpers/Functions.php. Updated type assertions and test cases in Helpers/Functions.php for improved accuracy and consistency with current return types.
Co-Authored-By: Deeka Wong <[email protected]>
* fix: remove unnecessary backslash from Throwable type hint in dispatch job
* refactor: rename check:types script to type-testing for clarity
* fix: move type-testing script to the correct position in composer.json
* fix: remove unnecessary blank line before type-testing script in composer.json
* feat: add Support.php with various utility classes and type assertions
* fix: add return type hints for __invoke methods in ClientBuilderFactory and HubFactory
* feat: add PHPStan type assertion tests for macros component (#973)
* Initial plan
* feat: add type assertion tests for macros component
Co-authored-by: huangdijia <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: huangdijia <[email protected]>
* feat: add PHPStan type testing for cache component (#972)
* Initial plan
* feat: add comprehensive type testing for cache component
Co-authored-by: huangdijia <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: huangdijia <[email protected]>
* fix: remove unused imports in Cache and Macros components
* feat: update PHPStan configuration and enhance type assertions in various components
* fix: update parameter type hint for Str::of method
* fix: remove unused Factory method tests in Cache Manager
* feat: add type testing step in CI workflow
* fix: comment out unused setMultiple tests in Repository
* fix: comment out unused getMultiple tests in Repository
---------
Co-authored-by: Deeka Wong <[email protected]>
Co-authored-by: Copilot <[email protected]>1 parent bd70f66 commit 6cad491
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments