Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
php-version:
- 8.2
- 8.3
- 8.4
- 8.5
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,6 +61,7 @@ jobs:
- php-version: '8.2'
- php-version: '8.3'
- php-version: '8.4'
- php-version: '8.5'
steps:
- uses: actions/checkout@v4

Expand All @@ -77,15 +80,15 @@ jobs:
- name: Code Quality (by PHPStan)
run: vendor/bin/phpstan analyse -c Build/phpstan.neon

tests-acceptance:
test-unit-and-functional:
runs-on: ubuntu-latest
needs:
- coding-guideline
- code-quality
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- uses: cachix/install-nix-action@v17
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable

Expand All @@ -98,6 +101,20 @@ jobs:
- name: Run Unit Tests PHP8.4
run: nix-shell --arg phpVersion \"php84\" --pure --run project-test-unit

- name: Run Unit Tests PHP8.5
run: nix-shell --arg phpVersion \"php85\" --pure --run project-test-unit

test-acceptance:
runs-on: ubuntu-latest
needs:
- test-unit-and-functional
steps:
- uses: actions/checkout@v5

- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Run Acceptance Tests PHP8.2
run: nix-shell --arg phpVersion \"php82\" --pure --run project-test-acceptance

Expand All @@ -106,3 +123,7 @@ jobs:

- name: Run Acceptance Tests PHP8.4
run: nix-shell --arg phpVersion \"php84\" --pure --run project-test-acceptance

- name: Run Acceptance Tests PHP8.5
run: nix-shell --arg phpVersion \"php85\" --pure --run project-test-acceptance

151 changes: 0 additions & 151 deletions .gitlab-ci.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Classes/Domain/Model/Book.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public function getBestSpecialPrice(array $frontendUserGroupIds = []): float

foreach ($this->getSpecialPrices() as $specialPrice) {
if ($specialPrice->getPrice() < $bestSpecialPrice) {
if (!$specialPrice->getFrontendUserGroup() ||
in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds)
if (!$specialPrice->getFrontendUserGroup()
|| in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds)
) {
$bestSpecialPrice = $specialPrice->getPrice();
}
Expand Down
8 changes: 4 additions & 4 deletions Classes/EventListener/CheckProductAvailability.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public function __invoke(CheckProductAvailabilityEvent $event): void
$book = $this->bookRepository->findByIdentifier($cartProduct->getProductId());

if (
!$book instanceof Book ||
(
$book->isHandleStock() &&
($quantity > $book->getStock())
!$book instanceof Book
|| (
$book->isHandleStock()
&& ($quantity > $book->getStock())
)
) {
$event->setAvailable(false);
Expand Down
1 change: 0 additions & 1 deletion Tests/Unit/Domain/Model/BookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public function getTaxClassIdReturnsValueForTaxClassId(): void
private function setProperty(object $instance, string $propertyName, mixed $propertyValue)
{
$reflection = new \ReflectionProperty($instance, $propertyName);
$reflection->setAccessible(true);
$reflection->setValue($instance, $propertyValue);
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
},
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"ext-json": "*",
"ext-pdo": "*",
"extcode/cart": "^11.0",
Expand All @@ -55,7 +55,7 @@
"typo3/cms-fluid": "^13.4"
},
"require-dev": {
"codappix/typo3-php-datasets": "^1.5",
"codappix/typo3-php-datasets": "^2.1",
"codeception/codeception": "^5.0",
"codeception/module-db": "^3.1",
"codeception/module-webdriver": "^4.0",
Expand Down
2 changes: 0 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ in pkgs.mkShell {
packages = [ pkgs.gnumake pkgs.busybox ];

shellHook = ''
export TMPDIR=$HOME/.cache/development/cart_books

export PROJECT_ROOT="$(pwd)"

export typo3DatabaseDriver=pdo_sqlite
Expand Down
Loading