Skip to content

Commit

Permalink
Merge pull request #760 from moneyphp/php83
Browse files Browse the repository at this point in the history
Support PHP 8.3
  • Loading branch information
frederikbosch committed Nov 22, 2023
2 parents 0c81ed1 + 82522df commit 5e71a0f
Show file tree
Hide file tree
Showing 44 changed files with 204 additions and 1,152 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ Dockerfile export-ignore
/benchmark/ export-ignore
/hack/ export-ignore
/phpbench.json export-ignore
/phpspec.yml.dist export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
/spec/ export-ignore
/tests/ export-ignore

/doc/ export-ignore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install
uses: docker://composer
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up locales
run: ./hack/setup-locales.sh
Expand All @@ -40,6 +40,7 @@ jobs:
- '8.0'
- '8.1'
- '8.2'
- '8.3'

steps:
- name: Set up PHP
Expand All @@ -53,7 +54,7 @@ jobs:
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up locales
run: ./hack/setup-locales.sh
Expand All @@ -70,7 +71,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand All @@ -95,7 +96,7 @@ jobs:
architecture: 'x64'

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.php_cs.cache
.phpunit.result.cache
/build/
/phpspec.yml
/phpunit.xml
/vendor/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Please see the [official documentation](http://moneyphp.org).

## Testing

We try to follow BDD and TDD, as such we use both [phpspec](http://www.phpspec.net) and [phpunit](https://phpunit.de) to test this library.
We try to follow TDD by using [phpunit](https://phpunit.de) to test this library.

```bash
$ composer test
Expand Down
9 changes: 3 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"homepage": "http://moneyphp.org",
"require": {
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-bcmath": "*",
"ext-filter": "*",
"ext-json": "*"
Expand All @@ -42,11 +42,10 @@
"php-http/message": "^1.11.0",
"php-http/mock-client": "^1.4.1",
"phpbench/phpbench": "^1.2.5",
"phpspec/phpspec": "^7.3",
"phpunit/phpunit": "^9.5.4",
"psalm/plugin-phpunit": "^0.18.4",
"psr/cache": "^1.0.1",
"vimeo/psalm": "~5.3.0"
"vimeo/psalm": "~5.15.0"
},
"suggest": {
"ext-gmp": "Calculate without integer limits",
Expand All @@ -65,8 +64,7 @@
"autoload-dev": {
"psr-4": {
"Benchmark\\Money\\": "benchmark/",
"Tests\\Money\\": "tests/",
"spec\\Money\\": "spec/"
"Tests\\Money\\": "tests/"
}
},
"config": {
Expand All @@ -90,7 +88,6 @@
],
"clean": "rm -rf build/ vendor/",
"test": [
"vendor/bin/phpspec run",
"vendor/bin/phpunit -v",
"vendor/bin/phpbench run",
"vendor/bin/psalm",
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
6 changes: 3 additions & 3 deletions doc/features/teller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ The Teller offers these methods:

* operation

* ``absolute($amount) : string`` Returns an absoute monetary amount.
* ``absolute($amount) : string`` Returns an absolute monetary amount.
* ``add($amount, $other, ...$others) : string`` Adds one or more monetary amounts to a monetary amount.
* ``divide($amount, $divisor) : string`` Divides a monetary amount by a divisor.
* ``mod($amount, $divisor)`` Retuns the mod of one amount by another.
* ``mod($amount, $divisor)`` Returns the mod of one amount by another.
* ``multiply($amount, $multiplier) : string`` Multiplies a monetary amount by a multiplier.
* ``negative($amount) : string`` Negates a monetary amount.
* ``ratioOf($amount, $other)`` Determines the ratio of one monetary amount to another.
* ``subtract($amount, $other, ...$others) : string`` Subracts one or more monetary amounts from a monetary amount.
* ``subtract($amount, $other, ...$others) : string`` Subtracts one or more monetary amounts from a monetary amount.

* comparison

Expand Down
6 changes: 3 additions & 3 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
git+https://github.com/fabpot/sphinx-php.git
sphinx~=4.3.1
sphinx-rtd-theme==1.0.0
sphinx~=7.2.6
sphinx-rtd-theme~=1.3.0
git+https://github.com/markstory/sphinxcontrib-phpdomain.git
sphinxcontrib-spelling==7.2.1
sphinxcontrib-spelling==8.0.0
pyenchant
2 changes: 2 additions & 0 deletions doc/spelling_word_list.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
amongst
integrations
codebases
formatter
formatters
eg
Bitcoin
Expand Down
5 changes: 0 additions & 5 deletions phpspec.yml.dist

This file was deleted.

18 changes: 0 additions & 18 deletions spec/Calculator/BcMathCalculatorSpec.php

This file was deleted.

92 changes: 0 additions & 92 deletions spec/Calculator/CalculatorBehavior.php

This file was deleted.

18 changes: 0 additions & 18 deletions spec/Calculator/GmpCalculatorSpec.php

This file was deleted.

74 changes: 0 additions & 74 deletions spec/ConverterSpec.php

This file was deleted.

Loading

0 comments on commit 5e71a0f

Please sign in to comment.