Skip to content

Fix dynamic request resolution#226

Draft
roncodes wants to merge 1 commit into
mainfrom
fix/http-request-resolution
Draft

Fix dynamic request resolution#226
roncodes wants to merge 1 commit into
mainfrom
fix/http-request-resolution

Conversation

@roncodes

@roncodes roncodes commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix dynamic FormRequest resolution for CRUD models by avoiding a duplicated namespace separator.
  • Add regression coverage for create/update request resolution and the FleetbaseRequest fallback path.

Root cause

Find::httpRequestForModel() built action-specific request class names by appending an extra namespace separator even though the request namespace already ended with one. That produced malformed class names such as ...\Http\Requests\\UpdateAssetRequest, causing class lookup to fail and validation to fall back to the generic Fleetbase request.

Validation

  • ./vendor/bin/pest tests/Unit/FindHttpRequestForModelTest.php --colors=always
  • ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff src/Support/Find.php tests/Unit/FindHttpRequestForModelTest.php tests/Fixtures/Models/AssetValidationRecord.php tests/Fixtures/Models/MissingRequestRecord.php tests/Fixtures/Http/Requests/CreateAssetValidationRecordRequest.php tests/Fixtures/Http/Requests/UpdateAssetValidationRecordRequest.php

composer test:unit is still blocked by the existing missing Tests\TestCase issue in tests/Unit/Reporting/ComputedColumnValidatorTest.php.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant