Skip to content

Conversation

@pirs1337
Copy link
Contributor

@pirs1337 pirs1337 commented Nov 4, 2025

refs: #206

@pirs1337 pirs1337 self-assigned this Nov 4, 2025
@pirs1337 pirs1337 assigned DenTray and unassigned pirs1337 Nov 4, 2025
@DenTray DenTray requested a review from Copilot November 5, 2025 03:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR standardizes the order of Laravel validation rules by placing the required rule at the beginning of the rule chain. The change affects both the validation rule generation logic and the expected test fixture outputs.

Key changes:

  • Modified the getRules() method to use array_unshift() to prepend 'required' instead of appending it
  • Updated getSearchValidationParameters() to pass true for $requiredAvailable parameter and reordered the array parameter assignment
  • Updated all test fixtures to reflect the new validation rule ordering

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Generators/RequestsGenerator.php Changed rule generation to prepend 'required' and enabled required validation for search requests
tests/fixtures/RequestGeneratorTest/update_request.php Updated test fixture with reordered validation rules
tests/fixtures/RequestGeneratorTest/search_request.php Updated test fixture with reordered validation rules and reordered array definition
tests/fixtures/RequestGeneratorTest/get_request.php Updated test fixture with reordered validation rules
tests/fixtures/RequestGeneratorTest/create_request.php Updated test fixture with reordered validation rules
tests/fixtures/CommandTest/search_request_subfolder_model.php Updated test fixture with reordered validation rules and reordered array definition
tests/fixtures/CommandTest/search_request.php Updated test fixture with reordered validation rules and reordered array definition
tests/fixtures/CommandTest/get_request.php Updated test fixture with reordered validation rules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DenTray DenTray merged commit 131fd8e into master Nov 5, 2025
10 checks passed
@DenTray DenTray deleted the 206_correct_rules_generation branch November 5, 2025 03:49
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.

3 participants