Skip to content

Commit a994244

Browse files
committed
Added deprecations page for Cohesivo 6.0
1 parent 31f157f commit a994244

4 files changed

Lines changed: 366 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!-- vale VariablesVersion = NO -->
2+
3+
# Cohesivo v6.0 renames, deprecations and removals
4+
5+
## About Cohesivo 6.0
6+
7+
!!! note "Cohesivo v6.0 is not released yet"
8+
9+
This page is published ahead of the Cohesivo v6.0 release to give you time to prepare your code for the upcoming changes.
10+
11+
As the work on Cohesivo 6.0 is in progress, this page **isn't exhaustive and will evolve with time**.
12+
13+
As announced during Ibexa Summit 2026, [Ibexa DXP will be renamed to Cohesivo](https://www.ibexa.co/blog/redefining-the-dxp-from-execution-to-orchestration) to support the new [orchestration platform approach](https://www.ibexa.co/blog/the-orchestration-era).
14+
15+
This page lists backwards compatibility breaks and deprecations introduced in Cohesivo v6.0.
16+
17+
## PHP API changes
18+
19+
### ibexa/http-cache
20+
21+
| Class | Change |
22+
|:---------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
23+
| <nobr>`\Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger::supports`</nobr> | Method added to the interface. All implementations must now specify the value they support for tagging. |
24+
| `\Ibexa\HttpCache\ResponseTagger\Delegator\DispatcherTagger` | `DispatcherTagger` will now log a warning (in Symfony `prod` environment) or throw an exception (in Symfony `dev` environment) when an unsupported value is passed instead of silently ignoring it. |
25+
26+
### ibexa/messenger
27+
28+
| Class | Change |
29+
|:------------------------------------------------------------------------------------|:-----------------------------------------------------------|
30+
| [`SudoStamp`](background_tasks.md#sudostamp) | No longer attached automatically to every dispatched message. For messages that should be processed without taking permissions into account, always attach the SudoStamp manually |
31+
| <nobr>`\Ibexa\Bundle\Messenger\Stamp\DeduplicateStamp`</nobr> | Moved to [`\Ibexa\Contracts\Messenger\Stamp\DeduplicateStamp`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Messenger-Stamp-DeduplicateStamp.html). Covered by [[[= product_name_base =]] Rector](../resources/rector.md) rules. |

docs/resources/rector.md

Lines changed: 332 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,332 @@
1+
---
2+
description: Use [[=product_name_base=]] Rector, an optional package based on Rector, to remove PHP and JavaScript code deprecations.
3+
---
4+
5+
# [[= product_name_base =]] Rector
6+
7+
[[= product_name_base =]] Rector is an optional package based on [Rector](https://getrector.com/) that comes with additional rule sets for working with [[= product_name =]] code.
8+
You can use it to get rid of PHP code deprecations and to help prepare your project for the next major release.
9+
10+
## Installation
11+
12+
Add the Composer dependency:
13+
14+
``` bash
15+
composer require --dev ibexa/rector:[[= latest_tag_5_0 =]]
16+
```
17+
18+
## Refactor PHP code
19+
20+
### Configuration
21+
22+
Adjust the generated `rector.php` file by:
23+
24+
- making it match your project's directory structure
25+
- selecting the [[= product_name_base =]] rule set that matches your current version, for example [`IbexaSetList::IBEXA_50`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Rector-Sets-IbexaSetList.html#enumcase_IBEXA_50)
26+
- adding project-specific rules:
27+
- [PHP rules by using `withPhpSets`](https://getrector.com/documentation/set-lists#content-php-sets)
28+
- [Symfony, Twig, or Doctrine rules by using `withComposerBased`](https://getrector.com/documentation/composer-based-sets)
29+
30+
It's recommended to activate one rule set at a time and preview the output before applying it.
31+
32+
An example configuration looks as follows:
33+
34+
``` php
35+
use Ibexa\Contracts\Rector\Sets\IbexaSetList;
36+
use Rector\Config\RectorConfig;
37+
38+
return RectorConfig::configure()
39+
->withPaths(
40+
[
41+
__DIR__ . '/src',
42+
]
43+
)
44+
->withSets(
45+
[
46+
IbexaSetList::IBEXA_50->value,
47+
]
48+
)
49+
->withPhpSets(php83: true)
50+
->withComposerBased(symfony: true)
51+
;
52+
```
53+
54+
### Usage
55+
56+
Run Rector in dry-run mode to preview the changes it would make:
57+
58+
``` bash
59+
vendor/bin/rector --dry-run
60+
```
61+
62+
Once you're satisfied with the proposed changes, apply them:
63+
64+
``` bash
65+
vendor/bin/rector
66+
```
67+
68+
## Refactor JavaScipt code
69+
70+
[[= product_name_base =]] Rector also comes with transform module to help you maintain your JavaScript code.
71+
72+
### Configuration
73+
74+
To adjust the default configuration, plugins, or rules, modify the `rector.config.js` file present in your project or bundle directory:
75+
76+
``` js
77+
module.exports = {
78+
config: {
79+
paths: [{
80+
input: 'src/bundle/Resources/public',
81+
output: 'src/bundle/Resources/public',
82+
}],
83+
prettierConfigPath: './prettier.js',
84+
}
85+
plugins: (plugins) => {
86+
// modify enabled plugins
87+
88+
return plugins;
89+
},
90+
pluginsConfig: (config) => {
91+
// modify plugins config
92+
93+
return config;
94+
}
95+
};
96+
```
97+
98+
### Configuration options
99+
100+
#### `paths`
101+
102+
Array of objects with input and output directories for transformed files, relative to your project or bundle root.
103+
Directory structure is not modified during the transformation.
104+
105+
#### `prettierConfigPath`
106+
107+
[Prettier](https://prettier.io/) is run at the end of the transformation.
108+
You can provide the path to your own configuration file, otherwise [the default file](https://github.com/ibexa/eslint-config-ibexa/blob/main/prettier.js) is used.
109+
110+
#### `plugins`
111+
112+
Use it to modify enabled plugins.
113+
To learn more about plugins, see [the list of plugins](#list-of-plugins).
114+
115+
#### `pluginsConfig`
116+
117+
Use this setting to modify the plugins configuration, as in the example below:
118+
119+
``` json
120+
{
121+
"ibexa-rename-string-values": {
122+
"ez-form-error": "ibexa-form-error",
123+
"ez-selection-settings": {
124+
"to": "ibexa-selection-settings",
125+
"exactMatch": true
126+
},
127+
"(^|\\s)\\.ez-": {
128+
"to": ".ibexa-",
129+
"regexp": true
130+
},
131+
"ibexa-field-edit--ez([A-Za-z0-9]+)": {
132+
"to": "ibexa-field-edit--ibexa$1",
133+
"regexp": true
134+
}
135+
}
136+
}
137+
```
138+
139+
The plugin configuration is an object with plugin names as keys, for example `ibexa-rename-string-values`.
140+
Inside a single plugin configuration, the property names are values that should be replaced.
141+
They can be specified explicitly (`ezform-error`) or by using regexp (`(^|\\s)\\.ez-`).
142+
143+
#### Shorthand expression
144+
145+
You can use a shorthand form to specify the configuration:
146+
147+
- `"ez-form-error": "ibexa-form-error"` - changes all `ez-form-error` occurrences to `ibexa-form-error`
148+
149+
#### Complete plugin configuration
150+
151+
When not using the shorthand configuration, the following options are available:
152+
153+
- `"to": "ibexa-selection-settings"` - specifies the new value
154+
- `"regexp": true/false` - use regexp to find the matching values. Use capture groups to reuse parts of the original value in the new value
155+
- `"exactMatch": true` - replace matching values only when the whole value is matched. Using the example configuration, `ez-selection-settings__field` would not be replaced as it doesn't match `ez-selection-settings` exactly
156+
157+
#### Shared configuration
158+
159+
You can create a shared configuration for all plugins by using the `shared` keyword, as in the example below:
160+
161+
``` json
162+
{
163+
"shared": {
164+
"ez": {
165+
"to": "ibexa",
166+
"exactMatch": true,
167+
}
168+
}
169+
}
170+
```
171+
172+
Values specifies in the `shared` configuration can be overwritten by using configuration for specific plugins.
173+
174+
### List of plugins
175+
176+
#### Rename eZ global variables
177+
178+
This plugin changes all `eZ` variables to `ibexa`.
179+
180+
Identifier: `ibexa-rename-ez-global`
181+
182+
Configuration: none
183+
184+
#### Rename variables
185+
186+
This plugin allows to rename any variable.
187+
188+
Identifier: `ibexa-rename-variables`
189+
190+
Configuration example:
191+
192+
``` json
193+
{
194+
"^Ez(.*?)Validator$": {
195+
"to": "Ibexa$1Validator",
196+
"regexp": true
197+
},
198+
"^EZ_": {
199+
"to": "IBEXA_",
200+
"regexp": true
201+
}
202+
}
203+
```
204+
205+
**Example:**
206+
207+
| Before | After |
208+
|---|---|
209+
| `class EzBooleanValidator extends eZ.BaseFieldValidator` | `class IbexaBooleanValidator extends ibexa.BaseFieldValidator` |
210+
| `const EZ_INPUT_SELECTOR = 'ezselection-settings__input';` | `const IBEXA_INPUT_SELECTOR = 'ezselection-settings__input';` |
211+
212+
#### Rename string values
213+
214+
This plugin changes any string value except translations. You can use it to transform selectors and other values.
215+
216+
Identifier: `ibexa-rename-string-values`
217+
218+
Configuration example:
219+
220+
``` json
221+
{
222+
"(^|\\s)\\.ez-": {
223+
"to": ".ibexa-",
224+
"regexp": true
225+
},
226+
"ibexa-field-edit--ez([A-Za-z0-9]+)": {
227+
"to": "ibexa-field-edit--ibexa$1",
228+
"regexp": true
229+
},
230+
"ezselection-settings": "ibexaselection-settings"
231+
}
232+
```
233+
234+
**Example output:**
235+
236+
| Before | After |
237+
|---|---|
238+
| `const SELECTOR_FIELD = '.ez-field-edit--ezboolean';` | `const SELECTOR_FIELD = '.ibexa-field-edit--ezboolean'` |
239+
| `const SELECTOR_FIELD = '.ibexa-field-edit--ezboolean';` | `const SELECTOR_FIELD = '.ibexa-field-edit--ibexaboolean';` |
240+
241+
#### Rename translation IDs
242+
243+
This plugin allows to change translation ids.
244+
Extract translations after running this transformation.
245+
246+
Identifier: `ibexa-rename-trans-id`
247+
248+
Configuration example:
249+
250+
``` json
251+
{
252+
"^ez": {
253+
"to": "ibexa",
254+
"regexp": true
255+
}
256+
}
257+
```
258+
259+
**Example output:**
260+
261+
| Before | After |
262+
|---|---|
263+
|`'ez_boolean.limitation.pick.ez_error'` | `'ibexa_boolean.limitation.pick.ez_error'` |
264+
265+
#### Rename translation strings
266+
267+
This plugin changes values in translations.
268+
Extract translations after running this transformation.
269+
270+
Identifier: `ibexa-rename-in-translations`
271+
272+
Configuration example:
273+
274+
``` json
275+
{
276+
"to": "ibexa-not-$1--show-modal",
277+
"regexp": true,
278+
"selectors-only": true
279+
}
280+
```
281+
282+
If the `selectors-only` property is set to `true`, this plugin changes only strings inside HTML tags.
283+
Set to `false` or remove property to change text values as well.
284+
285+
**Example output:**
286+
287+
| `selectors-only` value | Before | After |
288+
|---|---|---|
289+
| true | `/*@Desc("<p class='ez-not-error--show-modal'>Show message</p> for ez-not-error--show-modal")*/` | `/*@Desc("<p class='ibexa-not-error--show-modal'>Show message</p> for ez-not-error--show-modal")*/` |
290+
| false | `/*@Desc("<p class='ez-not-error--show-modal'>Show message</p> for ez-not-error--show-modal")*/` | `/*@Desc("<p class='ibexa-not-error--show-modal'>Show message</p> for ibexa-not-error--show-modal")*/` |
291+
292+
#### Rename icons names used in getIconPath method
293+
294+
This plugin allows you to rename any icon name that is passed as an argument to the `getIconPath` method.
295+
296+
Identifier: `ibexa-rename-icons`
297+
298+
Configuration example:
299+
300+
In this plugin, the `exactMatch` default value is set `true` when using the shorthand expression.
301+
302+
``` json
303+
{
304+
"browse": "folder-browse",
305+
"content-": {
306+
"to": "file-",
307+
"exactMatch": false
308+
}
309+
}
310+
```
311+
312+
**Example:**
313+
314+
| Before | After |
315+
|---|---|
316+
| `getIconPath('browse')` | `getIconPath('folder-browse')` |
317+
318+
### Usage
319+
320+
To install the dependencies, execute the following command:
321+
322+
``` bash
323+
yarn --cwd ./vendor/ibexa/rector/js install
324+
```
325+
326+
Then, run the transform:
327+
328+
``` bash
329+
yarn --cwd ./vendor/ibexa/rector/js transform
330+
```
331+
332+
The `--cwd` argument must point to the directory where the transform module is installed, by default `./vendor/ibexa/rector/js`.

docs/resources/resources.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ See additional information about [[= product_name =]] development process, helpf
1010
[[= cards([
1111
"resources/release_process_and_roadmap",
1212
"resources/phpstorm_plugin",
13+
"resources/rector",
1314
"resources/contributing/report_and_follow_issues",
1415
], columns=3) =]]

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,7 @@ nav:
946946
- Resources: resources/resources.md
947947
- Release process and roadmap: resources/release_process_and_roadmap.md
948948
- Ibexa DXP PhpStorm plugin: resources/phpstorm_plugin.md
949+
- Ibexa DXP Rector: resources/rector.md
949950
- New in documentation: resources/new_in_doc.md
950951
- Contributing:
951952
- Report and follow issues: resources/contributing/report_and_follow_issues.md
@@ -955,6 +956,7 @@ nav:
955956
- Product guides: product_guides/product_guides.md
956957
- Release notes:
957958
- Release notes: release_notes/release_notes.md
959+
- Cohesivo v6.0 deprecations and BC breaks: release_notes/cohesivo_v6.0_deprecations.md
958960
- Ibexa DXP v5.0 LTS: release_notes/ibexa_dxp_v5.0.md
959961
- Ibexa DXP v5.0 deprecations and BC breaks: release_notes/ibexa_dxp_v5.0_deprecations.md
960962
- Ibexa DXP v4.6 LTS: release_notes/ibexa_dxp_v4.6.md

0 commit comments

Comments
 (0)