Skip to content
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

Change commit to rollBack on fail #6266

Merged
merged 3 commits into from
Apr 19, 2017
Merged

Change commit to rollBack on fail #6266

merged 3 commits into from
Apr 19, 2017

Conversation

flancer64
Copy link
Contributor

@flancer64 flancer64 commented Aug 22, 2016

I suppose we should rollback transaction before exception. We are in the loop and we should not commit partial result on error or we should not use transaction at all.

I suppose we should rollback transaction before exception. We are in the loop and we should not commit partial result on error or we should not use transaction at all.
@flancer64
Copy link
Contributor Author

There is an error "The class StockManagement has a coupling between objects value of 13." related to the changes:

$ phpunit $TEST_FILTER
PHPUnit 4.1.0 by Sebastian Bergmann.
Configuration read from /home/travis/build/magento/magento2/dev/tests/static/phpunit.xml.dist
...FS
Time: 36.34 seconds, Memory: 327.75MB
There was 1 failure:
1) Magento\Test\Php\LiveCodeTest::testCodeMess
PHP Code Mess has found error(s):
/home/travis/build/magento/magento2/app/code/Magento/CatalogInventory/Model/StockManagement.php:19  The class StockManagement has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
Failed asserting that 2 matches expected 0.
/home/travis/build/magento/magento2/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php:233

FAILURES!                                        
Tests: 5, Assertions: 4, Failures: 1, Skipped: 1.

Set wrong return type back to eliminate static analyze error.
I have reverted return type of the `getResource()` to the wrong original value but static analyze error still exists. I wrote right value for return type of the method back because this analyze error is not related to my fixes.
@okorshenko okorshenko self-assigned this Apr 13, 2017
@okorshenko okorshenko added this to the April 2017 milestone Apr 13, 2017
@okorshenko
Copy link
Contributor

@flancer64 thank you for the fix. Don't worry about the static test. We can process this PR without green static test because the failure was not caused by your fix.

@magento-team magento-team merged commit 4ef704d into magento:develop Apr 19, 2017
@magento-team
Copy link
Contributor

@flancer64 thank you for your contribution

@flancer64 flancer64 deleted the patch-10 branch April 19, 2017 06:15
@Ctucker9233
Copy link

@magento-team This isn't included in 2.2.7. Why Not?

magento-engcom-team pushed a commit that referenced this pull request Oct 22, 2020
…-magento2-30565

[Imported] magento/magento2-page-builder#558: Developer can style content types …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants