-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix #27523: throw informative errors in setup:db:generate-patch #27579
Fix #27523: throw informative errors in setup:db:generate-patch #27579
Conversation
Hi @korostii. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
app/code/Magento/Developer/Test/Unit/Console/Command/GeneratePatchCommandTest.php
Outdated
Show resolved
Hide resolved
app/code/Magento/Developer/Test/Unit/Console/Command/GeneratePatchCommandTest.php
Outdated
Show resolved
Hide resolved
app/code/Magento/Developer/Test/Unit/Console/Command/GeneratePatchCommandTest.php
Outdated
Show resolved
Hide resolved
app/code/Magento/Developer/Test/Unit/Console/Command/GeneratePatchCommandTest.php
Outdated
Show resolved
Hide resolved
->with('module', 'Vendor_Module') | ||
->willReturn('/long/path/to/Vendor/Module'); | ||
|
||
$read = $this->createMock(Read::class); |
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.
Hi @korostii. Thank you for fixing the issues mentioned earlier. There was a comment from me regarding suffixing mock properties with Mock suffix. The same applies to the variables. This suffix improves code readability by letting know straight away what object we are working on mock or a real instance.
Just a recommendation for the future 😉
Hi @rogyar, thank you for the review. |
@magento run all tests |
Hi @sidolov, thank you for the review. |
Hi @korostii, thank you for your contribution! |
Description (*)
In most cases, if there is indeed a write permission issue, the error does show the complete path to directory which cannot be created:
However, if the requested module does not exist, the console command will compile an invalid(incomplete) target path and will show a rather cryptic error message:
Fixed Issues (if relevant)
Manual testing scenarios (*)
php bin/magento setup:db-declaration:generate-patch Vendor_Module SomePatch
, while there isn't any registered modules with name matchingVendor_Module
Cannot find a registered module with name "Vendor_Module"
Contribution checklist (*)