Skip to content

Commit 56c2f45

Browse files
committed
Merge branch '5.0' into cacheable-query-params
2 parents d03849f + 9b65a5a commit 56c2f45

File tree

814 files changed

+150320
-29235
lines changed

Some content is hidden

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

814 files changed

+150320
-29235
lines changed

.github/workflows/api_refs.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ jobs:
7373
git diff-index --quiet --cached HEAD || git commit -m "PHP API Ref HTML"
7474
git add docs/api/rest_api/rest_api_reference/rest_api_reference.html
7575
git diff-index --quiet --cached HEAD || git commit -m "REST API Ref HTML"
76+
if [[ '4.6' != $BASE_BRANCH ]]; then
77+
git add docs/api/rest_api/rest_api_reference/openapi.yaml
78+
git add docs/api/rest_api/rest_api_reference/openapi.json
79+
git diff-index --quiet --cached HEAD || git commit -m "REST API OpenAPI spec"
80+
fi
7681
7782
- name: Create Pull Request
7883
uses: peter-evans/create-pull-request@v7

.github/workflows/code_samples.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: Run PHPStan analysis
4747
run: composer phpstan
4848

49+
- name: Deptrac
50+
run: composer deptrac
51+
4952
- name: Run rector
5053
run: vendor/bin/rector process --dry-run --ansi
5154

.github/workflows/preview_comment.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 0
25+
26+
- name: Fetch base branch for comparison
27+
run: git fetch origin ${{ github.base_ref }} --depth=1
2728

2829
- name: Create comment for changed files
2930
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ auth.json
1111
.yarn
1212
yarn.lock
1313
docs/css/*.map
14+
.deptrac.cache

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,33 @@ of the command.
5353

5454
## Testing the code samples
5555

56+
### PHPStan
57+
5658
This repository uses PHPStan to test the code samples. To run the tests locally execute the commands below:
5759
```bash
5860
composer update
5961
composer phpstan
6062
```
6163

64+
Regenerate the baseline by running:
65+
```bash
66+
composer phpstan -- --generate-baseline
67+
```
68+
69+
### Deptrac
70+
71+
This repository uses Deptrac to test the code samples. To run the tests locally execute the commands below:
72+
73+
```bash
74+
composer update
75+
composer deptrac
76+
```
77+
78+
Regenerate the baseline by running:
79+
```bash
80+
vendor/bin/deptrac --formatter=baseline
81+
```
82+
6283
## Where to View
6384

6485
https://doc.ibexa.co

code_samples/api/commerce/src/Command/CartCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
use Ibexa\Contracts\Cart\Value\EntryAddStruct;
1313
use Ibexa\Contracts\Cart\Value\EntryUpdateStruct;
1414
use Ibexa\Contracts\Checkout\Reorder\ReorderService;
15+
use Ibexa\Contracts\Core\Repository\PermissionResolver;
1516
use Ibexa\Contracts\Core\Repository\UserService;
1617
use Ibexa\Contracts\OrderManagement\OrderServiceInterface;
1718
use Ibexa\Contracts\ProductCatalog\CurrencyServiceInterface;
1819
use Ibexa\Contracts\ProductCatalog\ProductServiceInterface;
19-
use Ibexa\Core\Repository\Permission\PermissionResolver;
2020
use Symfony\Component\Console\Attribute\AsCommand;
2121
use Symfony\Component\Console\Command\Command;
2222
use Symfony\Component\Console\Input\InputInterface;
@@ -54,7 +54,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5454
$cartsList = $this->cartService->findCarts($cartQuery);
5555

5656
$cartsList->getCarts(); // array of CartInterface objects
57-
$cartsList->getTotalCount(); // number of returned carts
57+
$cartsList->getTotalCount(); // number of matching carts regardless of the limit
5858

5959
foreach ($cartsList as $cart) {
6060
$output->writeln($cart->getIdentifier() . ': ' . $cart->getName());

code_samples/api/migration/src/Command/MigrationCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Command;
44

5-
use Ibexa\Migration\MigrationService;
5+
use Ibexa\Contracts\Migration\MigrationService;
66
use Ibexa\Migration\Repository\Migration;
77
use Symfony\Component\Console\Attribute\AsCommand;
88
use Symfony\Component\Console\Command\Command;

code_samples/api/public_php_api/src/Command/SegmentCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Ibexa\Contracts\Core\Repository\PermissionResolver;
66
use Ibexa\Contracts\Core\Repository\UserService;
7-
use Ibexa\Segmentation\Service\SegmentationService;
7+
use Ibexa\Contracts\Segmentation\SegmentationServiceInterface;
88
use Ibexa\Segmentation\Value\SegmentCreateStruct;
99
use Ibexa\Segmentation\Value\SegmentGroupCreateStruct;
1010
use Symfony\Component\Console\Attribute\AsCommand;
@@ -18,7 +18,7 @@
1818
class SegmentCommand extends Command
1919
{
2020
public function __construct(
21-
private readonly SegmentationService $segmentationService,
21+
private readonly SegmentationServiceInterface $segmentationService,
2222
private readonly UserService $userService,
2323
private readonly PermissionResolver $permissionResolver
2424
) {

code_samples/back_office/images/src/PlaceholderProvider.php

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

code_samples/back_office/limitation/src/Controller/CustomController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ private function getCustomLimitationValue(): bool
5252
return $customLimitationValues['value'] ?? false;
5353
}
5454

55+
#[\Override]
5556
public function performAccessCheck(): void
5657
{
5758
$this->traitPerformAccessCheck();

0 commit comments

Comments
 (0)