From e13c5fcc32616560528d2ec87bba83bcb5e67c21 Mon Sep 17 00:00:00 2001 From: Svyatoslav Varpikhovsky Date: Thu, 16 Nov 2023 15:07:49 +0200 Subject: [PATCH 1/2] FRW-2276 Added Glue Backend and Storefornt EventDispatcherApplicationPlugin plugins. (#8252) FRW-2276 Added Glue Backend and Storefornt EventDispatcherApplicationPlugin plugins. --- composer.lock | 12 +++---- .../EventDispatcherDependencyProvider.php | 36 ++++++++++++++++++- ...ackendApiApplicationDependencyProvider.php | 2 +- ...efrontApiApplicationDependencyProvider.php | 4 +++ 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index d43c2506b5..e3184ec440 100644 --- a/composer.lock +++ b/composer.lock @@ -5801,12 +5801,12 @@ "source": { "type": "git", "url": "https://github.com/spryker/event-behavior.git", - "reference": "2adae219cbd3b909654778875dc533ad736be2c3" + "reference": "b16d0be5f191e84393df990050fa5ea229a954db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spryker/event-behavior/zipball/2adae219cbd3b909654778875dc533ad736be2c3", - "reference": "2adae219cbd3b909654778875dc533ad736be2c3", + "url": "https://api.github.com/repos/spryker/event-behavior/zipball/b16d0be5f191e84393df990050fa5ea229a954db", + "reference": "b16d0be5f191e84393df990050fa5ea229a954db", "shasum": "" }, "require": { @@ -5869,7 +5869,7 @@ "support": { "source": "https://github.com/spryker/event-behavior" }, - "time": "2023-11-02T20:09:16+00:00" + "time": "2023-11-16T13:02:56+00:00" }, { "name": "spryker/install", @@ -6091,7 +6091,7 @@ "source": { "type": "git", "url": "git@github.com:spryker/spryker.git", - "reference": "040772301764e5f2cf47b7c905e178de760288ec" + "reference": "91b813ed52c3b55d0856961debf7204462ed8d05" }, "require": { "php": ">=8.1" @@ -7142,7 +7142,7 @@ "proprietary" ], "description": "Spryker Framework", - "time": "2023-11-16T10:48:30+00:00" + "time": "2023-11-16T13:02:58+00:00" }, { "name": "spryker/spryker-shop", diff --git a/src/Pyz/Glue/EventDispatcher/EventDispatcherDependencyProvider.php b/src/Pyz/Glue/EventDispatcher/EventDispatcherDependencyProvider.php index 70a77265cd..203fe5f70f 100644 --- a/src/Pyz/Glue/EventDispatcher/EventDispatcherDependencyProvider.php +++ b/src/Pyz/Glue/EventDispatcher/EventDispatcherDependencyProvider.php @@ -7,6 +7,7 @@ namespace Pyz\Glue\EventDispatcher; +use Spryker\Glue\EventBehavior\Plugin\EventDispatcher\EventBehaviorEventDispatcherPlugin; use Spryker\Glue\EventDispatcher\EventDispatcherDependencyProvider as SprykerEventDispatcherDependencyProvider; use Spryker\Glue\GlueApplication\Plugin\EventDispatcher\GlueRestControllerListenerEventDispatcherPlugin; use Spryker\Glue\GlueApplication\Plugin\EventDispatcher\ResponseSecurityHeadersEventDispatcherPlugin; @@ -16,7 +17,6 @@ use Spryker\Glue\Router\Plugin\EventDispatcher\RouterListenerEventDispatcherPlugin; use Spryker\Glue\Storage\Plugin\EventDispatcher\StorageKeyCacheEventDispatcherPlugin; use Spryker\Shared\Http\Plugin\EventDispatcher\ResponseListenerEventDispatcherPlugin; -use Spryker\Zed\EventBehavior\Communication\Plugin\EventDispatcher\EventBehaviorEventDispatcherPlugin; class EventDispatcherDependencyProvider extends SprykerEventDispatcherDependencyProvider { @@ -24,6 +24,23 @@ class EventDispatcherDependencyProvider extends SprykerEventDispatcherDependency * @return array<\Spryker\Shared\EventDispatcherExtension\Dependency\Plugin\EventDispatcherPluginInterface> */ protected function getEventDispatcherPlugins(): array + { + return [ + new GlueRestControllerListenerEventDispatcherPlugin(), + new StorageKeyCacheEventDispatcherPlugin(), + new AutoloaderCacheEventDispatcherPlugin(), + new RouterListenerEventDispatcherPlugin(), + new ResponseListenerEventDispatcherPlugin(), + new ResponseSecurityHeadersEventDispatcherPlugin(), + new StrictTransportSecurityHeaderEventDispatcherPlugin(), + new CacheControlHeaderEventDispatcherPlugin(), + ]; + } + + /** + * @return array<\Spryker\Shared\EventDispatcherExtension\Dependency\Plugin\EventDispatcherPluginInterface> + */ + protected function getBackendEventDispatcherPlugins(): array { return [ new GlueRestControllerListenerEventDispatcherPlugin(), @@ -37,4 +54,21 @@ protected function getEventDispatcherPlugins(): array new EventBehaviorEventDispatcherPlugin(), ]; } + + /** + * @return array<\Spryker\Shared\EventDispatcherExtension\Dependency\Plugin\EventDispatcherPluginInterface> + */ + protected function getStorefrontEventDispatcherPlugins(): array + { + return [ + new GlueRestControllerListenerEventDispatcherPlugin(), + new StorageKeyCacheEventDispatcherPlugin(), + new AutoloaderCacheEventDispatcherPlugin(), + new RouterListenerEventDispatcherPlugin(), + new ResponseListenerEventDispatcherPlugin(), + new ResponseSecurityHeadersEventDispatcherPlugin(), + new StrictTransportSecurityHeaderEventDispatcherPlugin(), + new CacheControlHeaderEventDispatcherPlugin(), + ]; + } } diff --git a/src/Pyz/Glue/GlueBackendApiApplication/GlueBackendApiApplicationDependencyProvider.php b/src/Pyz/Glue/GlueBackendApiApplication/GlueBackendApiApplicationDependencyProvider.php index abb12768aa..6d036ea8dd 100644 --- a/src/Pyz/Glue/GlueBackendApiApplication/GlueBackendApiApplicationDependencyProvider.php +++ b/src/Pyz/Glue/GlueBackendApiApplication/GlueBackendApiApplicationDependencyProvider.php @@ -9,7 +9,7 @@ use Spryker\Glue\CategoriesBackendApi\Plugin\GlueApplication\CategoriesBackendApiResource; use Spryker\Glue\DynamicEntityBackendApi\Plugin\GlueApplication\DynamicEntityRouteProviderPlugin; -use Spryker\Glue\EventDispatcher\Plugin\Application\EventDispatcherApplicationPlugin; +use Spryker\Glue\EventDispatcher\Plugin\GlueBackendApiApplication\EventDispatcherApplicationPlugin; use Spryker\Glue\GlueBackendApiApplication\GlueBackendApiApplicationDependencyProvider as SprykerGlueBackendApiApplicationDependencyProvider; use Spryker\Glue\GlueBackendApiApplication\Plugin\GlueApplication\ApplicationIdentifierRequestBuilderPlugin; use Spryker\Glue\GlueBackendApiApplication\Plugin\GlueApplication\LocaleRequestBuilderPlugin; diff --git a/src/Pyz/Glue/GlueStorefrontApiApplication/GlueStorefrontApiApplicationDependencyProvider.php b/src/Pyz/Glue/GlueStorefrontApiApplication/GlueStorefrontApiApplicationDependencyProvider.php index d4e5887bd8..b4767d3336 100644 --- a/src/Pyz/Glue/GlueStorefrontApiApplication/GlueStorefrontApiApplicationDependencyProvider.php +++ b/src/Pyz/Glue/GlueStorefrontApiApplication/GlueStorefrontApiApplicationDependencyProvider.php @@ -7,6 +7,7 @@ namespace Pyz\Glue\GlueStorefrontApiApplication; +use Spryker\Glue\EventDispatcher\Plugin\GlueStorefrontApiApplication\EventDispatcherApplicationPlugin; use Spryker\Glue\GlueStorefrontApiApplication\GlueStorefrontApiApplicationDependencyProvider as SprykerGlueStorefrontApiApplicationDependencyProvider; use Spryker\Glue\GlueStorefrontApiApplication\Plugin\GlueApplication\ApplicationIdentifierRequestBuilderPlugin; use Spryker\Glue\GlueStorefrontApiApplication\Plugin\GlueApplication\LocaleRequestBuilderPlugin; @@ -21,6 +22,7 @@ use Spryker\Glue\OauthApi\Plugin\CustomerRequestBuilderPlugin; use Spryker\Glue\OauthApi\Plugin\GlueApplication\CustomerRequestValidatorPlugin; use Spryker\Glue\OauthApi\Plugin\GlueApplication\OauthApiTokenResource; +use Spryker\Glue\Router\Plugin\Application\RouterApplicationPlugin; use Spryker\Glue\StoresApi\Plugin\GlueApplication\StoreValidatorPlugin; use Spryker\Glue\StoresApi\Plugin\GlueStorefrontApiApplication\StoreApplicationPlugin; use Spryker\Glue\StoresApi\Plugin\GlueStorefrontApiApplication\StoresResource; @@ -102,6 +104,8 @@ protected function getApplicationPlugins(): array new HttpApplicationPlugin(), new StoreApplicationPlugin(), new LocaleApplicationPlugin(), + new RouterApplicationPlugin(), + new EventDispatcherApplicationPlugin(), ]; } } From 85b5eb43b07a7b8b86701a6834de2876763e72ae Mon Sep 17 00:00:00 2001 From: Spryker Bot Date: Thu, 16 Nov 2023 13:13:40 +0000 Subject: [PATCH 2/2] FRW-2276 Merge nonsplit/master. --- composer.lock | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index f98049c2d0..dbff741528 100644 --- a/composer.lock +++ b/composer.lock @@ -31973,7 +31973,7 @@ }, { "name": "spryker/event-behavior", - "version": "1.26.0", + "version": "1.27.0", "source": { "type": "git", "url": "https://github.com/spryker/event-behavior.git", @@ -32048,20 +32048,20 @@ }, { "name": "spryker/event-dispatcher", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/spryker/event-dispatcher.git", - "reference": "fb60faa79ed150f57c8836dca31e1a6fc8b348ff" + "reference": "9c363533be50b2edf20e35a5f8b0399d24f87732" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spryker/event-dispatcher/zipball/fb60faa79ed150f57c8836dca31e1a6fc8b348ff", - "reference": "fb60faa79ed150f57c8836dca31e1a6fc8b348ff", + "url": "https://api.github.com/repos/spryker/event-dispatcher/zipball/9c363533be50b2edf20e35a5f8b0399d24f87732", + "reference": "9c363533be50b2edf20e35a5f8b0399d24f87732", "shasum": "" }, "require": { - "php": ">=8.0", + "php": ">=8.1", "spryker/application-extension": "^1.0.0", "spryker/event-dispatcher-extension": "^1.0.0", "spryker/kernel": "^3.52.0", @@ -32072,9 +32072,6 @@ "spryker/container": "*", "spryker/testify": "*" }, - "suggest": { - "spryker/container": "If you want to use the EventDispatcherApplicationPlugin" - }, "type": "library", "extra": { "branch-alias": { @@ -32095,9 +32092,9 @@ ], "description": "EventDispatcher module", "support": { - "source": "https://github.com/spryker/event-dispatcher/tree/1.5.0" + "source": "https://github.com/spryker/event-dispatcher/tree/1.6.0" }, - "time": "2023-09-07T10:42:07+00:00" + "time": "2023-11-16T13:02:58+00:00" }, { "name": "spryker/event-dispatcher-extension",