-
Notifications
You must be signed in to change notification settings - Fork 264
Fix code quality issues in ResponseTest.php #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Auto enable SSR based on existence of SSR bundle * Terminate SSR node process when PHP process dies * Add missing comma
) * Add pcntl to requirements * Move ext-pcntl to suggest and add check to StartSsr command * Tweak `ext-pcntl` suggestion message * Update `inertia:start-ssr` command to only use `pcntl` when it's available Co-authored-by: Jonathan Reinink <[email protected]>
Add PHP 8.3 support
Automatically update Facade docblocks
Restore request and session on redirects
* Add option for using the bun js runtime * Tweak wording --------- Co-authored-by: Jonathan Reinink <[email protected]>
[2.x] Restore `testing.page_paths` and `testing.page_extensions` configs
GitHub issue template
update return type in Middleware share method
Fix project name in `SECURITY.md`
[2.x] Remove old version checks
Improved the docblock for the inertia function, which will now be better processed by tools such as PHPStan. A similar structure is used, for example, in the response function in Laravel’s core framework.
[2.x] Improve inertia helper docblock
[2.x] Introduce `ProvidesInertiaProp` interface
[2.x] Introduce ProvidesInertiaProps interface
- Fix PHPStan type errors: Change return types from Collection to array for ProvidesInertiaProperties - Replace deprecated LazyProp with OptionalProp (5 instances + import) - Fix Symfony Request constant reference using fully qualified name - Refactor Mockery to use Laravel testbench pattern with $this->mock() - Clean up unused imports
8e81a79
to
959d16e
Compare
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves multiple code quality issues in
ResponseTest.php
identified by PHPStan static analysis and IDE diagnostics. All changes are internal test improvements that maintain 100% backward compatibility.Problem Solved
ProvidesInertiaProperties
LazyProp
(deprecated in favor ofOptionalProp
)Changes Made
PHPStan Type Fixes
Collection<string, string>
toarray<string, mixed>
Deprecated API Replacement
LazyProp
withOptionalProp
(5 instances + import)Testing Pattern Consistency
Mockery::mock()
to Laravel testbench$this->mock()
patternCheckSsrTest.php
)Minor Fixes
Why This Matters
For Contributors: Eliminates distracting IDE warnings that can mask real issues during development
For Maintainers: Resolves static analysis errors and removes deprecated API usage before breaking changes
For Code Quality: Ensures consistent testing patterns and adherence to type contracts
Compatibility & Testing
OK (160 tests, 664 assertions)
)[OK] No errors
(was 2 errors)