Skip to content

Commit 085581d

Browse files
committed
Merge branch 'sw-27055/fix-attribute-saving' into '5.7'
SW-27055 - Fix attribute saving See merge request shopware/5/product/shopware!991
2 parents b338b27 + b1253c2 commit 085581d

File tree

57 files changed

+695
-1261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+695
-1261
lines changed

.env.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ DB_NAME=shopware
55
DB_PORT=3306
66
SW_HOST=localhost
77
SW_BASE_PATH=
8+
SELENIUM_HOST=selenium
89
ELASTICSEARCH_HOST=elasticsearch

.gitlab-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ variables:
1616
DB_NAME: shopware
1717
SW_HOST: "localhost"
1818
SW_BASE_PATH: ""
19+
SELENIUM_HOST: selenium
1920
ELASTICSEARCH_HOST: elasticsearch
2021

2122
# Include the default gitlab rules template for "MergeRequest-Pipelines".
@@ -238,7 +239,7 @@ Elasticsearch 7:
238239
- chown -R www-data:www-data .
239240
- sudo -E -u www-data vendor/bin/behat -vv --config=tests/Mink/behat.yml --format=pretty --out=std --format=junit --out=${ARTIFACTS_ROOT}/mink --tags ${MINK_TAG}
240241
services:
241-
- name: selenium/standalone-chrome:84.0
242+
- name: selenium/standalone-chrome:94.0
242243
alias: selenium
243244
- name: mailhog/mailhog
244245
alias: smtp

.phpstan-baseline.neon

Lines changed: 0 additions & 745 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ debug-config-test: .make.config.build.debug
126126
touch $@
127127

128128
.make.config.behat:
129-
@sed -e 's/%sw\.host%/$(SW_HOST)/g' -e 's|%sw\.path%|$(SW_BASE_PATH)|g' < ./build/behat.yml.dist > ./tests/Mink/behat.yml
129+
@sed -e 's/%sw\.host%/$(SW_HOST)/g' -e 's|%sw\.path%|$(SW_BASE_PATH)|g' -e 's|%selenium\.host%|$(SELENIUM_HOST)|g' < ./tests/Mink/behat.yml.dist > ./tests/Mink/behat.yml
130130
touch $@
131131

132132
.make.install.composer-dependencies:

build/behat.yml.dist

Lines changed: 0 additions & 84 deletions
This file was deleted.

engine/Library/Enlight/Controller/Action.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ public function forward($action, $controller = null, $module = null, array $para
262262
* @param string|array $url
263263
*
264264
* @throws Exception
265+
*
266+
* @return void
265267
*/
266268
public function redirect($url, array $options = [])
267269
{

engine/Shopware/Controllers/Frontend/Blog.php

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ class Shopware_Controllers_Frontend_Blog extends Enlight_Controller_Action
7474
*/
7575
protected $blogBaseUrl;
7676

77+
/**
78+
* @return void
79+
*/
7780
public function init()
7881
{
7982
$this->blogBaseUrl = Shopware()->Config()->get('baseFile');
@@ -142,6 +145,8 @@ public function getCommentConfirmRepository()
142145

143146
/**
144147
* Index action method
148+
*
149+
* @return void
145150
*/
146151
public function indexAction()
147152
{
@@ -240,7 +245,9 @@ public function indexAction()
240245
}
241246

242247
if (!empty($categoryContent['external'])) {
243-
return $this->redirect($categoryContent['external'], ['code' => 301]);
248+
$this->redirect($categoryContent['external'], ['code' => 301]);
249+
250+
return;
244251
}
245252

246253
$assigningData = [
@@ -273,6 +280,8 @@ public function indexAction()
273280
* Contains the logic for the detail page of a blog article
274281
*
275282
* @throws Enlight_Controller_Exception
283+
*
284+
* @return void
276285
*/
277286
public function detailAction()
278287
{
@@ -309,7 +318,9 @@ public function detailAction()
309318
}
310319

311320
if (isset($location)) {
312-
return $this->redirect($location, ['code' => 301]);
321+
$this->redirect($location, ['code' => 301]);
322+
323+
return;
313324
}
314325

315326
// Load the right template
@@ -320,11 +331,13 @@ public function detailAction()
320331
$this->View()->assign('userLoggedIn', !empty(Shopware()->Session()->get('sUserId')));
321332
if (!empty(Shopware()->Session()->get('sUserId')) && empty($this->Request()->get('name'))
322333
&& $this->Request()->getParam('__cache') === null) {
323-
$userData = Shopware()->Modules()->Admin()->sGetUserData();
324-
$this->View()->assign('sFormData', [
325-
'eMail' => $userData['additional']['user']['email'],
326-
'name' => $userData['billingaddress']['firstname'] . ' ' . $userData['billingaddress']['lastname'],
327-
]);
334+
$customerData = Shopware()->Modules()->Admin()->sGetUserData();
335+
if (\is_array($customerData)) {
336+
$this->View()->assign('sFormData', [
337+
'eMail' => $customerData['additional']['user']['email'],
338+
'name' => $customerData['billingaddress']['firstname'] . ' ' . $customerData['billingaddress']['lastname'],
339+
]);
340+
}
328341
}
329342

330343
$mediaIds = array_column($blogArticleData['media'], 'mediaId');
@@ -374,6 +387,8 @@ public function detailAction()
374387
* Rating action method
375388
*
376389
* Save and review the blog comment and rating
390+
*
391+
* @return void
377392
*/
378393
public function ratingAction()
379394
{
@@ -400,7 +415,9 @@ public function ratingAction()
400415

401416
$this->sSaveComment($commentData, $blogArticleId);
402417

403-
return $this->forward('detail');
418+
$this->forward('detail');
419+
420+
return;
404421
}
405422
$sErrorFlag['invalidHash'] = true;
406423
}
@@ -561,6 +578,8 @@ public function getCategoryBreadcrumb($categoryId)
561578
* @param int $blogArticleId
562579
*
563580
* @throws Enlight_Exception
581+
*
582+
* @return void
564583
*/
565584
protected function sSaveComment($commentData, $blogArticleId)
566585
{
@@ -650,9 +669,12 @@ protected function getPagerData($totalResult, $limitEnd, $page, $categoryId, arr
650669
/**
651670
* Helper method to fill the data set with the right category link
652671
*
653-
* @param string $requestParameterName
654-
* @param string $requestParameterValue
655-
* @param bool $addRemoveProperty | true to add a remove property to remove the selected filters
672+
* @param array<array<string, mixed>> $filterData
673+
* @param string $requestParameterName
674+
* @param string $requestParameterValue
675+
* @param bool $addRemoveProperty | true to add a remove property to remove the selected filters
676+
*
677+
* @return array<array<string, mixed>>
656678
*/
657679
protected function addLinksToFilter(array $filterData, $requestParameterName, $requestParameterValue, $addRemoveProperty = true)
658680
{

0 commit comments

Comments
 (0)