diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml index ad35661..c4f597c 100644 --- a/.github/workflows/autoformat.yml +++ b/.github/workflows/autoformat.yml @@ -52,7 +52,7 @@ jobs: with: coverage: none extensions: mbstring - php-version: 7.2 + php-version: 7.4 - run: composer install --no-interaction --no-progress diff --git a/CHANGELOG.md b/CHANGELOG.md index fe221ec..98413e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Support Laravel 12 https://github.com/laragraph/utils/pull/20 +- Support `thecodingmachine/safe` 3 https://github.com/laragraph/utils/pull/21 ## v2.1.0 diff --git a/README.md b/README.md index 9275db2..0271ee3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Utilities for using GraphQL with Laravel Install through composer -```bash +```shell composer require laragraph/utils ``` diff --git a/composer.json b/composer.json index a37a0ad..d3aa202 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "php": "^7.2 || ^8", "illuminate/contracts": "~5.6.0 || ~5.7.0 || ~5.8.0 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12", "illuminate/http": "~5.6.0 || ~5.7.0 || ~5.8.0 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12", - "thecodingmachine/safe": "^1.1 || ^2", + "thecodingmachine/safe": "^1.1 || ^2 || ^3", "webonyx/graphql-php": "^0.13.2 || ^14 || ^15" }, "require-dev": { diff --git a/src/RequestParser.php b/src/RequestParser.php index 98469b9..dd4616f 100644 --- a/src/RequestParser.php +++ b/src/RequestParser.php @@ -7,6 +7,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; use Safe\Exceptions\JsonException; + use function Safe\json_decode; /** Follows https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md. */