-
Notifications
You must be signed in to change notification settings - Fork 775
Replace placeholder "name" with "subject" #1569
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
Replace placeholder "name" with "subject" #1569
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1569 +/- ##
=========================================
Coverage 97.48% 97.48%
Complexity 987 987
=========================================
Files 205 205
Lines 2227 2227
=========================================
Hits 2171 2171
Misses 56 56 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @henriquemoody, can I ask Copilot to do a review here? It is often good at catching possible small details in large diff PRs. |
There was a problem hiding this 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 pull request replaces the placeholder {{name}} with {{subject}} across the validation library. The change aims to make the placeholder more generic and descriptive, as it can represent different things depending on the validation context (validated input, custom validator name, etc.).
Key Changes:
- Updated all validation rule template messages to use
{{subject}}instead of{{name}} - Modified the core message rendering system to provide the
subjectparameter - Updated documentation to reflect the new placeholder naming
Reviewed changes
Copilot reviewed 300 out of 321 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| library/Message/InterpolationRenderer.php | Updates parameter name from 'name' to 'subject' in the rendering context |
| library/Rules/*.php (multiple files) | Replaces {{name}} with {{subject}} in validation template messages across all rule classes |
| docs/rules/*.md (multiple files) | Updates documentation tables to show {{subject}} instead of {{name}} in template examples and placeholder descriptions |
| docs/07-custom-rules.md | Updates custom rule example to use {{subject}} placeholder |
| docs/05-message-placeholder-conversion.md | Updates documentation explaining parameter stringification behavior |
| docs/03-handling-exceptions.md | Updates exception handling example to use {{subject}} |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Good idea, @alganet! What do you think about this renaming? It's quite a big change |
|
@henriquemoody I like it, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 300 out of 321 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The `{{name}}` placeholder could represent different things depending on
the state of the Result, and referring to it as `{{name}}` seems
arbitrary. This commit changes it to `{{subject}}`, which is much more
generic and it describes well what that placeholder can mean.
2fc334d to
4840527
Compare
The
{{name}}placeholder could represent different things depending on the state of the Result, and referring to it as{{name}}seems arbitrary. This commit changes it to{{subject}}, which is much more generic and it describes well what that placeholder can mean.