Merge branch 'develop' into prod
Release / build (push) Successful in 11s
CI / testsuite (mysql, 8.2, ) (push) Successful in 3m48s
CI / testsuite (mysql, 8.5, ) (push) Successful in 2m44s
CI / testsuite (pgsql, 8.2, ) (push) Successful in 3m22s
CI / testsuite (pgsql, 8.5, ) (push) Successful in 2m43s
CI / testsuite (sqlite, 8.2, ) (push) Successful in 3m16s
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Successful in 3m33s
CI / Coding Standard & Static Analysis (push) Successful in 2m23s
CI / testsuite (sqlite, 8.5, ) (push) Successful in 2m43s
Release / build (push) Successful in 11s
CI / testsuite (mysql, 8.2, ) (push) Successful in 3m48s
CI / testsuite (mysql, 8.5, ) (push) Successful in 2m44s
CI / testsuite (pgsql, 8.2, ) (push) Successful in 3m22s
CI / testsuite (pgsql, 8.5, ) (push) Successful in 2m43s
CI / testsuite (sqlite, 8.2, ) (push) Successful in 3m16s
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Successful in 3m33s
CI / Coding Standard & Static Analysis (push) Successful in 2m23s
CI / testsuite (sqlite, 8.5, ) (push) Successful in 2m43s
This commit is contained in:
@@ -11,7 +11,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-version: ['8.2', '8.4']
|
php-version: ['8.2', '8.5']
|
||||||
# db-type: ['mysql']
|
# db-type: ['mysql']
|
||||||
db-type: ['sqlite', 'mysql', 'pgsql']
|
db-type: ['sqlite', 'mysql', 'pgsql']
|
||||||
prefer-lowest: ['']
|
prefer-lowest: ['']
|
||||||
|
|||||||
@@ -87,10 +87,7 @@ class CartItemsController extends AppController {
|
|||||||
public function edit($id = null) {
|
public function edit($id = null) {
|
||||||
$this->request->allowMethod(['post', 'put', 'patch']);
|
$this->request->allowMethod(['post', 'put', 'patch']);
|
||||||
|
|
||||||
$cartItem = $this->CartItems->find()
|
$cartItem = $this->CartItems->get($id, contain: ['Carts']);
|
||||||
->where(['CartItems.id' => $id])
|
|
||||||
->contain(['Carts'])
|
|
||||||
->firstOrFail();
|
|
||||||
|
|
||||||
$this->ShoppingCart->checkIfIsOwnCart($cartItem->cart);
|
$this->ShoppingCart->checkIfIsOwnCart($cartItem->cart);
|
||||||
|
|
||||||
@@ -135,11 +132,7 @@ class CartItemsController extends AppController {
|
|||||||
$this->request->allowMethod(['post', 'delete']);
|
$this->request->allowMethod(['post', 'delete']);
|
||||||
$identity = $this->getRequest()->getAttribute('identity');
|
$identity = $this->getRequest()->getAttribute('identity');
|
||||||
|
|
||||||
// $cart = $this->viewBuilder()->getVar('cart');
|
$cartItem = $this->CartItems->get($id, contain: ['Carts']);
|
||||||
$cartItem = $this->CartItems->find()
|
|
||||||
->where(['CartItems.id' => $id])
|
|
||||||
->contain(['Carts'])
|
|
||||||
->firstOrFail();
|
|
||||||
|
|
||||||
$this->ShoppingCart->checkIfIsOwnCart($cartItem->cart);
|
$this->ShoppingCart->checkIfIsOwnCart($cartItem->cart);
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ enum CartTypeId: int implements EnumLabelInterface
|
|||||||
*/
|
*/
|
||||||
public function label(): string {
|
public function label(): string {
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
static::Cart => 'Cart',
|
CartTypeId::Cart => 'Cart',
|
||||||
static::Wishlist => 'Wishlist',
|
CartTypeId::Wishlist => 'Wishlist',
|
||||||
static::CustomList => 'List'
|
CartTypeId::CustomList => 'List'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user