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

Code coverage is broken on PHP 7.2 because of outdated dep #4703

Closed
pmaselkowski opened this issue Dec 19, 2017 · 2 comments
Closed

Code coverage is broken on PHP 7.2 because of outdated dep #4703

pmaselkowski opened this issue Dec 19, 2017 · 2 comments

Comments

@pmaselkowski
Copy link

What are you trying to achieve?

Generate HTML code coverage report on PHP 7.2 with command:

vendor/bin/codecept run unit --coverage --html --coverage-html=. --coverage-xml=./coverage.clover

What do you get instead?

PHPUnit_Framework_Exception:
count(): Parameter must be an array or an object that implements Countable

See sebastianbergmann/php-code-coverage#551

Updating php-code-coverage to latest version 5 would fix issue. But is it even possible to not break many deps at the same time?

Details

  • Codeception version:
  • PHP Version: 7.2
  • Operating System: Linux
  • Installation type: Composer
  • List of installed packages (composer show)
behat/gherkin                     v4.4.5  Gherkin DSL parser for PHP 5.3
codeception/codeception           2.3.7   BDD-style testing framework
codeception/specify               0.4.6   BDD code blocks for PHPUnit and Codeception
doctrine/instantiator             1.1.0   A small, lightweight utility to instantiate objects in PHP without invoking their constructors
erusev/parsedown                  1.6.4   Parser for Markdown.
facebook/webdriver                1.3.0   A PHP client for WebDriver
fzaninotto/faker                  v1.7.1  Faker is a PHP library that generates fake data for you.
guzzlehttp/guzzle                 6.3.0   Guzzle is a PHP HTTP client library
guzzlehttp/promises               v1.3.1  Guzzle promises library
guzzlehttp/psr7                   1.4.2   PSR-7 message implementation that also provides common utility methods
maslosoft/addendum                5.0.14  Easy to use php annotations
maslosoft/cache                   1.0.11  Easy to use, auto configurable, extensible cache provider
maslosoft/cli-shared              0.0.19  Shared CLI application components
maslosoft/embedi                  1.1.1   Embedded DI container
maslosoft/gazebo                  1.1.10  Plugin container
maslosoft/hedron                  1.1.16  PHP source code class header applier
maslosoft/mangan-examples         1.0.5   Examples for Mangan project
maslosoft/miniview                1.1.1   Mini view is minimal template rendering library based on Yii controller renderer
maslosoft/mongofill               0.0.3   Polyfill of PECL Mongo extension
maslosoft/signals                 2.0.15  Wireless Cross-Component Communication
maslosoft/staple                  1.0.35  Static Page Lightweight Enchancer
maslosoft/zamm                    1.0.20  Zamm is a documentation tool
masterexploder/phpthumb           2.1     A library for manipulating images in PHP.
myclabs/deep-copy                 1.7.0   Create deep copies (clones) of your objects
phpdocumentor/reflection-common   1.0.1   Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock 4.2.0   With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver       0.4.0  
phpspec/prophecy                  1.7.3   Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage         2.2.4   Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator         1.4.5   FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template         1.2.1   Simple template engine.
phpunit/php-timer                 1.0.9   Utility class for timing
phpunit/php-token-stream          1.4.12  Wrapper around PHP's tokenizer extension.
phpunit/phpunit                   4.8.36  The PHP Unit Testing framework.
phpunit/phpunit-mock-objects      2.3.8   Mock Object library for PHPUnit
psr/http-message                  1.0.1   Common interface for HTTP messages
psr/log                           1.0.2   Common interface for logging libraries
ptachoire/php-dmtx                1.0.3   Datamatrix r/w based on libdmtx <http://www.libdmtx.org/>
sebastian/comparator              1.2.4   Provides the functionality to compare PHP values for equality
sebastian/diff                    1.4.3   Diff implementation
sebastian/environment             1.3.8   Provides functionality to handle HHVM/PHP environments
sebastian/exporter                1.2.2   Provides the functionality to export PHP variables for visualization
sebastian/global-state            1.1.1   Snapshotting of global state
sebastian/recursion-context       1.0.5   Provides functionality to recursively process PHP variables
sebastian/version                 1.0.6   Library that helps with managing the version number of Git-hosted PHP projects
symfony/browser-kit               v4.0.2  Symfony BrowserKit Component
symfony/console                   v3.3.14 Symfony Console Component
symfony/css-selector              v4.0.2  Symfony CssSelector Component
symfony/debug                     v3.4.2  Symfony Debug Component
symfony/dom-crawler               v4.0.2  Symfony DomCrawler Component
symfony/event-dispatcher          v4.0.2  Symfony EventDispatcher Component
symfony/finder                    v3.4.2  Symfony Finder Component
symfony/options-resolver          v2.8.32 Symfony OptionsResolver Component
symfony/polyfill-mbstring         v1.6.0  Symfony polyfill for the Mbstring extension
symfony/process                   v2.8.32 Symfony Process Component
symfony/yaml                      v3.3.14 Symfony Yaml Component
webmozart/assert                  1.2.0   Assertions to validate method input/output with nice error messages.
zordius/lightncandy               v0.95   An extremely fast PHP implementation of handlebars ( http://handlebarsjs.com/ ) and mustache ( http://mustache.github.io/ ).
  • Suite configuration:
actor: Tester
paths:
    tests: tests
    log: tests/_output
    data: tests/_data
    helpers: tests/_support
extensions:
    enabled:
        - Maslosoft\ManganTest\Extensions\MongoWipe
        - Maslosoft\ManganTest\Extensions\EventDestroyer
        - Maslosoft\ManganTest\Extensions\IndexMetaCleaner
    config:
        Maslosoft\ManganTest\Extensions\MongoWipe:
            connectionIds:
                - mongodb
                - second
                - tokumx
settings:
    bootstrap: _bootstrap.php
    colors: true
    memory_limit: 1024M
coverage:
    enabled: true
    remote: false
    xml: coverage.clover
    html: true
    include:
        - src/*
@Naktibalda
Copy link
Member

Have you got a reason to use PHPUnit 4 and PhpCodeCoverage 2 on PHP 7.2?

Upgrading both packages is the only solution because PHPUnit 4 is no longer supported.

@pmaselkowski
Copy link
Author

Thank You for suggestion, it turned out that one of my dependencies have that old coverage package defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants