diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e24837..e8700f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,7 @@ jobs: - '8.0' - '8.1' - '8.2' + - '8.3' symfony: - '3.*' - '4.*' @@ -38,6 +39,7 @@ jobs: - { php: '8.0', symfony: '3.*' } - { php: '8.1', symfony: '3.*' } - { php: '8.2', symfony: '3.*' } + - { php: '8.3', symfony: '3.*' } - { php: '7.1', symfony: '5.*' } - { php: '7.1', symfony: '6.*' } - { php: '7.2', symfony: '6.*' } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f5ed61..7f051b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.8.1] +### Added +- `void` typehint to `PayseraApiBundle::build` method to fix the deprecation message +- PHP 8.3 to CI +### Fixed +- `Call to a member function getClassAnnotations() on null` error in `RoutingAttributeLoader` on Symfony 6 + ## [1.8.0] ### Added - Support for PHP 8 attributes diff --git a/src/Listener/RestResponseListener.php b/src/Listener/RestResponseListener.php index 9aca71e..bd5239e 100644 --- a/src/Listener/RestResponseListener.php +++ b/src/Listener/RestResponseListener.php @@ -65,7 +65,7 @@ private function normalizeResult(Request $request, RestRequestOptions $options, { $includedFields = []; $fields = $request->query->get('fields'); - if ($fields !== null && is_string($fields) && $fields !== '') { + if (is_string($fields) && $fields !== '') { $includedFields = explode(',', $fields); } diff --git a/src/PayseraApiBundle.php b/src/PayseraApiBundle.php index 551138e..7be4b1e 100644 --- a/src/PayseraApiBundle.php +++ b/src/PayseraApiBundle.php @@ -9,7 +9,7 @@ class PayseraApiBundle extends Bundle { - public function build(ContainerBuilder $container) + public function build(ContainerBuilder $container): void { parent::build($container); diff --git a/src/Service/RoutingLoader/RoutingAttributeLoader.php b/src/Service/RoutingLoader/RoutingAttributeLoader.php index 87eaae8..955f27d 100644 --- a/src/Service/RoutingLoader/RoutingAttributeLoader.php +++ b/src/Service/RoutingLoader/RoutingAttributeLoader.php @@ -61,6 +61,10 @@ protected function configureRoute( private function loadAnnotations(Route $route, ReflectionClass $class, ReflectionMethod $method): void { + if (!isset($this->reader)) { + return; + } + $annotations = []; foreach ($this->reader->getClassAnnotations($class) as $annotation) { if ($annotation instanceof RestAnnotationInterface) {