Skip to content

Commit b1ff991

Browse files
committed
Merge remote-tracking branch 'origin/release-4.6.22' into update-4.6.22
2 parents e8d1691 + 17fa531 commit b1ff991

File tree

22 files changed

+728
-73
lines changed

22 files changed

+728
-73
lines changed
Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
11
ibexa_twig_components:
22
admin-ui-user-menu:
3-
custom-html-component:
4-
type: html
5-
arguments:
6-
content: '<b>Hello world!</b>'
7-
custom-template-component:
8-
type: template
9-
arguments:
10-
template: '@ibexadesign/ui/component/user_thumbnail/user_thumbnail.html.twig'
11-
parameters:
12-
user_content:
13-
name: "Thumbnail"
14-
thumbnail:
15-
resource: https://placecats.com/100/100
163
custom-controller-component:
174
type: controller
185
arguments:
196
controller: '\App\Controller\MyController::requestAction'
207
parameters:
218
parameter1: 'custom'
229
parameter2: true
23-
admin-ui-stylesheet-head:
24-
custom-link-component:
25-
type: stylesheet
10+
custom-html-component:
11+
type: html
12+
priority: 0
2613
arguments:
27-
href: 'https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback'
28-
rel: stylesheet
29-
crossorigin: anonymous
30-
integrity: sha384-LN/mLhO/GN6Ge8ZPvI7uRsZpiXmtSkep+aFlJcHa8by4TvA34o1am9sa88eUzKTD
31-
type: text/css
14+
content: '<b>Hello world!</b>'
15+
admin-ui-user-menu:
16+
duplicated_user_menu:
17+
type: menu
18+
arguments:
19+
name: ezplatform_admin_ui.menu.user
20+
template: '@ibexadesign/ui/menu/user.html.twig'
21+
depth: 1
3222
admin-ui-script-head:
3323
custom-script-component:
3424
type: script
@@ -39,3 +29,23 @@ ibexa_twig_components:
3929
async: true
4030
integrity: sha384-Ewi2bBDtPbbu4/+fs8sIbBJ3zVl0LDOSznfhFR/JBK+SzggdRdX8XQKauWmI9HH2
4131
type: text/javascript
32+
admin-ui-stylesheet-head:
33+
custom-link-component:
34+
type: stylesheet
35+
arguments:
36+
href: 'https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback'
37+
rel: stylesheet
38+
crossorigin: anonymous
39+
integrity: sha384-LN/mLhO/GN6Ge8ZPvI7uRsZpiXmtSkep+aFlJcHa8by4TvA34o1am9sa88eUzKTD
40+
type: text/css
41+
admin-ui-global-search:
42+
custom-template-component:
43+
type: template
44+
priority: 50
45+
arguments:
46+
template: '@ibexadesign/ui/component/user_thumbnail/user_thumbnail.html.twig'
47+
parameters:
48+
user_content:
49+
name: "Thumbnail"
50+
thumbnail:
51+
resource: https://placecats.com/100/100
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-
2+
type: content
3+
mode: delete
4+
match:
5+
field: content_remote_id
6+
value: __REMOTE_ID__
7+
only_visible_content: true # Optional, default: true. If set to true, only visible content will be deleted.
8+
allow_no_delete: false # Optional, default: false. If set to true, the migration will not fail if no content is found using the specified criteria.

docs/administration/back_office/back_office_elements/custom_components.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The available groups for the back office are:
4747
|`admin-ui-systeminfo-tab-groups`| `vendor/ibexa/system-info/src/bundle/Resources/views/themes/admin/system_info/info.html.twig` |
4848
|`admin-ui-user-menu`| `vendor/ibexa/admin-ui-ui/src/bundle/Resources/views/themes/admin/ui/layout.html.twig` |
4949
|`admin-ui-user-profile-blocks`| `vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/account/profile/view.html.twig` |
50+
|`admin-ui-versions-table-before`|`vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/content/tab/versions/table.html.twig`|
5051

