-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Magento 2.0.4 DI Compilation Breaks CLI Tool #4070
Comments
created internal ticket MAGETWO-51699 |
@davidalger what's your php version? And do you get the same issue when running single-tenant compiler? |
Seems related, and might be an easy way to reproduce: $ php -v
PHP 7.0.5 (cli) (built: Mar 31 2016 06:38:53) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
with blackfire v1.10.0, https://blackfire.io, by Blackfireio Inc.
$ vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php
PHPUnit 4.1.0 by Sebastian Bergmann.
Configuration read from /Volumes/CaseSensitive/Workspace/m2-zurich/mage2ce/dev/tests/unit/phpunit.xml.dist
......EEEEEE........
Time: 118 ms, Memory: 8.00Mb
There were 6 errors:
1) Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Tab\InventoryTest::testGetFieldValue with data set #0 (99, array('getField'), 'call-method')
PHPUnit_Framework_MockObject_RuntimeException: Class "Magento\CatalogInventory\Api\Data\StockItemInterface" does not exist.
/Volumes/CaseSensitive/Workspace/m2-zurich/mage2ce/vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php:270
2) Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Tab\InventoryTest::testGetFieldValue with data set #1 (NULL, array(), 'default-result')
PHPUnit_Framework_MockObject_RuntimeException: Class "Magento\CatalogInventory\Api\Data\StockItemInterface" does not exist.
/Volumes/CaseSensitive/Workspace/m2-zurich/mage2ce/vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php:270
3) Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Tab\InventoryTest::testGetFieldValue with data set #2 (99, array(), 'default-result')
PHPUnit_Framework_MockObject_RuntimeException: Class "Magento\CatalogInventory\Api\Data\StockItemInterface" does not exist.
/Volumes/CaseSensitive/Workspace/m2-zurich/mage2ce/vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php:270
4) Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Tab\InventoryTest::testGetConfigFieldValue with data set #0 (99, array('getUseConfigField'), 'call-method')
PHPUnit_Framework_MockObject_RuntimeException: Class "Magento\CatalogInventory\Api\Data\StockItemInterface" does not exist.
/Volumes/CaseSensitive/Workspace/m2-zurich/mage2ce/vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php:345
5) Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Tab\InventoryTest::testGetConfigFieldValue with data set #1 (NULL, array(), 'default-result')
PHPUnit_Framework_MockObject_RuntimeException: Class "Magento\CatalogInventory\Api\Data\StockItemInterface" does not exist.
/Volumes/CaseSensitive/Workspace/m2-zurich/mage2ce/vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php:345
6) Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Tab\InventoryTest::testGetConfigFieldValue with data set #2 (99, array(), 'default-result')
PHPUnit_Framework_MockObject_RuntimeException: Class "Magento\CatalogInventory\Api\Data\StockItemInterface" does not exist.
/Volumes/CaseSensitive/Workspace/m2-zurich/mage2ce/vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php:345
FAILURES!
Tests: 20, Assertions: 51, Errors: 6. |
Could you try 7.0.4? There are reports of something breaking with 7.0.5. Not sure who's fault, but 7.0.5 is behaving differently in a way that impacts Magento. |
The version I'm running is indeed 7.0.5. @alankent do you know off-hand what RPM I can use to install 7.0.4 readily? The stack setups I'm doing are using remi, which does not have the old versions present yet. I'll see what I can do to test this in 7.0.4 |
@dsikkema The single-tenant compiler is broken such that the CLI tool will not work. There is an open issue here on GH for that already I believe, and is an error something to do with the area preferences. |
@alankent Same result in PHP 7.0.4 $ /usr/local/Cellar/php70/7.0.4/bin/php -v
PHP 7.0.4 (cli) (built: Mar 4 2016 11:25:38) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
with blackfire v1.10.0, https://blackfire.io, by Blackfireio Inc.
$ /usr/local/Cellar/php70/7.0.4/bin/php vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php
PHPUnit 4.1.0 by Sebastian Bergmann.
Configuration read from /Volumes/CaseSensitive/Workspace/m2-zurich/mage2ce/dev/tests/unit/phpunit.xml.dist
......EEEEEE........
Time: 335 ms, Memory: 8.00Mb
There were 6 errors:
[...same as above when running the test with 7.0.5...] In fact, the same happens if I run this test with 7.0.3, 7.0.2, 7.0.1 or 7.0.0. It seems like it's an issue in 2.0.4 with PHP7. The same tests succeed if I execute them with PHP 5.6.20. |
Thanks! I will escalate internally. |
Same here on php7.0.5 using either multi/single tenant more details here Complemental Information:
|
acknowledged |
The igbinary implementation breaks as well on 7.0.x |
Any workaround for this error? |
@degaray The only workaround would be to remove the |
Is there an update on this? My guess the root cause lies in the serialize implementation changes in PHP 7 |
I had the same issue when running on php 7.0.5 but it works on php 7.0.6 |
I can confirm that it works for 7.0.6 (both igbinary and standard serializer) |
Had this same issue with PHP 7.0.5 and Magento 2.0.6, removing var/di/relations.ser brought back the application. |
This reverts commit 2a48bcb.
I can confirm this works in 7.0.6 as well… so since it didn't turn out to be a real bug in Magento (which now officially does not support 7.0.5 specifically) I'm going to close this. For any future readers: If you are running PHP 7.0.5 and having issues, upgrade to PHP 7.0.6 or better! :) |
Magneto 2.1.0 & php7.0.22 - don't work |
Steps to reproduce
bin/magento setup:di:compile-multi-tenant
bin/magento
toolFailure encountered
Any attempt to run
bin/magento
fails until one manually removes thevar/di/relations.ser
file generated by the compile-multi-tenant process:Detailed example
The text was updated successfully, but these errors were encountered: