-
Notifications
You must be signed in to change notification settings - Fork 41
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
Improve exception handling and code consistency #128
Conversation
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.
Reviewed from mobile, might not catch all.
Lgtm. I'd love a code sniffer rule for the import of global classes Vs the \xxx
notation.
src/Codeception/Module/Yii2.php
Outdated
* Adds the required server params. | ||
* Note this is done separately from the request cycle since someone might call | ||
* `Url::to` before doing a request, which would instantiate the request component with incorrect server params. | ||
* @return array<string, mixed> |
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.
Isn't every value a string? We can be even more specific and use array shape.
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.
It should be, but it could be misconfigured.
Since it is possible to write any type of value in $this->config['entryScript'] and we are not validating the type of data received anywhere I get what you see in the screenshot.
I changed it to use array shape, I hope that's what you meant.
the port was returned manually as string, but from parse_url
it is returned as int, let me know if you prefer an explicit cast to string (string)
or if you are satisfied with string|int
.
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.
@samdark check please
98d570d
to
c43be6a
Compare
Will review soon, reminder: use conventional commit messages. https://www.conventionalcommits.org/en/v1.0.0/ Otherwise automated releases won't work. For now I can fix it in the merge commit message. |
5e0c782
to
f9da3fe
Compare
Overall cosmetic changes with a few changes for behavior that I see as good ones 👍 |
- Standardized `RuntimeException` usage by removing redundant namespace references. - Refactored `findAndLoginUser` for clarity using ternary assignment. - Used `readonly` property for `ignoreCollidingDSN` in `TransactionForcer`. - Optimized server params handling by introducing `getServerParams()`. - Improved configuration validation messages for clean and mail methods.
LGTM |
🎉 This PR is included in version 2.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.