-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
We are developing our Magento 2 extensions and running continuous integration against them. In the interest of failing fast, we're running our extension unit tests without having a full Magento 2 installation up and running. In order to achieve this we get specific (as I think we should) about our actual requirements on the Magento 2 codebase in our composer.json, resulting in a file looking like:
...
"require": {
"magento/framework": "100.0.*",
"magento/module-backend": "100.0.*",
"magento/module-store": "100.0.*"
},
"require-dev": {
"phpunit/phpunit": "4.1.0"
},
...
When attempting to use classes available in magento/framework we get "class not found" fatal errors due to Zend\Http not be explicitly listed as a requirement of the package.
Steps to reproduce
- Include
"magento/framework": "100.0.*"as a requirement in your own project'scomposer.json - Run
composer installto install dependencies - Write a unit test that uses
Magento\Framework\TestFramework\Unit\Helper\ObjectManagerto mock aMagento\Framework\App\Request\Http.
Expected result
- Test passes.
Actual result
phpunit --verbose
PHPUnit 4.1.0 by Sebastian Bergmann.
Configuration read from phpunit.xml
........PHP Fatal error: Class 'Zend\Http\PhpEnvironment\Request' not found in /Users/nrj/Desktop/builder/vendor/magento/framework/HTTP/PhpEnvironment/Request.php on line 16
Fatal error: Class 'Zend\Http\PhpEnvironment\Request' not found in /Users/nrj/Desktop/builder/vendor/magento/framework/HTTP/PhpEnvironment/Request.php on line 16
tkn98 and nickmarx12345678
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report