Skip to content

Release 4.6.22 #2867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 6, 2025
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
52 changes: 31 additions & 21 deletions code_samples/back_office/components/twig_components.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
ibexa_twig_components:
admin-ui-user-menu:
custom-html-component:
type: html
arguments:
content: '<b>Hello world!</b>'
custom-template-component:
type: template
arguments:
template: '@ibexadesign/ui/component/user_thumbnail/user_thumbnail.html.twig'
parameters:
user_content:
name: "Thumbnail"
thumbnail:
resource: https://placecats.com/100/100
custom-controller-component:
type: controller
arguments:
controller: '\App\Controller\MyController::requestAction'
parameters:
parameter1: 'custom'
parameter2: true
admin-ui-stylesheet-head:
custom-link-component:
type: stylesheet
custom-html-component:
type: html
priority: 0
arguments:
href: 'https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback'
rel: stylesheet
crossorigin: anonymous
integrity: sha384-LN/mLhO/GN6Ge8ZPvI7uRsZpiXmtSkep+aFlJcHa8by4TvA34o1am9sa88eUzKTD
type: text/css
content: '<b>Hello world!</b>'
admin-ui-user-menu:
duplicated_user_menu:
type: menu
arguments:
name: ezplatform_admin_ui.menu.user
template: '@ibexadesign/ui/menu/user.html.twig'
depth: 1
admin-ui-script-head:
custom-script-component:
type: script
Expand All @@ -39,3 +29,23 @@ ibexa_twig_components:
async: true
integrity: sha384-Ewi2bBDtPbbu4/+fs8sIbBJ3zVl0LDOSznfhFR/JBK+SzggdRdX8XQKauWmI9HH2
type: text/javascript
admin-ui-stylesheet-head:
custom-link-component:
type: stylesheet
arguments:
href: 'https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback'
rel: stylesheet
crossorigin: anonymous
integrity: sha384-LN/mLhO/GN6Ge8ZPvI7uRsZpiXmtSkep+aFlJcHa8by4TvA34o1am9sa88eUzKTD
type: text/css
admin-ui-global-search:
custom-template-component:
type: template
priority: 50
arguments:
template: '@ibexadesign/ui/component/user_thumbnail/user_thumbnail.html.twig'
parameters:
user_content:
name: "Thumbnail"
thumbnail:
resource: https://placecats.com/100/100
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php declare(strict_types=1);

use Ibexa\Contracts\ProductCatalog\Values\Product\ProductQuery;
use Ibexa\Contracts\ProductCatalogSymbolAttribute\Search\Criterion\SymbolAttribute;

