From 35f926a09172c2708bdaec7492bd535f1acf9c0e Mon Sep 17 00:00:00 2001 From: Rafael Queiroz Date: Thu, 8 Apr 2021 12:16:38 -0300 Subject: [PATCH 1/6] Update AbstractListener.php --- src/Storage/Listener/AbstractListener.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Storage/Listener/AbstractListener.php b/src/Storage/Listener/AbstractListener.php index d756c762..ceee6fe6 100644 --- a/src/Storage/Listener/AbstractListener.php +++ b/src/Storage/Listener/AbstractListener.php @@ -167,18 +167,6 @@ public function addDataProcessor($objectName, $config) */ protected function _checkEvent(EventInterface $event): bool { - $className = $this->_getAdapterClassFromConfig($event->getData('entity')['adapter']); - $classes = $this->_adapterClasses; - - if (!empty($classes) && !in_array($className, $classes)) { - $message = 'The listener `%s` doesn\'t allow the `%s` adapter class! Probably because it can\'t work with it.'; - throw new StorageException(sprintf( - $message, - static::class, - $className - )); - } - return $event->getSubject() instanceof Table && $this->_modelFilter($event); } From ce7150194b1d58eda7b22ecd901fba9bcbbc2332 Mon Sep 17 00:00:00 2001 From: Rafael Queiroz Date: Thu, 8 Apr 2021 12:24:44 -0300 Subject: [PATCH 2/6] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 26f49380..8fc02d4c 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "prefer-stable": true, "minimum-stability": "dev", "require": { - "php": ">=7.3", + "php": ">=7.2", "cakephp/cakephp": "^4.0", "cakephp/plugin-installer": "^1.0.0", "knplabs/gaufrette": "^0.7.0|^0.8.0" From 31ea9a67425e19242b3503e599efced576abe8b2 Mon Sep 17 00:00:00 2001 From: TerryKern <56536101+TerryKern@users.noreply.github.com> Date: Wed, 16 Nov 2022 09:11:21 +0100 Subject: [PATCH 3/6] Make routes forward compatible Since the newest release is from the 3.x branch im proposing this here. Using said release (3.1.3) leads to deprecation warnings in CakePHP 4.3. Im aware that newer tags already have CakePHP 4.x conform routes however since this branch requires "cakephp/cakephp": "^4.0", in composer JSON i think this branch should also adhere to the new route structure. --- config/routes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/routes.php b/config/routes.php index bacbca14..949ffcb7 100644 --- a/config/routes.php +++ b/config/routes.php @@ -1,6 +1,6 @@ fallbacks(); -}); \ No newline at end of file +$routes->plugin('Burzum/FileStorage', function($routes) { + $routes->fallbacks(); +}); From ac9aba05e0bd1e5c5a49ad0ebd1077e5ea7d1610 Mon Sep 17 00:00:00 2001 From: TerryKern <56536101+TerryKern@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:00:18 +0100 Subject: [PATCH 4/6] Add type hint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marc Würth --- config/routes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/routes.php b/config/routes.php index 949ffcb7..3f6f9d3d 100644 --- a/config/routes.php +++ b/config/routes.php @@ -1,6 +1,7 @@ plugin('Burzum/FileStorage', function($routes) { $routes->fallbacks(); }); From ef7f370b965e3ee92aaf56dc3d3e02355dd58a35 Mon Sep 17 00:00:00 2001 From: TerryKern <56536101+TerryKern@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:00:39 +0100 Subject: [PATCH 5/6] Remove unecessary import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marc Würth --- config/routes.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/routes.php b/config/routes.php index 3f6f9d3d..baae0ec5 100644 --- a/config/routes.php +++ b/config/routes.php @@ -1,6 +1,4 @@ plugin('Burzum/FileStorage', function($routes) { $routes->fallbacks(); From bfd3e41925cd4c00f9b1494183dcd4f9d585c75a Mon Sep 17 00:00:00 2001 From: TerryKern <56536101+TerryKern@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:04:01 +0100 Subject: [PATCH 6/6] Add trailing line --- config/routes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/routes.php b/config/routes.php index baae0ec5..f7e0c352 100644 --- a/config/routes.php +++ b/config/routes.php @@ -3,3 +3,4 @@ $routes->plugin('Burzum/FileStorage', function($routes) { $routes->fallbacks(); }); +