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

[pull] master from krowinski:master #3

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
17 changes: 15 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

strategy:
matrix:
php: [ '7.1', '7.2', '7.3', '7.4', '8.0' ]
php: [ '7.4', '8.0', '8.1', '8.2' ]

steps:
- name: Checkout
Expand Down Expand Up @@ -36,4 +36,17 @@ jobs:
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run tests
run: vendor/bin/phpunit --coverage-text
run: vendor/bin/phpunit --coverage-clover clover.xml

- name: PHPStan analyse
run: composer phpstan:analyse

- name: Coding standards check
run: composer cs:check

- name: Generate test coverage badge
uses: timkrase/[email protected]
with:
coverage_badge_path: 'badge-coverage.svg'
push_badge: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
/vendor
composer.lock
composer.lock
.cache/
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
> Please provide the following details.

* *Operating System*: <Linux | Windows | OS X>
* *PHP Version*: <5.6 | 7.0 | ...>
* *PHP Version*: <7.4 | 8.2 | ...>

> Steps required to reproduce the problem.

Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# bcmath-extended
[![Build Status](https://travis-ci.org/krowinski/bcmath-extended.svg?branch=master)](https://travis-ci.org/krowinski/bcmath-extended)
[![Code Coverage](https://scrutinizer-ci.com/g/krowinski/bcmath-extended/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/krowinski/bcmath-extended/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/krowinski/bcmath-extended/v/stable)](https://packagist.org/packages/krowinski/bcmath-extended)
[![Total Downloads](https://poser.pugx.org/krowinski/bcmath-extended/downloads)](https://packagist.org/packages/krowinski/bcmath-extended)
[![Latest Unstable Version](https://poser.pugx.org/krowinski/bcmath-extended/v/unstable)](https://packagist.org/packages/krowinski/bcmath-extended)
[![PHP Tests](https://github.com/krowinski/bcmath-extended/actions/workflows/tests.yml/badge.svg)](https://github.com/krowinski/bcmath-extended/actions/workflows/tests.yml)
[![Code Coverage](https://raw.githubusercontent.com/krowinski/bcmath-extended/master/badge-coverage.svg)](https://github.com/krowinski/bcmath-extended/actions)
[![Latest Stable Version](https://poser.pugx.org/krowinski/bcmath-extended/v/stable)](https://packagist.org/packages/krowinski/bcmath-extended)
[![Total Downloads](https://poser.pugx.org/krowinski/bcmath-extended/downloads)](https://packagist.org/packages/krowinski/bcmath-extended)
[![License](https://poser.pugx.org/krowinski/bcmath-extended/license)](https://packagist.org/packages/krowinski/bcmath-extended)

Extends php BCMath lib for missing functions like floor, ceil, round, abs, min, max, rand for big numbers.
Expand Down Expand Up @@ -49,13 +48,13 @@ Features
- bitAnd
- proxy for original functions (http://php.net/manual/en/book.bc.php)
- all functions supports scientific notation
- all functions are static, so it can be easy replaced by this lib
- all functions are static, so it can be easily replaced by this lib

Info
===
As of 7.2 float can be passed to bcmod but they don't return correct values (IMO)
As of 7.2 float can be passed to bcmod, but they don't return correct values (IMO)

I created bug for this in https://bugs.php.net/bug.php?id=76287 but it was commented as documentation issue not a bug.
I created bug for this in https://bugs.php.net/bug.php?id=76287, but it was commented as documentation issue not a bug.

```
bcmod() doesn't use floor() but rather truncates towards zero,
Expand Down
16 changes: 16 additions & 0 deletions badge-coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading