diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 408e2f2..3f903c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php: ['8.3'] + php: ['8.4'] steps: - name: Checkout Code @@ -33,6 +33,8 @@ jobs: - name: Run Linters run: composer run-script lint + env: + PHP_CS_FIXER_IGNORE_ENV: 1 - name: Run Tests run: composer run-script test diff --git a/CHANGELOG.md b/CHANGELOG.md index 4409a40..7dfd3f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +1.3.3 +===== + +* (improvement) Add convenience default parameters. +* (improvement) Require PHP 8.4+ +* (improvement) Bump dependencies. + + 1.3.2 ===== diff --git a/composer.json b/composer.json index db9537f..ac86d18 100644 --- a/composer.json +++ b/composer.json @@ -11,17 +11,17 @@ ], "homepage": "https://github.com/21TORR/simple-normalizer", "require": { - "php": ">= 8.3", - "21torr/bundle-helpers": "^2.1", - "symfony/dependency-injection": "^6.4 || ^7.0", - "symfony/http-kernel": "^6.4 || ^7.0" + "php": ">= 8.4", + "21torr/bundle-helpers": "^2.3", + "symfony/dependency-injection": "^7.2", + "symfony/http-kernel": "^7.2" }, "require-dev": { "21torr/janus": "^1.4", "bamarni/composer-bin-plugin": "^1.8", - "doctrine/common": "^3.4", + "doctrine/common": "^3.5", "roave/security-advisories": "dev-latest", - "symfony/phpunit-bridge": "^7.0" + "symfony/phpunit-bridge": "^7.2" }, "autoload": { "psr-4": { diff --git a/src/Normalizer/SimpleNormalizer.php b/src/Normalizer/SimpleNormalizer.php index 72dde2d..ac39310 100644 --- a/src/Normalizer/SimpleNormalizer.php +++ b/src/Normalizer/SimpleNormalizer.php @@ -78,7 +78,7 @@ public function normalize (mixed $value, array $context = []) : mixed /** */ - public function normalizeArray (array $array, array $context) : array + public function normalizeArray (array $array, array $context = []) : array { $result = []; $isList = array_is_list($array); @@ -112,7 +112,7 @@ public function normalizeArray (array $array, array $context) : array * Normalizes a map of values. * Will JSON-encode to `{}` when empty. */ - public function normalizeMap (array $array, array $context) : array|\stdClass + public function normalizeMap (array $array, array $context = []) : array|\stdClass { // return stdClass if the array is empty here, as it will be automatically normalized to `{}` in JSON. return $this->normalizeArray($array, $context) ?: new \stdClass();