-
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
setup:di:compile returns exit code 0 if errors are found #7780
setup:di:compile returns exit code 0 if errors are found #7780
Conversation
@@ -70,6 +70,7 @@ public function write(array $data) | |||
|
|||
if ($errorsCount) { | |||
$this->console->writeln('<error>' . 'Total Errors Count: ' . $errorsCount . '</error>'); | |||
throw new \Magento\Framework\Validator\Exception(__('Error durring compilation')); |
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.
Log writer is incorrect place to throw this exception: nothing went wrong in log writer. Please fix it on command level.
@pivulic Thank you for contribution. I see there are outstanding comments from the previous reviewers, is there any chance you can fix them? |
I'm not quite sure where to exactly fix it. If you know where to fix it on the command level, could maybe you do it? |
@pivulic the comment meant to say to move the exception one level up, to the code which invokes error log writer. The best place as I see would be in the |
@vrann, do you mean in https://github.com/magento/magento2/blob/2.1.5/setup/src/Magento/Setup/Module/Di/Code/Reader/Decorator/Interceptions.php#L85? I can't find the Did you mean something like this:
|
@pivulic sorry taking for the long time to respond. Yes, I mean this:
|
@pivulic please let me know if you need any help with this |
@vrann, does it look better now? |
@pivulic looks good |
Can we merge it? :) |
#7780 - fixed false positive failures
…-9924 * upstream/develop: (60 commits) Fix typo in comment Move prefix and suffix default values to a new PR MAGETWO-68877: Issue magento#7988 Typo changed also added comments for each index, getters and setters. magento#9484 Revert "MAGETWO-69728: Fixes layered navigation options being cached using the wrong store id. magento#9873" MAGETWO-67500: setup:di:compile returns exit code 0 if errors are found magento#7780 Fix prefix, middle name and suffix were not prefilled in the checkout add middle name to checkout address html templates magento#8878 Using Command output as message which actually provides more information for debugging than just the path Handling CLI error as a failure when validating composer.json file MAGETWO-69805: Return array of blocks as items instead of array of arrays magento#9157 MAGETWO-69666: Return array of pages as items instead of array of arrays magento#9823 MAGETWO-69723: Email to a Friend feature magento#9824 MAGETWO-69539: PHP "soap" extension is not declared in composer.json but can be used by Magento modules MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-63054: [Catalog] MSRP field is not displayed for bundle products with fixed price MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories ...
* develop: (60 commits) Fix typo in comment Move prefix and suffix default values to a new PR MAGETWO-68877: Issue magento#7988 Typo changed also added comments for each index, getters and setters. magento#9484 Revert "MAGETWO-69728: Fixes layered navigation options being cached using the wrong store id. magento#9873" MAGETWO-67500: setup:di:compile returns exit code 0 if errors are found magento#7780 Fix prefix, middle name and suffix were not prefilled in the checkout add middle name to checkout address html templates magento#8878 Using Command output as message which actually provides more information for debugging than just the path Handling CLI error as a failure when validating composer.json file MAGETWO-69805: Return array of blocks as items instead of array of arrays magento#9157 MAGETWO-69666: Return array of pages as items instead of array of arrays magento#9823 MAGETWO-69723: Email to a Friend feature magento#9824 MAGETWO-69539: PHP "soap" extension is not declared in composer.json but can be used by Magento modules MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-63054: [Catalog] MSRP field is not displayed for bundle products with fixed price MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories ...
…end-oauth [Pyrrans] AC-5928: Replace Zend_Oauth with Laminas\Oauth
The problem
As a follow up to #3060 and #3189, running
bin/magento setup:di:compile
doesn't always return a non-zero exit code.Steps to reproduce
Incorrect dependency
error.setup:di:compile
echo $?
Expected result
Since there are
Errors during compilation
, the exit code should not be0
Actual result - before this PR
Exit code was
0
, since we never entered thecatch (OperationException $e)
in Magento\Setup\Console\Command\DiCompileCommand::execute()See screenshot: http://www.vaimo.com/snaps/pablo.ivulic/exit-code-0-not-ok.png
Actual result - after this PR
Exit code is now
1
.