$query = new ProductQuery();
$query->setFilter(new SymbolAttribute('ean', ['5023920187205']));
/** @var \Ibexa\Contracts\ProductCatalog\ProductServiceInterface $productService */
$results = $productService->findProducts($query);
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: discount_code
mode: create
code: summer10
global_usage_limit: 100 # Optional
user_usage_limit: 5 # Optional
created_at: '2023-01-01T12:00:00+00:00' # Optional
creator_id: 42 # Optional
9 changes: 7 additions & 2 deletions code_samples/discounts/src/Command/ManageDiscountsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$discountCodeCreateStruct = new DiscountCodeCreateStruct(
'summer10',
null, // Unlimited usage
10, // Global usage limit
null, // Unlimited usage per customer
$this->permissionResolver->getCurrentUserReference()->getUserId(),
$now
);
Expand All @@ -78,7 +79,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
new IsInRegions(['germany', 'france']),
new IsProductInArray(['product-1', 'product-2']),
new IsInCurrency('EUR'),
new IsValidDiscountCode($discountCode->getCode(), $discountCode->getUsedLimit()),
new IsValidDiscountCode(
$discountCode->getCode(),
$discountCode->getGlobalLimit(),
$discountCode->getUsedLimit()
),
])
->setTranslations([
new DiscountTranslationStruct('eng-GB', 'Discount name', 'This is a discount description', 'Promotion Label', 'Promotion Description'),
Expand Down
46 changes: 46 additions & 0 deletions code_samples/pim/Symbol/Format/Checksum/LuhnChecksum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

declare(strict_types=1);

namespace App\PIM\Symbol\Format\Checksum;

use Ibexa\Contracts\ProductCatalog\Values\AttributeDefinitionInterface;
use Ibexa\Contracts\ProductCatalogSymbolAttribute\Value\ChecksumInterface;

final class LuhnChecksum implements ChecksumInterface
{
public function validate(AttributeDefinitionInterface $attributeDefinition, string $value): bool
{
$digits = $this->getDigits($value);

$count = count($digits);
$total = 0;
for ($i = $count - 2; $i >= 0; $i -= 2) {
$digit = $digits[$i];
if ($i % 2 === 0) {
$digit *= 2;
}

$total += $digit > 9 ? $digit - 9 : $digit;
}

$checksum = $digits[$count - 1];

return $total + $checksum === 0;
}

/**
* Returns an array of digits from the given value (skipping any formatting characters).
*
* @return int[]
*/
private function getDigits(string $value): array
{
$chars = array_filter(
str_split($value),
static fn (string $char): bool => $char !== '-'
);

return array_map('intval', array_values($chars));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CREATE TABLE ibexa_product_specification_attribute_symbol (id INT NOT NULL, value VARCHAR(160) DEFAULT NULL, INDEX ibexa_product_specification_attribute_symbol_value_idx (value), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_520_ci` ENGINE = InnoDB;
ALTER TABLE ibexa_product_specification_attribute_symbol ADD CONSTRAINT ibexa_product_specification_attribute_symbol_fk FOREIGN KEY (id) REFERENCES ibexa_product_specification_attribute (id) ON UPDATE CASCADE ON DELETE CASCADE
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CREATE TABLE ibexa_product_specification_attribute_symbol (id INT NOT NULL, value VARCHAR(160) DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX ibexa_product_specification_attribute_symbol_value_idx ON ibexa_product_specification_attribute_symbol (value);
ALTER TABLE ibexa_product_specification_attribute_symbol ADD CONSTRAINT ibexa_product_specification_attribute_symbol_fk FOREIGN KEY (id) REFERENCES ibexa_product_specification_attribute (id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE;
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"ibexa/twig-components": "~4.6.x-dev",
"ibexa/tree-builder": "~4.6.x-dev",
"ibexa/discounts": "~4.6.x-dev",
"ibexa/discounts-codes": "~4.6.x-dev"
"ibexa/discounts-codes": "~4.6.x-dev",
"ibexa/product-catalog-symbol-attribute": "~4.6.x-dev"
},
"scripts": {
"fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The available groups for the back office are:
|`admin-ui-systeminfo-tab-groups`| `vendor/ibexa/system-info/src/bundle/Resources/views/themes/admin/system_info/info.html.twig` |
|`admin-ui-user-menu`| `vendor/ibexa/admin-ui-ui/src/bundle/Resources/views/themes/admin/ui/layout.html.twig` |
|`admin-ui-user-profile-blocks`| `vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/account/profile/view.html.twig` |
|`admin-ui-versions-table-before`|`vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/content/tab/versions/table.html.twig`|

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

Expand Down
10 changes: 5 additions & 5 deletions docs/api/event_reference/discounts_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ The events below are dispatched when managing [discounts](discounts_guide.md):

| Event | Dispatched by |
|---|---|
|[BeforeCreateDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-BeforeCreateDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html)
|[CreateDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-CreateDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html)
|[BeforeDeleteDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-BeforeDeleteDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html)
|[DeleteDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-DeleteDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html)
|[BeforeCreateDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-BeforeCreateDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html) |
|[CreateDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-CreateDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html) |
|[BeforeDeleteDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-BeforeDeleteDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html) |
|[DeleteDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-DeleteDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html) |
|[BeforeUpdateDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-BeforeUpdateDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html)|
|[UpdateDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-UpdateDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html)|
|[UpdateDiscountEvent](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-Event-UpdateDiscountEvent.html)| [DiscountServiceInterface](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Discounts-DiscountServiceInterface.html) |

## Form events

Expand Down
4 changes: 4 additions & 0 deletions docs/api/graphql/graphql_queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -838,3 +838,7 @@ children(first: 3, after: "YXJyYXljb25uZWN0aW9uOjM=")
### Get Matrix field type

To get a Matrix field type with GraphQL, see [Matrix field type reference](matrixfield.md).

### Enable pagination for RelationList field type

To learn how to enable pagination for RelationList field type, see the [RelationList field type reference](relationlistfield.md).
9 changes: 9 additions & 0 deletions docs/content_management/data_migration/importing_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The following data migration step modes are available:
| `currency` | &#10004; | &#10004; | &#10004; | |
| `customer_group` | &#10004; | &#10004; | &#10004; | |
| `discount` | &#10004; | &#10004; | | |
| `discount_code` | &#10004; | | | |
| `language` | &#10004; | | | |
| `location` | | &#10004; | | &#10004; |
| `object_state` | &#10004; | | | |
Expand Down Expand Up @@ -531,6 +532,14 @@ The provided conditions overwrite any already existing ones.

For a list of available conditions, see [Discounts API](discounts_api.md#conditions).

### Discount codes [[% include 'snippets/lts-update_badge.md' %]]

You can create a discount code as in the following example:

``` yaml
[[= include_file('code_samples/data_migration/examples/discounts/discount_code_create.yaml') =]]
```

## Criteria

When using `update` or `delete` modes, you can use criteria to identify the objects to operate on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,33 @@ $validators = [
]
];
```

### Enable pagination in GraphQL

To enable pagination for Relation List field type, set the `ibexa.graphql.schema.ibexa_object_relation_list.enable_pagination` parameter to `true`.

!!! note

The pagination is enabled by default in [[= product_name =]] v5 and the parameter is removed.

This allows you to query for only a subset of relations, as in the following example:

``` graphql
query {
content {
relations(contentId: 71) {
rel(first: 5) {
totalCount,
edges {
node {
_contentInfo {
id
}
}
}
}
}
}
}
```

4 changes: 2 additions & 2 deletions docs/discounts/discounts_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ The example below contains a Command creating a cart discount. The discount:
- [depends](#conditions) on
- being bought from Germany or France
- 2 products
- a `summer10` [discount code](#discount-codes) which can be used unlimited number of times
- a `summer10` [discount code](#discount-codes) which can be used only 10 times, but a single customer can use the code multiple times

``` php hl_lines="60-66 68-92"
``` php hl_lines="60-67 69-97"
[[= include_file('code_samples/discounts/src/Command/ManageDiscountsCommand.php') =]]
```

Expand Down
4 changes: 3 additions & 1 deletion docs/discounts/discounts_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ A shopping cart can have multiple active discounts, but a specific product can o

When two or more discounts can be applied to a single product, the system evaluates the following properties to choose the right one:

- discount code existence (discounts with discount codes have priority over the others)
- discount activation place (cart discounts rank higher over catalog discounts)
- discount priority (higher priority ranks higher)
- discount creation date (newer discounts rank higher)
Expand Down Expand Up @@ -107,7 +108,8 @@ These conditions can include:

For **cart discounts**, you can specify an additional text value that needs to be entered in the cart for the discount to apply.

The discount code usage can be limited per customer:
The discount code usage can be limited globally, for example by making the discount valid only for the first 10 customers before it expires.
You can also limit the usage per customer:

- single use: every customer can use this code only once
- limited use: every customer can use the code a specified number of times
Expand Down
63 changes: 55 additions & 8 deletions docs/getting_started/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ For production setups it's recommended that you use Varnish/Fastly, Redis, NFS/E

## PHP

=== "[[= product_name =]] v4.6"

- 8.3

=== "[[= product_name =]] v4.6"

- 8.3
Expand Down Expand Up @@ -208,25 +212,54 @@ For production setups it's recommended that you use Varnish/Fastly, Redis, NFS/E

=== "[[= product_name =]] v5.0"

- For content search, Solr 8.11.1 or higher.
Alternatively, Elasticsearch 7.16.2 or higher 7.x version.
|Name|Version|
|---|---|
|Solr|8.11.1+ or 9.8.1+|
|Elasticsearch| 7.16.2+ |

If you see a "+" next to the product version, it indicates a recommended version or higher within the same major release.
For example, "1.18+" means any 1.x version equal to or higher than 1.18, but not 2.x.

=== "[[= product_name =]] v4.6"

- For content search, Solr 7.7 LTS or Solr 8, recommended 8.11.1 or higher.
Alternatively, Elasticsearch 7.16.2 or higher 7.x version.
- The above solutions require Oracle Java/Open JDK. The minimum requirement is 8 LTS, recommended 11 LTS.
Newer versions aren't supported.
|Name|Version|
|---|---|
|Solr|8.11.1+ or 9.8.1+|
|Elasticsearch| 7.16.2+ |

If you see a "+" next to the product version, it indicates a recommended version or higher within the same major release.
For example, "1.18+" means any 1.x version equal to or higher than 1.18, but not 2.x.

=== "[[= product_name =]] v3.3"

- For content search, Solr 7.7 LTS or Solr 8, recommended 8.11.1 or higher.
Alternatively, Elasticsearch 7.16.2 or higher 7.x version.
|Name|Version|
|---|---|
|Solr|7.7 LTS or 8.11.1+|
|Elasticsearch| 7.16.2+ |

If you see a "+" next to the product version, it indicates a recommended version or higher within the same major release.
For example, "1.18+" means any 1.x version equal to or higher than 1.18, but not 2.x.

- For BinaryFile field indexing, Apache Tika 1.20 or higher 1.x version, recommended 1.28.1 or higher.
- The above solutions require Oracle Java/Open JDK. The minimum requirement is 8 LTS, recommended 11 LTS. Newer versions aren't supported.

## Graphic Handler

=== "[[= product_name =]] v5.0"

- GraphicsMagick
- ImageMagick
- GD

Optionally, if you intend to edit [PNG, SVG, GIF or WEBP files in the Image Editor](images.md#image-optimization), or use it with image variations:

- JpegOptim
- Optipng
- Pngquant 2
- SVGO 1
- Gifsicle
- cwebp

=== "[[= product_name =]] v4.6"

- GraphicsMagick
Expand Down Expand Up @@ -288,6 +321,10 @@ For production setups it's recommended that you use Varnish/Fastly, Redis, NFS/E

## Filesystem

=== "[[= product_name =]] v5.0"

- Linux ext4 / XFS

=== "[[= product_name =]] v4.6"

- Linux ext4 / XFS
Expand Down Expand Up @@ -339,6 +376,16 @@ For production setups it's recommended that you use Varnish/Fastly, Redis, NFS/E

## Browser

=== "[[= product_name =]] v5.0"

[[= product_name =]] is developed to work with *any* web browser that supports modern standards, on *any* screen resolution suitable for web, running on *any* device.
However, for the Editorial and Administration User Interfaces, you need: a minimum of 1366-by-768 screen resolution, a desktop or tablet device, and a recommended/supported browser among the ones found below.

- Mozilla® Firefox® most recent stable version (recommended)
- Google Chrome™ most recent stable version (recommended)
- Chromium™ based browsers such as Microsoft® Edge® and Opera®, most recent stable version, desktop *and* tablet
- Apple® Safari® most recent stable version, desktop *and* tablet

=== "[[= product_name =]] v4.6"

[[= product_name =]] is developed to work with *any* web browser that supports modern standards, on *any* screen resolution suitable for web, running on *any* device.
Expand Down
Loading
Loading