From 4858bede931cffab98e4a686412d08bee1bd3483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Klatt?= Date: Fri, 29 May 2020 13:03:33 +0000 Subject: [PATCH 1/3] TE-5961 Refactored all ContainerInterface array access to setter. --- .../Yves/WishlistWidget/WishlistWidgetDependencyProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SprykerShop/Yves/WishlistWidget/WishlistWidgetDependencyProvider.php b/src/SprykerShop/Yves/WishlistWidget/WishlistWidgetDependencyProvider.php index da18b37..de6b252 100644 --- a/src/SprykerShop/Yves/WishlistWidget/WishlistWidgetDependencyProvider.php +++ b/src/SprykerShop/Yves/WishlistWidget/WishlistWidgetDependencyProvider.php @@ -34,9 +34,9 @@ public function provideDependencies(Container $container) */ protected function addWishlistClient(Container $container): Container { - $container[static::CLIENT_WISHLIST] = function (Container $container) { + $container->set(static::CLIENT_WISHLIST, function (Container $container) { return new WishlistWidgetToWishlistClientBridge($container->getLocator()->wishlist()->client()); - }; + }); return $container; } From 5260822fddd8c9faf6d8af07f79e1c81af69b606 Mon Sep 17 00:00:00 2001 From: mscherer Date: Tue, 23 Jun 2020 12:28:33 +0200 Subject: [PATCH 2/3] Add deprecations per module for shop modules. nonsplit only. --- .gitattributes | 1 + psalm-report.json | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 psalm-report.json diff --git a/.gitattributes b/.gitattributes index 2a48adb..6f3546f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -24,6 +24,7 @@ codeception.yml export-ignore dependency.json export-ignore phpstan.json export-ignore phpstan.neon export-ignore +psalm-report.json export-ignore tooling.yml export-ignore .coveralls.yml export-ignore .travis.yml export-ignore diff --git a/psalm-report.json b/psalm-report.json new file mode 100644 index 0000000..9a399a4 --- /dev/null +++ b/psalm-report.json @@ -0,0 +1,79 @@ +{ + "error": [], + "warning": [ + { + "severity": "info", + "line_from": 36, + "line_to": 36, + "type": "PossiblyNullPropertyAssignmentValue", + "message": "$this->activeWishlistId with non-nullable declared type 'int' cannot be assigned nullable type 'int|null'", + "file_name": "vendor/spryker/spryker-shop/Bundles/WishlistWidget/src/SprykerShop/Yves/WishlistWidget/Widget/WishlistMenuItemWidget.php", + "snippet": " $this->activeWishlistId = $activeEntityId;", + "selected_text": "$activeEntityId", + "error_level": 3, + "shortcode": 148 + }, + { + "severity": "info", + "line_from": 38, + "line_to": 38, + "type": "UndefinedMagicMethod", + "message": "Magic method Spryker\\Shared\\Kernel\\BundleProxy::client does not exist", + "file_name": "vendor/spryker/spryker-shop/Bundles/WishlistWidget/src/SprykerShop/Yves/WishlistWidget/WishlistWidgetDependencyProvider.php", + "snippet": " return new WishlistWidgetToWishlistClientBridge($container->getLocator()->wishlist()->client());", + "selected_text": "client", + "error_level": 4, + "shortcode": 219 + } + ], + "deprecation": [ + { + "severity": "info", + "line_from": 19, + "line_to": 19, + "type": "DeprecatedInterface", + "message": "SprykerShop\\Yves\\CustomerPage\\Dependency\\Plugin\\WishlistWidget\\WishlistMenuItemWidgetPluginInterface is marked deprecated", + "file_name": "vendor/spryker/spryker-shop/Bundles/WishlistWidget/src/SprykerShop/Yves/WishlistWidget/Plugin/CustomerPage/WishlistMenuItemWidgetPlugin.php", + "snippet": "class WishlistMenuItemWidgetPlugin extends AbstractWidgetPlugin implements WishlistMenuItemWidgetPluginInterface", + "selected_text": "WishlistMenuItemWidgetPlugin", + "error_level": 2, + "shortcode": 152 + }, + { + "severity": "info", + "line_from": 19, + "line_to": 19, + "type": "DeprecatedClass", + "message": "Spryker\\Yves\\Kernel\\Widget\\AbstractWidgetPlugin is marked deprecated", + "file_name": "vendor/spryker/spryker-shop/Bundles/WishlistWidget/src/SprykerShop/Yves/WishlistWidget/Plugin/CustomerPage/WishlistMenuItemWidgetPlugin.php", + "snippet": "class WishlistMenuItemWidgetPlugin extends AbstractWidgetPlugin implements WishlistMenuItemWidgetPluginInterface", + "selected_text": "AbstractWidgetPlugin", + "error_level": 2, + "shortcode": 98 + }, + { + "severity": "info", + "line_from": 17, + "line_to": 17, + "type": "DeprecatedInterface", + "message": "SprykerShop\\Yves\\ProductDetailPage\\Dependency\\Plugin\\WishlistWidget\\WishlistWidgetPluginInterface is marked deprecated", + "file_name": "vendor/spryker/spryker-shop/Bundles/WishlistWidget/src/SprykerShop/Yves/WishlistWidget/Plugin/ProductDetailPage/WishlistWidgetPlugin.php", + "snippet": "class WishlistWidgetPlugin extends AbstractWidgetPlugin implements WishlistWidgetPluginInterface", + "selected_text": "WishlistWidgetPlugin", + "error_level": 2, + "shortcode": 152 + }, + { + "severity": "info", + "line_from": 17, + "line_to": 17, + "type": "DeprecatedClass", + "message": "Spryker\\Yves\\Kernel\\Widget\\AbstractWidgetPlugin is marked deprecated", + "file_name": "vendor/spryker/spryker-shop/Bundles/WishlistWidget/src/SprykerShop/Yves/WishlistWidget/Plugin/ProductDetailPage/WishlistWidgetPlugin.php", + "snippet": "class WishlistWidgetPlugin extends AbstractWidgetPlugin implements WishlistWidgetPluginInterface", + "selected_text": "AbstractWidgetPlugin", + "error_level": 2, + "shortcode": 98 + } + ] +} \ No newline at end of file From d3853ea7ddd6f84f295d1c93690ba10b60173b57 Mon Sep 17 00:00:00 2001 From: mscherer Date: Tue, 23 Jun 2020 12:52:25 +0200 Subject: [PATCH 3/3] Use linguist-generated=true as binary replacement for display removal in github diff. --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 6f3546f..03b625d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -24,7 +24,7 @@ codeception.yml export-ignore dependency.json export-ignore phpstan.json export-ignore phpstan.neon export-ignore -psalm-report.json export-ignore +psalm-report.json export-ignore linguist-generated=true tooling.yml export-ignore .coveralls.yml export-ignore .travis.yml export-ignore