Skip to content

Commit

Permalink
PHP 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dbojdo committed Feb 12, 2020
1 parent 7adbc73 commit c1f2c1a
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 80 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Composer: add the **webit/bcmath** into **composer.json**
```json
{
"require": {
"php": ">=5.3.2",
"webit/bcmath": "^1.2.0"
"php": ">=7.1.0",
"webit/bcmath": "^2.0.0"
}
}
```
Expand All @@ -24,7 +24,13 @@ Composer: add the **webit/bcmath** into **composer.json**
```

## Release note
This version 1.1 breaks a backward compatibility. Since now **BcMathNumber**:

This version 2.0 breaks a backward compatibility. Since now **BcMathNumber**:
* is marked `final`
* constants are marked `private`
* works only for PHP >= 7.1

Version 1.1 breaks a backward compatibility. Since now **BcMathNumber**:
* is immutable (removed *setValue* method)
* has no instance property *scale* (removed instance methods *getScale* / *setScale*) as number itself can't have a *scale*

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
"psr-4": { "Webit\\Wrapper\\BcMath\\": "tests/" }
},
"require": {
"php": ">=5.3.3",
"php": ">=7.1",
"ext-bcmath": "*"
},
"require-dev": {
"phpunit/phpunit": "^4.8"
},
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
"dev-1.x": "1.x-dev",
"dev-master": "2.x-dev"
}
}
}
3 changes: 2 additions & 1 deletion docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM php:5.4-cli
FROM php:7.1-cli

RUN apt-get update && apt-get install -y \
libmcrypt-dev \
libpq-dev \
zlib1g-dev \
git \
subversion

Expand Down
1 change: 1 addition & 0 deletions lib/BcMathException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Webit\Wrapper\BcMath;

class BcMathException extends \RuntimeException
Expand Down
Loading

0 comments on commit c1f2c1a

Please sign in to comment.