Skip to content

Commit 4bfed28

Browse files
authored
Merge branch '5.0' into response-tagget
2 parents d6ef364 + e153d5f commit 4bfed28

3,656 files changed

Lines changed: 68871 additions & 26960 deletions

File tree

Some content is hidden

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

.github/workflows/build.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ jobs:
6565
exit 1
6666
fi
6767
68+
markdownlint:
69+
runs-on: ubuntu-latest
70+
if: github.event_name == 'pull_request'
71+
72+
steps:
73+
- uses: actions/checkout@v4
74+
75+
- name: Run markdownlint
76+
uses: DavidAnson/markdownlint-cli2-action@v20
77+
with:
78+
globs: "docs/**/*.md"
79+
6880
vale-check:
6981
runs-on: ubuntu-latest
7082
if: github.event_name == 'pull_request'
@@ -82,7 +94,7 @@ jobs:
8294
mv vale-styles-main/* vale-styles-main/.vale.ini .
8395
8496
- name: Run Vale.sh
85-
uses: errata-ai/vale-action@reviewdog
97+
uses: vale-cli/vale-action@v2
8698
with:
8799
reporter: github-check
88100
filter_mode: added

.github/workflows/code_samples.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
runs-on: "ubuntu-22.04"
1010
strategy:
1111
matrix:
12+
fail-fast: false
1213
php:
1314
- "8.4" # Upper supported version
1415
- "8.3" # Lower supported version
@@ -45,12 +46,15 @@ jobs:
4546
dependency-versions: highest
4647

4748
- name: Run PHPStan analysis
49+
continue-on-error: true
4850
run: composer phpstan
4951

5052
- name: Run Deptrac analysis
53+
continue-on-error: true
5154
run: composer deptrac
5255

5356
- name: Run Rector check
57+
continue-on-error: true
5458
run: composer check-rector
5559

5660
code-samples-inclusion-check:

.markdownlint-cli2.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
config:
2+
default: false
3+
heading-style: consistent
4+
list-indent: true
5+
no-reversed-links: true
6+
no-missing-space-atx: true
7+
heading-start-left: true
8+
no-multiple-space-blockquote: true
9+
no-blanks-blockquote: true
10+
hr-style: true
11+
no-empty-links: true
12+
code-fence-style: backtick
13+
strong-style: asterisk
14+
table-pipe-style:
15+
style: leading_and_trailing
16+
17+
ignores:
18+
- "docs/snippets/**"
19+
- "docs/index.md"

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mkdocs:
55
fail_on_warning: true
66

77
build:
8-
os: ubuntu-20.04
8+
os: ubuntu-24.04
99
tools:
1010
python: "3.13"
1111

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,9 @@ If you'd like to see Ibexa DXP in your language, you can [contribute to the tran
2020

2121
### Contribute to API reference
2222

23-
The REST API Reference is located in the `docs/api/rest_api/rest_api_reference/rest_api_reference.html`
24-
file, which is generated automatically by the RAML2HTML tool.
25-
It is based on `*.raml` files located in the `docs/api/rest_api/rest_api_reference/input` directory that you can edit in your editor/IDE.
26-
27-
After you modify relevant files in the input folder, you can generate an HTML file from repository root (this step can also be performed by one of the Tech Writers during PR review):
28-
29-
`php tools/raml2html/raml2html.php build --non-standard-http-methods=COPY,MOVE,PUBLISH,SWAP -t default -o docs/api/rest_api/rest_api_reference/output/ docs/api/rest_api/rest_api_reference/input/ibexa.raml`
30-
31-
In case of errors, look for mistakes in the RAML file, for example, double apostrophes.
32-
Move `rest_api_reference.html` from the output folder to `docs/api/rest_api/rest_api_reference/` root.
33-
34-
See `tools/raml2html/README.md` for more information.
23+
The REST API Reference is located in the `docs/api/rest_api/rest_api_reference/` directory.
24+
It is based on an OpenAPI specification (`openapi.yaml` / `openapi.json`) generated from the Ibexa DXP source code.
25+
To contribute to the REST API reference, you must modify the source code annotations directly.
3526

3627
## Build and preview documentation
3728

@@ -53,6 +44,28 @@ of the command.
5344

5445
## Testing the code samples
5546

47+
### markdownlint
48+
49+
This repository uses [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) to check Markdown formatting, including table syntax.
50+
51+
Install dependencies:
52+
53+
```bash
54+
yarn install
55+
```
56+
57+
Run the linter:
58+
59+
```bash
60+
yarn markdownlint
61+
```
62+
63+
Some issues can be fixed automatically:
64+
65+
```bash
66+
yarn markdownlint --fix
67+
```
68+
5669
### PHPStan
5770

5871
This repository uses PHPStan to test the code samples. To run the tests locally execute the commands below:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
ibexa_connector_gemini:
2+
text_to_text:
3+
models:
4+
gemini-pro-latest:
5+
label: 'Gemini Pro Latest'
6+
max_tokens: 4096
7+
gemini-flash-latest:
8+
label: 'Gemini Flash Latest'
9+
max_tokens: 4096
10+
default_model: gemini-pro-latest
11+
default_max_tokens: 4096 # Must be <= the model’s max_tokens
12+
default_temperature: 0.8
13+
image_to_text:
14+
models:
15+
gemini-flash-latest:
16+
label: 'Gemini Flash Latest'
17+
max_tokens: 4096
18+
default_model: gemini-flash-latest
19+
default_max_tokens: 4096
20+
default_temperature: 1.0
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
App\GraphQL\Schema\MyFieldDefinitionMapper:
3+
decorates: Ibexa\GraphQL\Schema\Domain\Content\Mapper\FieldDefinition\DecoratingFieldDefinitionMapper
4+
arguments:
5+
$innerMapper: '@.inner'

code_samples/api/graphql/src/GraphQL/Schema/MyCustomFieldDefinitionMapper.php

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace App\GraphQL\Schema;
4+
5+
use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType;
6+
use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition;
7+
use Ibexa\Contracts\GraphQL\Schema\Domain\Content\Mapper\FieldDefinition\FieldDefinitionMapper;
8+
use Ibexa\GraphQL\Schema\Domain\Content\Mapper\FieldDefinition\DecoratingFieldDefinitionMapper;
9+
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;
10+
11+
class MyFieldDefinitionMapper extends DecoratingFieldDefinitionMapper implements FieldDefinitionMapper
12+
{
13+
protected function getFieldTypeIdentifier(): string
14+
{
15+
return 'my_field_type';
16+
}
17+
18+
public function mapToFieldValueInputType(ContentType $contentType, FieldDefinition $fieldDefinition): ?string
19+
{
20+
if (!$this->canMap($fieldDefinition)) {
21+
return parent::mapToFieldValueInputType($contentType, $fieldDefinition);
22+
}
23+
24+
return $this->nameMyFieldInputType($contentType, $fieldDefinition);
25+
}
26+
27+
private function nameMyFieldInputType(ContentType $contentType, FieldDefinition $fieldDefinition): string
28+
{
29+
$converter = new CamelCaseToSnakeCaseNameConverter(null, false);
30+
31+
return sprintf(
32+
'%s%sInput',
33+
$converter->denormalize($contentType->identifier),
34+
$converter->denormalize($fieldDefinition->identifier)
35+
);
36+
}
37+
}

code_samples/back_office/limitation/config/append_to_services.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,18 @@ services:
1010
App\Security\Limitation\Mapper\CustomLimitationValueMapper:
1111
tags:
1212
- { name: 'ibexa.admin_ui.limitation.mapper.value', limitationType: 'CustomLimitation' }
13+
14+
App\Security\FormPolicyProvider:
15+
tags:
16+
- { name: ibexa.permissions.limitation_type }
17+
18+
App\Security\FormSubmissionsTabDecorator:
19+
parent: Ibexa\FormBuilder\Tab\LocationView\SubmissionsTab
20+
decorates: 'Ibexa\FormBuilder\Tab\LocationView\SubmissionsTab'
21+
arguments:
22+
$innerTab: '@.inner'
23+
24+
App\Security\FormSubmissionServiceDecorator:
25+
decorates: Ibexa\FormBuilder\FormSubmission\FormSubmissionService
26+
arguments:
27+
$innerService: '@App\Security\FormSubmissionServiceDecorator.inner'

0 commit comments

Comments
 (0)