5152
For more information, see [this example using few of those components](components.md#example).
5253

docs/content_management/data_migration/importing_data.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ In this case you assign the `parent_folder_location_id` reference name to the lo
243243
[[= include_file('code_samples/data_migration/examples/create_parent_and_child_content.yaml') =]]
244244
```
245245

246+
Use the `delete` mode to delete content items:
247+
248+
``` yaml
249+
[[= include_file('code_samples/data_migration/examples/delete_content.yaml') =]]
250+
```
251+
246252
### Images
247253

248254
The following example shows how to migrate an `example-image.png` located in `public/var/site/storage/images/3/8/3/0/383-1-eng-GB` without manually placing it in the appropriate path.

docs/infrastructure_and_maintenance/performance.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ In production setups:
5252
- Always enable opcache for php-fpm/`mod_php`.
5353
- Prefer php-fpm and web server using it over fast-cgi for lower overall memory usage.
5454

55+
!!! caution
56+
57+
To avoid deprecations when using PHP 8.2 or 8.3, [[= product_name =]] v4.6 needs an additional error handler.
58+
The error handler is present by default for projects that started with 4.6.8 or later.
59+
For projects that started with earlier versions, you need to add the error handler manually by running the following commands:
60+
61+
``` bash
62+
composer config extra.runtime.error_handler "\\Ibexa\\Contracts\\Core\\MVC\\Symfony\\ErrorHandler\\Php82HideDeprecationsErrorHandler"
63+
composer dump-autoload
64+
```
65+
5566
### Symfony
5667

5768
- Review the [Symfony performance documentation]([[= symfony_doc =]]/performance.html) and apply matching suggestions, including OPCache configuration if enabled.

docs/js/custom.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
let jquery = jQuery;
33

44
$(document).ready(function() {
5+
const latestVersionNumber = '5.0';
6+
57
// replace edit url
68
let branchName = 'master';
79
const branchNameRegexp = /\/en\/([a-z0-9-_.]*)\//g.exec(document.location.href);
@@ -76,6 +78,14 @@ $(document).ready(function() {
7678
const allVersions = [...document.querySelectorAll('.switcher__list .versions dd')];
7779
const olderVersions = document.querySelector('#older-versions');
7880

81+
// Merge "X.Y" and "latest" entries into "X.Y (latest)"
82+
const latestVersion = allVersions.find(v => v.textContent.trim() === 'latest');
83+
const versionXY = allVersions.find(v => v.textContent.trim() === latestVersionNumber);
84+
85+
const versionXYLink = versionXY.querySelector('a');
86+
versionXYLink.textContent = `${latestVersionNumber} (latest)`;
87+
latestVersion.remove();
88+
7989
if (eolVersions.length > 0) {
8090
olderVersions.hidden = false;
8191
}

docs/release_notes/ibexa_dxp_v5.0_deprecations.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ Support for facets in `ibexa/elasticsearch` has been dropped, use the `Aggregati
459459
| `\Ibexa\Rest\Server\Controller\User::refreshSession` | `\Ibexa\Rest\Server\Controller\SessionController::refreshSessionAction` |
460460
| `\Ibexa\Rest\Server\Controller\User::deleteSession` | `\Ibexa\Rest\Server\Controller\SessionController::refreshSessionAction` |
461461

462-
### ibexa/ibexa/scheduler
462+
### ibexa/scheduler
463463

464464
| Old FQN | New FQN / Comment |
465465
|:------------------------------------------------------|:------------------------------------------------------------------------|
@@ -651,6 +651,13 @@ The following service definitions have been removed:
651651
| `ibexa.site_access.config.default.user_registration.group_id` | `ibexa.site_access.config.default.user_registration.group_remote_id` |
652652
| `ezpublish_http_basic` | Use `http_basic` in `security.yml` directly. |
653653

654+
## Session prefix
655+
656+
The default prefix used for [SiteAccess sessions](sessions.md) has been renamed.
657+
658+
| Old prefix | New prefix |
659+
|:----|:----|
660+
| `eZSESSID` | `IBX_SESSION_ID` |
654661

655662
## CSS settings
656663

docs/templating/components.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ month_change: true
88
Twig Components are widgets (for example, **My dashboard** blocks from Headless edition) and HTML code (for example, a tag for loading JS or CSS files) that you can inject into the existing templates to customize and extend the user interface.
99
They are combined into groups that are rendered in designated templates.
1010

11-
Built-in Twig Component groups are available for the [back office](custom_components.md), but you can create your own for use anywhere.
11+
Twig Component groups are available for:
1212

13-
To learn which groups are available in a given view, use the [integration with Symfony Profiler](#symfony-profiler-integration).
13+
- [back office](custom_components.md)
14+
- [storefront](customize_storefront_layout.md)
15+
16+
To learn which groups are available in a given view, use the [integration Symfony Profiler](#symfony-profiler-integration).
1417

1518
## Create Twig Component
1619

@@ -44,23 +47,38 @@ ibexa_twig_components:
4447
# Component name
4548
google_tag_manager:
4649
type: script
50+
priority: 50
4751
arguments:
4852
src: 'https://...'
4953
```
5054

51-
The Component priority cannot be specified when using the YAML configuration, but it allows you to use the built-in components to quickly achieve common goals.
55+
YAML configuration allows you to use the built-in components to quickly achieve common goals.
5256

5357
You can use an unique group name when creating a Twig Component to create your own group.
5458

5559
## Built-in components
5660

5761
| Name | Description | YAML type |
5862
|---|---|---|
63+
| [Controller](https://github.com/ibexa/twig-components/blob/main/src/lib/Component/ControllerComponent.php) | Renders a Symfony controller |`controller` |
64+
| [HTML](https://github.com/ibexa/twig-components/blob/main/src/lib/Component/HtmlComponent.php) | Renders static HTML |`html` |
65+
| [Menu](https://github.com/ibexa/twig-components/blob/main/src/lib/Component/MenuComponent.php) | Renders a [menu](https://symfony.com/bundles/KnpMenuBundle/current/index.html) |`menu` |
5966
| [Script](https://github.com/ibexa/twig-components/blob/main/src/lib/Component/ScriptComponent.php) | Renders a [`<script>` tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script) | `script` |
6067
| [Stylesheet](https://github.com/ibexa/twig-components/blob/main/src/lib/Component/LinkComponent.php) | Renders a [`<link>` tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link) | `stylesheet`
6168
| [Template](https://github.com/ibexa/twig-components/blob/main/src/lib/Component/TemplateComponent.php) | Renders a Twig template|`template` |
62-
| [Controller](https://github.com/ibexa/twig-components/blob/main/src/lib/Component/ControllerComponent.php) | Renders a Symfony controller |`controller` |
63-
| [HTML](https://github.com/ibexa/twig-components/blob/main/src/lib/Component/HtmlComponent.php) | Renders static HTML |`html` |
69+
70+
For the menu component, the following properties are available:
71+
72+
| parameter | type | required | description |
73+
|-----------|----------------------|----------|--------------------------------|
74+
| name | string | yes | Menu name |
75+
| options | array<string, mixed> | no | Options passed to menu builder |
76+
| path | string[] | no | Path to starting node |
77+
| template | string | no | Template used to render menu |
78+
| depth | int | no | Menu depth limit |
79+
80+
The menu component, same as [back office menus](back_office_menus.md), relies on the [KnpMenuBundle](https://symfony.com/bundles/KnpMenuBundle/current/index.html).
81+
For more information about the available properties, refer to the [official documentation of the bundle](https://symfony.com/bundles/KnpMenuBundle/current/index.html#create-your-first-menu).
6482

6583
## Example
6684

docs/templating/layout/customize_storefront_layout.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ To customize your shop, you can override either whole templates, or specific com
1111
The built-in templates belong to the `storefront` [theme](design_engine.md).
1212
To override any of them, copy its directory structure in your template directory.
1313

14+
## Customize with Twig Components
15+
16+
You can customize parts of the storefront by using [Twig components](components.md).
17+
It allows you to inject your own widgets, extending the storefront behavior.
18+
19+
The available groups for the storefront are:
20+
21+
| Group name | Template file |
22+
|---|---|
23+
| `storefront-before-maincart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/maincart/maincart.html.twig` |
24+
| `storefront-after-maincart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/maincart/maincart.html.twig` |
25+
| `storefront-before-minicart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/minicart/minicart.html.twig` |
26+
| `storefront-after-minicart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/minicart/minicart.html.twig` |
27+
| `storefront-before-add-to-cart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/add_to_cart/add_to_cart.html.twig` |
28+
| `storefront-after-add-to-cart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/add_to_cart/add_to_cart.html.twig` |
29+
| `storefront-before-summary` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/summary/summary.html.twig` |
30+
| `storefront-after-summary` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/summary/summary.html.twig` |
31+
1432
## Template customization example
1533

1634
As an example, to change the cart display when it contains no products, you need to override `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/maincart/maincart_empty_cart.html.twig` template.

0 commit comments

Comments
 (0)