Skip to content
This repository was archived by the owner on May 27, 2023. It is now read-only.
This repository was archived by the owner on May 27, 2023. It is now read-only.

PHP Fatal error: Class 'SebastianBergmann\Comparator\Factory' not found in lib/EcomDev/PHPUnit/AbstractConstraint.php on line 153 #224

Closed
@razbakov

Description

@razbakov

I tried to install it using composer,
I have found some workarounds,
but now I have another error:

PHP Fatal error:  Class 'SebastianBergmann\Comparator\Factory' not found in lib/EcomDev/PHPUnit/AbstractConstraint.php on line 153

Here is what I do:

  1. add to composer json require section:
"firegento/psr0autoloader": "*", // maybe can solve SebastianBergmann\Comparator\Factory
"ecomdev/ecomdev_phpunit": "dev-dev",
"mikey179/vfsStream": "1.4.*"
  1. run composer update

  2. copy vfsStream manually, because of vfsStream is not copied to lib directory magento-hackathon/magento-composer-installer#128
    cp -rf vendor/mikey179/vfsStream/src lib/vfsStream/

  3. add to app/code/community/EcomDev/PHPUnit/bootstrap.php to avoid Cookies already sent:

ini_set('session.use_cookies', 0);
ini_set('session.cache_limiter', '');
  1. add phpunit.xml.dist (copy from EcomDev repo)

  2. install ecomdev:

cd shell 
php ecomdev-phpunit.php -a magento-config --db-name $DB_NAME --base-url http://your.magento.url/
php ecomdev-phpunit.php -a fix-autoloader
  1. run phpunit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions