Skip to content

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

@stefandoorn

Description

@stefandoorn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions