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. |
| ->with('module', 'Vendor_Module') | ||
| ->willReturn('/long/path/to/Vendor/Module'); | ||
|
|
||
| $read = $this->createMock(Read::class); |
There was a problem hiding this comment.
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. |
Fixed. |
|
@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_ModuleCannot find a registered module with name "Vendor_Module"Contribution checklist (*)