Git Product home page Git Product logo

code-unit's Introduction

Latest Stable Version CI Status Type Coverage codecov

sebastian/code-unit

Collection of value objects that represent the PHP code units.

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require sebastian/code-unit

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev sebastian/code-unit

code-unit's People

Contributors

ayesh avatar cs278 avatar jdreesen avatar sammousa avatar sebastianbergmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

code-unit's Issues

Cannot install

As a function of the Bettergist Collective, every quarter I run tests on every Packagist project with sufficient installs.

The project reports total failure to install this as a normal dev package.

To reproduce:

git clone --depth=1 https://github.com/sebastianbergmann/code-unit.git
cd code-unit
PHP_VERSION=8.2 composer install

Expected: Installation would succeed.

Actual:

Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires phpunit/phpunit ^11.0 -> satisfiable by phpunit/phpunit[11.0.0, ..., 11.0.8].
- phpunit/phpunit[11.0.0, ..., 11.0.8] require sebastian/code-unit ^3.0 -> satisfiable by sebastian/code-unit[3.0.0] from composer repo (https://repo.packagist.org) but sebastian/code-unit is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.

Mapper::stringToCodeUnits() breaks when ClassName<extended> is used for class that extends built-in class

Q A
PHPUnit version 9.1.0 and above
PHP version 7.3.11
Installation Method Composer

Summary

PHPUnit 9.1.0 contains BC break and the change has been not documented in the changelog.

Before annotation:

* @covers Laminas\Hydrator\HydratorAwareTrait<extended>

worked fine, but since 9.1.0 it breaks when generating code coverage with the following message:

"@covers Laminas\Hydrator\HydratorAwareTrait<extended>" is invalid
Script phpunit --colors=always --coverage-clover clover.xml handling the test-coverage event returned with error code 2

I've checked the documentation, and using <extended> is not recommended:

https://phpunit.readthedocs.io/en/9.1/annotations.html#covers

but even in documentation of v9.1 it does not say it is not valid.

Previous Behavior

No errors when generating code coverage.

Current Behavior

Error when generating code coverage and code coverage is not completed.

How to reproduce

Checkout repo: https://github.com/laminas/laminas-hydrator
and run:

composer install
composer test-coverage

then try downgrade PHPUnit to 9.0.2 and try again composer test-coverage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.