Skip to content

Commit

Permalink
[9.x] Add missing php extensions in composer (#45941)
Browse files Browse the repository at this point in the history
* Add missing php extensions

* Update composer.json

* adds hash-ext to Auth

* adds hash-ext to Cookie

* Removes always on json-ext from Encryption

- https://wiki.php.net/rfc/always_enable_json
- https://www.php.net/ChangeLog-8.php

* adds hash-ext to Encryption

* Adds ext-hash to Filesystem

* Adds ext-fileinfo to Filesystem

* Sorts Filesystem extensions

* Removes always on json-ext from Mail

* Removes always on json-ext from Pagination

* Adds ext-filter to Pagination

* Removes always on json-ext from Queue

* Adds ext-PDO to Queue

* Adds ext-mbstring to Queue

* Adds ext-filter to Queue

* Removes always on ext-json from Routing

* Adds ext-filter to Routing

* Adds ext-hash to Routing

* Removes always on json-ext from  Support

* Adds ext-ctype to Support

* Adds ext-filter to Support

* Removes always on ext-json from Translation

* Removes always on ext-json from View

* Adds ext-tokenizer to View

* Removes always on json-ext from Broadcasting

* Adds ext-hash to Broadcasting

* Adds ext-filter to Cache

* Adds ext-mbstring to Console

* Adds ext-pcntl to Console

* Removes always on ext-json from Database

* Adds ext-PDO to Database

* Adds ext-filter to Database

* Adds ext-pcntl to Database

* Remove always on ext-json from Http

* Adds ext-filter to Http

* Removes always on ext-json from Session

* Adds ext-ctype to Session

* Adds ext-session to Session

* Adds ext-mbstring to Testing

* Removes always on ext-json from Validation

* Adds ext-filter to Validation

* Adds ext-mbstring to Validation

* Moves ext-PDO to suggested for Queue

* Moves driver based extensions to suggested

* Standardise capitalisation of ext-pdo

* Update ext-pcntl suggest framework description

* Add additional framework required extensions

* Remove require-dev dependency on bcmath

* Adds ext-apcu to Cache suggests

* code style

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Co-authored-by: Tim MacDonald <hello@timacdonald.me>
  • Loading branch information
3 people authored Feb 6, 2023
1 parent d3a4cd2 commit e6846df
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 16 deletions.
11 changes: 10 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@
],
"require": {
"php": "^8.0.2",
"ext-ctype": "*",
"ext-filter": "*",
"ext-hash": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-session": "*",
"ext-tokenizer": "*",
"brick/math": "^0.9.3|^0.10.2|^0.11",
"doctrine/inflector": "^2.0.5",
"dragonmantank/cron-expression": "^3.3.2",
Expand Down Expand Up @@ -83,6 +88,7 @@
"illuminate/view": "self.version"
},
"require-dev": {
"ext-gmp": "*",
"ably/ably-php": "^1.0",
"aws/aws-sdk-php": "^3.235.5",
"doctrine/dbal": "^2.13.3|^3.1.4",
Expand Down Expand Up @@ -140,10 +146,13 @@
}
},
"suggest": {
"ext-apcu": "Required to use the APC cache driver.",
"ext-fileinfo": "Required to use the Filesystem class.",
"ext-ftp": "Required to use the Flysystem FTP driver.",
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
"ext-memcached": "Required to use the memcache cache driver.",
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-pcntl": "Required to use all features of the queue worker and console signal trapping.",
"ext-pdo": "Required to use all database features.",
"ext-posix": "Required to use all features of the queue worker.",
"ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Auth/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-hash": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/http": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Broadcasting/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"psr/log": "^1.0|^2.0|^3.0",
"illuminate/bus": "^9.0",
"illuminate/collections": "^9.0",
Expand All @@ -35,6 +34,7 @@
}
},
"suggest": {
"ext-hash": "Required to use the Ably and Pusher broadcast drivers.",
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0)."
},
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Cache/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
}
},
"suggest": {
"ext-apcu": "Required to use the APC cache driver.",
"ext-filter": "Required to use the DynamoDb cache driver.",
"ext-memcached": "Required to use the memcache cache driver.",
"illuminate/database": "Required to use the database cache driver (^9.0).",
"illuminate/filesystem": "Required to use the file cache driver (^9.0).",
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Console/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-mbstring": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand All @@ -35,6 +36,7 @@
}
},
"suggest": {
"ext-pcntl": "Required to use signal trapping.",
"dragonmantank/cron-expression": "Required to use scheduler (^3.3.2).",
"guzzlehttp/guzzle": "Required to use the ping methods on schedules (^7.5).",
"illuminate/bus": "Required to use the scheduled job dispatcher (^9.0).",
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Cookie/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-hash": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Database/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-pdo": "*",
"brick/math": "^0.9.3|^0.10.2|^0.11",
"illuminate/collections": "^9.0",
"illuminate/container": "^9.0",
Expand All @@ -36,6 +36,7 @@
}
},
"suggest": {
"ext-filter": "Required to use the Postgres database driver.",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).",
"fakerphp/faker": "Required to use the eloquent factory builder (^1.21).",
"illuminate/console": "Required to use the database commands (^9.0).",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Encryption/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-hash": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"illuminate/contracts": "^9.0",
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Filesystem/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
}
},
"suggest": {
"ext-fileinfo": "Required to use the Filesystem class.",
"ext-ftp": "Required to use the Flysystem FTP driver.",
"ext-hash": "Required to use the Filesystem class.",
"illuminate/http": "Required for handling uploaded files (^7.0).",
"league/flysystem": "Required to use the Flysystem local driver (^3.0.16).",
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Http/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-filter": "*",
"fruitcake/php-cors": "^1.2",
"illuminate/collections": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Mail/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"illuminate/collections": "^9.0",
"illuminate/container": "^9.0",
"illuminate/contracts": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Pagination/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-filter": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/support": "^9.0"
Expand Down
4 changes: 3 additions & 1 deletion src/Illuminate/Queue/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"illuminate/collections": "^9.0",
"illuminate/console": "^9.0",
"illuminate/container": "^9.0",
Expand All @@ -39,6 +38,9 @@
}
},
"suggest": {
"ext-pdo": "Required to use the database queue worker.",
"ext-filter": "Required to use the SQS queue worker.",
"ext-mbstring": "Required to use the database failed job providers.",
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-posix": "Required to use all features of the queue worker.",
"aws/aws-sdk-php": "Required to use the SQS queue driver and DynamoDb failed job storage (^3.235.5).",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Routing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-filter": "*",
"ext-hash": "*",
"illuminate/collections": "^9.0",
"illuminate/container": "^9.0",
"illuminate/contracts": "^9.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Session/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-ctype": "*",
"ext-session": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/filesystem": "^9.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Support/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-ctype": "*",
"ext-filter": "*",
"ext-mbstring": "*",
"doctrine/inflector": "^2.0",
"illuminate/collections": "^9.0",
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Testing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-mbstring": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Translation/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Validation/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-filter": "*",
"ext-mbstring": "*",
"brick/math": "^0.9.3|^0.10.2|^0.11",
"egulias/email-validator": "^3.2.1|^4.0",
"illuminate/collections": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/View/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-tokenizer": "*",
"illuminate/collections": "^9.0",
"illuminate/container": "^9.0",
"illuminate/contracts": "^9.0",
Expand Down
5 changes: 3 additions & 2 deletions tests/Integration/Database/EloquentModelCustomCastingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Illuminate\Tests\Integration\Database;

use Brick\Math\BigNumber;
use GMP;
use Illuminate\Contracts\Database\Eloquent\Castable;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
Expand Down Expand Up @@ -398,14 +399,14 @@ public function set($model, $key, $value, $attributes)

public function increment($model, $key, string $value, $attributes)
{
$model->$key = new Euro(bcadd($model->$key->value, $value, 2));
$model->$key = new Euro((string) BigNumber::of($model->$key->value)->plus($value)->toScale(2));

return $model->$key;
}

public function decrement($model, $key, string $value, $attributes)
{
$model->$key = new Euro(bcsub($model->$key->value, $value, 2));
$model->$key = new Euro((string) BigNumber::of($model->$key->value)->subtract($value)->toScale(2));

return $model->$key;
}
Expand Down

0 comments on commit e6846df

Please sign in to comment.