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

magento/framework should require zendframework/zend-escaper #3470

Closed
stefandoorn opened this issue Feb 18, 2016 · 5 comments
Closed

magento/framework should require zendframework/zend-escaper #3470

stefandoorn opened this issue Feb 18, 2016 · 5 comments
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@stefandoorn
Copy link
Contributor

When using magento/catalog as a requirement in my separated module, I want to make sure I can still run unit tests without requiring all of Magento. It fails in an error as zend-escaper is required. To rebuild:

In test:

        $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);

        $this->contextMock = $this->objectManager->getObject('Magento\Framework\View\Element\Template\Context');

Composer:

  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/module-catalog": "100.0.*"
  },
  "require-dev": {
    "phpunit/phpunit": "5.0.*"
  },

Same goes for missing zendframework/zend-stdlib btw.

I think magento/catalog used magento/framework, which should add these dependencies to make sure they are available even if you only install part of the framework.

Error when not requiring these zendframework modules myself:

PHP Fatal error:  Class 'Zend\Escaper\Escaper' not found in /var/www/module/vendor/magento/framework/Escaper.php on line 11

Fatal error: Class 'Zend\Escaper\Escaper' not found in /var/www/module/vendor/magento/framework/Escaper.php on line 11
@mazhalai
Copy link
Contributor

Related internal ticket MAGETWO-31454

@mazhalai mazhalai added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development PS and removed MX labels May 13, 2016
@nickmarx12345678
Copy link

+1, have encountered this attempting to use the Magento1 to Magento2 migration tool, causes a Fatal with output semi-finished

@nickmarx12345678
Copy link

@stefandoorn did you happen to have a go-around for this?

@stefandoorn
Copy link
Contributor Author

@nickmarx12345678 I was developing a custom module and needed this to run the unit tests standalone. I simply just figured out from the composer.lock of M2 which version was installed/required and required the same dependency in my custom module in the require-dev part to support the tests. Not optional, but it worked :)

@vkorotun vkorotun removed the PS label Aug 4, 2016
@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Application Framework bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@orlangur
Copy link
Contributor

This was fixed in #10114, now zend-escaper is implicitly required (would be nice to make it explicit but it is just an improvement).

Vlads-MacBook-Pro:magento2 orlangur$ composer why zendframework/zend-escaper
zendframework/zend-uri  2.5.2  requires  zendframework/zend-escaper (^2.5)

@orlangur orlangur added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 16, 2017
magento-engcom-team pushed a commit that referenced this issue Nov 20, 2018
[EngCom] Public Pull Requests - GraphQL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

9 participants