- Removed bulk confirmation templates (
bulk_base.html.twig,bulk_delete.html.twig), useadmin/confirm_action.html.twiginstead
For Twig templates using @RoadizRozier/admin/base.html.twig as parent template, make sure to update
content_titlecontent_count_filterscontent_header_nav
blocks to use new header block instead.
Example:
{%- block header -%}
{% include '@RoadizRozier/admin/head.html.twig' with {
title: 'my_entities'|trans,
filters: filters,
buttons: [
{
label: 'add.entity'|trans,
href: path('my_entity_add'),
icon: 'rz-icon-ri--add-line',
}
]
} only %}
{%- endblock -%}You need to update your content_filters block to use new widgets/rz_filters_bar.html.twig inside this block.
Example:
{% include "@RoadizRozier/widgets/rz_filters_bar.html.twig" with {
filters: filters,
display_select_all_button: true,
} only %}All backoffice menu icon classes now use the new UI icon set.
If your project overrides menu entries in config/packages/roadiz_rozier.yaml and still uses old uk-icon-* classes, those icons will no longer display.
Update your menu entries to use rz-icon-ri--<name> classes (or rz-icon-rz--<name> for Roadiz-specific icons).
Icon names are based on Remix Icon names: https://remixicon.com/
Example migration:
# config/packages/roadiz_rozier.yaml
roadiz_rozier:
entries:
dashboard:
- icon: uk-icon-rz-dashboard
+ icon: rz-icon-ri--dashboard-line
nodes:
- icon: uk-icon-rz-global-nodes
+ icon: rz-icon-ri--command-line
subentries:
all_nodes:
- icon: uk-icon-rz-all-nodes
+ icon: rz-icon-rz--status-container-line
draft_nodes:
- icon: uk-icon-rz-draft-nodes
+ icon: rz-icon-rz--status-draft-lineNew reusable templates for building back-office pages:
admin/head.html.twig- Page header with title, breadcrumb, buttonsadmin/confirm_action.html.twig- Generic confirmation pagewidgets/rz_filters_bar.html.twig- Filter bar widgetwidgets/rz_bulk_actions.html.twig- Bulk actions widget- New macros:
rz_button,rz_badge,rz_actions_menu,rz_card
- Upgrade Symfony dependencies to 7.4
- NodeSourceWalkerContext requires a new service
NodeTypeClassLocatorInterfacein its constructor. - Removed
Node::sterileproperty andNode::isSterile()method. - Removed deprecated
Nodestatus constants in favor ofNodeStatusenum - Custom forms and contact form now return a constraint violation list in JSON format:
roadiz_core.useConstraintViolationList: true. This requires to configureroadiz_core.customFormPostOperationNamewith your custom form operation name if you want to use this feature. - Interface setter methods now return
staticinstead ofselfto allow proper fluent interface in subclasses. Make sure to update your class methods signatures if you implement any of the following interfaces:- AttributeValueInterface
- AttributeValueTranslationInterface
- BlocksAwareWebResponseInterface
- ContextualizedDocumentInterface
- DateTimedInterface
- EntityListManagerInterface
- LeafInterface
- PositionedInterface
- RealmsAwareWebResponseInterface
- Removed obsolete
roadiz/fonts-bundle - Removed
getFontsFilesPathandgetFontsFilesBasePathmethods fromRZ\Roadiz\Documents\Models\FileAwareInterface
- When a CustomForm is submitted, Roadiz can now dispatch the submission to external systems (CRMs or any HTTP endpoint) automatically.
- Webhooks are async: submissions emit a CustomFormAnswerSubmittedEvent, which queues a CustomFormWebhookMessage and processes it via Symfony Messenger.
- Built-in providers include Brevo, Mailchimp, HubSpot, Zoho CRM, and a generic HTTP option; you can also plug in custom providers.
- Field mapping and provider settings are configured per form in the admin UI; this controls how form fields map to provider-specific fields.
- The system is idempotent per CustomFormAnswer ID and uses Messenger retry policies on failure
- Roadiz can integrate with external translation services to automatically translate Markdown fields.
- Switched to attributes for mapping Routes in Roadiz Core and Rozier bundles
- Fluent setters on key interfaces return
staticto support subclassing. - Back-office sidebar bookmarks are now configurable via
roadiz_rozier.bookmarks - Project admin logo is now configurable in
config/packages/roadiz_core.yaml
roadiz_core:
projectLogoUrl: '%env(string:APP_PROJECT_LOGO_URL)%'- New
RZ\Roadiz\RozierBundle\EntityThumbnail\EntityThumbnailProviderInterfacesystem to get a thumbnail URL for any Roadiz entity.
- ⚠ Breaking changes
- Upgrade your composer.json
- Remove Roadiz CompatBundle
- Upgrade you project code base for Symfony 7.3
- Upgrade your Messenger configuration with Scheduler
- Upgrade your API Platform configuration
- Enable new DocumentDto
- Upgrade your Roadiz roles hierarchy
- Upgrade your Roadiz Core bundle configuration
- Upgrade your captcha protected Form types
- Upgrade your Mailer configuration
- Upgrade your email templates
- Upgrade your Solr configuration
- Upgrade rezozero/intervention-request-bundle
- Use composition instead of inheritance for Abstract entities
- Interface changes
- Removed Themes from routing and events
- Roadiz requires php 8.3 minimum
- Upgraded to ApiPlatform 4.x
- Upgraded to Symfony 7.3
- New Scheduler component to replace cron jobs with a scheduler worker service
- Dropped RoadizCompatBundle and all its classes
- Dropped Themes\Rozier\RozierApp and all
Themes\Roziernamespace. Controllers, templates and services have been moved toRZ\Roadiz\RozierBundlenamespace. - Dropped Roles entity, use native Symfony Roles hierarchy to define your roles instead
- Dropped RoleArrayVoter BC, you cannot use
isGrantedanddenyUnlessGrantedmethods with arrays - New
CaptchaServiceInterfaceto make captcha support any provider service. - All Solr and SearchEngine related logic has been moved to the new
roadiz/solr-bundlebundle. ThemeAwareNodeRouterandThemeAwareNodeUrlMatcherclasses have been removed- All deprecated
AbstractFieldconstants have been removed (in favor ofFieldTypeenum) NodesSourcesRepository::findBySearchQuerymethod has been removed to remove dependency on SearchEngineNodesSourcesHeadInterfacehas been simplified:getPolicyUrl,getHomePageUrlandgetHomePagemethods have been removed- Roadiz Core
solrconfiguration has been deprecated, usenelmio/solarium-bundleconfiguration instead.- All Solr services now depends on
ClientRegistryInterface - All Solr commands must provide a
clientNameargument tovalidateSolrState. SolrPaginatorrenamed toSearchEnginePaginatorSolrSearchListManagerrenamed toSearchEngineListManager
- All Solr services now depends on
- Removed too technical Roadiz settings in favor of Symfony configuration parameters:
| Old setting name | Configuration Parameter |
|---|---|
custom_public_scheme |
roadiz_core.customPublicScheme |
custom_preview_scheme |
roadiz_core.customPreviewScheme |
force_locale |
roadiz_core.forceLocale |
force_locale_with_urlaliases |
roadiz_core.forceLocaleWithUrlAliases |
leaflet_map_tile_url |
roadiz_core.leafletMapTileUrl |
maps_default_location |
roadiz_core.mapsDefaultLocation |
EmailManagerhas been deprecated, use symfony/notifier instead.email_senderSetting has been removed, useframework.mailer.envelope.senderconfiguration parameter instead.EmailManager::getOrigin()method has been removed, this will useframework.mailer.envelope.senderconfiguration parameter.- Added
DocumentDtoto expose NodesSources documents in API Platform with contextualizedhotspotandimageCropAlignmentproperties. - Added new
ROLE_ACCESS_USERS_DETAILrole to allow user details edition (GDPR) and moved user language into default UserType form. ContactFormManager::setReceiverhas been renamed tosetRecipientsand accepts an array ofRecipientInterface.
- Set roadiz packages to
2.6.* - Set symfony packages to
7.3.* - Allow symfony 7.3 on
extra.symfony.requirekey
"extra": {
"symfony": {
"allow-contrib": false,
- "require": "6.4.*",
+ "require": "7.3.*",
}
}- Remove
symfony/proxy-manager-bridgeanddoctrine/annotationspackages, they are no longer required. - Remove
roadiz/compat-bundleandroadiz/rozierpackages
- Remove
RZ\Roadiz\CompatBundle\RoadizCompatBundle::classfrom yourconfig/bundles.phpfile - Remove
config/packages/roadiz_compat.yamlfile - Remove
roadiz/compat-bundlefrom yourcomposer.json - Replace all Rozier theme classes with equivalent from
RZ\Roadiz\RozierBundle\namespace, if your project adds admin controllers and templates - Run
composer update -o
- Replace
Symfony\Component\Security\Core\SecuritywithSymfony\Bundle\SecurityBundle\Security - Remove
security.enable_authenticator_manageroption from yourconfig/packages/security.yaml - Doctrine annotation have been removed:
- Switch all Doctrine entity mappings from
type: annotationtotype: attribute - Remove any routes using
type: annotation
- Switch all Doctrine entity mappings from
- All
Normalizerclasses must comply to the new method signatures fornormalize,supportsNormalization,supportsDenormalizationmethods:public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
-public function normalize(mixed $object, ?string $format = null, array $context = []): mixed
+public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null-public function supportsNormalization(mixed $data, ?string $format = null): bool
+public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool-public function supportsDenormalization(mixed $data, string $type, ?string $format = null): bool
+public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool- Replace
Symfony\Component\Messenger\Handler\MessageHandlerInterfaceinterface withSymfony\Component\Messenger\Attribute\AsMessageHandlerattribute on your message handlers.
+use Symfony\Component\Messenger\Attribute\AsMessageHandler;
-use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
+#[AsMessageHandler]
-final readonly class RenderErroredMessageHandler implements MessageHandlerInterface
+final readonly class RenderErroredMessageHandler- Add
#[AsCronTask(expression: '0 3 * * *', jitter: 60, arguments: '--no-debug -n -q')]to your project cron tasks to run them with the new Scheduler worker. - Remove
cronfrom your Dockerfile, and compose.yaml - For Docker users: replace your cron service with a new
schedulerworker to consume messages
# compose.yaml
services:
# ...
- cron:
- <<: *app_template
- entrypoint: 'docker-cron-entrypoint'
- restart: unless-stopped
- user: root
+ scheduler:
+ <<: *app_template
+ hostname: scheduler
+ stop_signal: SIGTERM
+ entrypoint: [ "php", "-d", "memory_limit=-1", "/app/bin/console", "messenger:consume", "scheduler_default", "--time-limit=1800" ]
+ restart: unless-stoppedAdd formats and serializer.hydra_prefix configuration if not already present in your api_platform.yaml file.
# config/packages/api_platform.yaml
api_platform:
# ...
formats:
jsonld: ['application/ld+json']
json: ['application/json']
x-www-form-urlencoded: ['application/x-www-form-urlencoded']
serializer:
hydra_prefix: trueAnd rename openapiContext to openapi on your api-resources configuration files for each operation.
To expose hotspot and imageCropAlignment properties in your API Platform, you need to enable the new DocumentDto.
# config/packages/roadiz_core.yaml
roadiz_core:
useDocumentDto: true[
{
"id": 1222,
"filename": "associes_groupe_01.jpg",
"mimeType": "image/jpeg",
"imageWidth": 2500,
"imageHeight": 1667,
"mediaDuration": 0,
"imageAverageColor": "#8d8a89",
"relativePath": "501fad4a/associes_groupe_01.jpg",
"imageCropAlignment": "center",
"hotspot": {
"x": 0.55,
"y": 0.38
},
"type": "image",
"processable": true
}
]Migrations will automatically convert database roles to JSON roles in users and usergroups tables.
But you need to update your security.yaml file to define your roles hierarchy.
# config/packages/security.yaml
security:
role_hierarchy:
ROLE_PASSWORDLESS_USER:
- ROLE_PUBLIC_USER
ROLE_EMAIL_VALIDATED:
- ROLE_PUBLIC_USER
ROLE_PUBLIC_USER:
- ROLE_USER
ROLE_BACKEND_USER:
- ROLE_USER
ROLE_SUPERADMIN:
- ROLE_PUBLIC_USER
- ROLE_ACCESS_VERSIONS
- ROLE_ACCESS_ATTRIBUTES
- ROLE_ACCESS_ATTRIBUTES_DELETE
- ROLE_ACCESS_CUSTOMFORMS
- ROLE_ACCESS_CUSTOMFORMS_RETENTION
- ROLE_ACCESS_CUSTOMFORMS_DELETE
- ROLE_ACCESS_DOCTRINE_CACHE_DELETE
- ROLE_ACCESS_DOCUMENTS
- ROLE_ACCESS_DOCUMENTS_LIMITATIONS
- ROLE_ACCESS_DOCUMENTS_DELETE
- ROLE_ACCESS_DOCUMENTS_CREATION_DATE
- ROLE_ACCESS_GROUPS
- ROLE_ACCESS_NODE_ATTRIBUTES
- ROLE_ACCESS_NODES
- ROLE_ACCESS_NODES_DELETE
- ROLE_ACCESS_NODES_SETTING
- ROLE_ACCESS_NODES_STATUS
- ROLE_ACCESS_NODETYPES
- ROLE_ACCESS_NODETYPES_DELETE
- ROLE_ACCESS_REDIRECTIONS
- ROLE_ACCESS_SETTINGS
- ROLE_ACCESS_TAGS
- ROLE_ACCESS_TAGS_DELETE
- ROLE_ACCESS_TRANSLATIONS
- ROLE_ACCESS_USERS
- ROLE_ACCESS_USERS_DELETE
- ROLE_ACCESS_WEBHOOKS
- ROLE_BACKEND_USER
- ROLE_ACCESS_LOGS
- ROLE_ACCESS_REALMS
- ROLE_ACCESS_REALM_NODES
- ROLE_ACCESS_FONTS
- ROLE_ALLOWED_TO_SWITCHAnd remove roles routes from your Roadiz Rozier menu entries:
# config/packages/roadiz_rozier.yaml
roadiz_rozier:
user_system:
name: 'user.system'
route: ~
icon: uk-icon-rz-users
- roles: ['ROLE_ACCESS_USERS', 'ROLE_ACCESS_ROLES', 'ROLE_ACCESS_GROUPS']
+ roles: ['ROLE_ACCESS_USERS', 'ROLE_ACCESS_GROUPS']
subentries:
manage_users:
name: 'manage.users'
route: usersHomePage
icon: uk-icon-rz-user
roles: ['ROLE_ACCESS_USERS']
- manage_roles:
- name: 'manage.roles'
- route: rolesHomePage
- icon: uk-icon-rz-roles
- roles: ['ROLE_ACCESS_ROLES']
manage_groups:
name: 'manage.groups'
route: groupsHomePage
icon: uk-icon-rz-groups
roles: ['ROLE_ACCESS_GROUPS']- Add
forceLocaleandforceLocaleWithUrlAliasesparameters - Move your Recaptcha configuration to
roadiz_core.recaptchaparameters - Replace
$recaptchaPrivateKeyand$recaptchaPublicKeyconstructor arguments withCaptchaServiceInterfacein your custom services.
# config/packages/roadiz_core.yaml
roadiz_core:
# ...
+ # Replace your public website URL with a dedicated domain name. It can be useful when using *headless* Roadiz version.
+ customPublicScheme: null
+ # Replace "?_preview=1" query string to preview website content with a dedicated domain name. It can be useful when using *headless* Roadiz version.
+ customPreviewScheme: null
+ # Force displaying translation locale in every generated node-source paths.
+ # This should be enabled if you redirect users based on their language on homepage.
+ forceLocale: false
+ # Force displaying translation locale in generated node-source paths even if there is an url-alias in it.
+ forceLocaleWithUrlAliases: false
# ...
medias:
unsplash_client_id: '%env(string:APP_UNSPLASH_CLIENT_ID)%'
soundcloud_client_id: '%env(string:APP_SOUNDCLOUD_CLIENT_ID)%'
google_server_id: '%env(string:APP_GOOGLE_SERVER_ID)%'
- recaptcha_private_key: '%env(string:APP_CAPTCHA_PRIVATE_KEY)%'
- recaptcha_public_key: '%env(string:APP_CAPTCHA_PUBLIC_KEY)%'
ffmpeg_path: '%env(string:APP_FFMPEG_PATH)%'
+ captcha:
+ private_key: '%env(string:APP_CAPTCHA_PRIVATE_KEY)%'
+ public_key: '%env(string:APP_CAPTCHA_PUBLIC_KEY)%'
+ verify_url: '%env(string:APP_CAPTCHA_VERIFY_URL)%'CaptchaServiceInterface will simplify your captcha form types and remove the need for recaptcha_private_key, recaptcha_public_key and verify_url parameters.
public function __construct(
- private readonly ?string $recaptchaPrivateKey,
- private readonly ?string $recaptchaPublicKey,
- private readonly string $verifyUrl = 'https://www.google.com/recaptcha/api/siteverify',
+ private readonly \RZ\Roadiz\CoreBundle\Captcha\CaptchaServiceInterface $captchaService,
) {
}
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('email', EmailType::class, [
'label' => 'newsletter.email',
'required' => true,
'attr' => [
'autocomplete' => 'email',
],
'constraints' => [
new NotBlank(),
new Email(),
],
]);
- if (
- !empty($this->recaptchaPublicKey)
- && !empty($this->recaptchaPrivateKey)
- ) {
- $builder->add('g-recaptcha-response', RecaptchaType::class, [
- 'mapped' => false,
- 'label' => false,
- 'required' => true,
- 'configs' => [
- 'publicKey' => $this->recaptchaPublicKey,
- ],
- 'constraints' => [
- new Recaptcha([
- 'fieldName' => 'g-recaptcha-response',
- 'privateKey' => $this->recaptchaPrivateKey,
- 'verifyUrl' => $this->verifyUrl,
- ]),
- ],
- ]);
- }
+ if ($this->captchaService->isEnabled()) {
+ $builder->add($this->captchaService->getFieldName(), \RZ\Roadiz\CoreBundle\Form\CaptchaType::class, [
+ 'mapped' => false,
+ ]);
+ }
}# config/packages/mailer.yaml
framework:
# ...
mailer:
# Use the default sender address for all emails
envelope:
sender: '%env(MAILER_ENVELOP_SENDER)%'###> symfony/mailer ###
MAILER_DSN=smtp://mailer:1025
MAILER_ENVELOP_SENDER="Roadiz Dev Website<roadiz-core-app@roadiz.io>"
###< symfony/mailer ###disclaimer and mailContact variables have been renamed to email_disclaimer and support_email_address in email templates.
These variables are now automatically provided by RoadizExtension.
Roadiz removed Apache Solr from its Core bundle. To re-enable it, you need to install the Solr bundle.
composer require roadiz/solr-bundle- Move your Solr endpoint configuration from
config/packages/roadiz_core.ymltoconfig/packages/nelmio_solarium.yaml - Use
RZ\Roadiz\SolrBundle\ClientRegistryInterfaceto get your Solr client. - Regenerate your NodesSources entities with
bin/console generate:nsentitiesto update repositories__constructmethods. NodesSourcesRepository::__constructsignature has changedNodesSourcesRepository::findBySearchQuerymethod has been removed to remove dependency on SearchEngine.- All Solr commands have been moved to
RZ\Roadiz\CoreBundle\SearchEngine\Consolenamespace. RZ\Roadiz\CoreBundle\Api\ListManager\SolrPaginatorhas been renamed toRZ\Roadiz\CoreBundle\Api\ListManager\SearchEnginePaginatorRZ\Roadiz\CoreBundle\Api\ListManager\SolrSearchListManagerhas been renamed toRZ\Roadiz\CoreBundle\Api\ListManager\SearchEngineListManager
- Roadiz requires
rezozero/intervention-request-bundleto~5.0.1
- All Abstract entities now use composition instead of inheritance.
- Replace extending
AbstractEntitywithPersistableInterfaceandSequentialIdTraitin your entities. - Replace extending
AbstractDateTimedwithDateTimedInterfaceandDateTimedTraitin your entities. - Replace extending
AbstractPositionedwithPositionedInterfaceandPositionedTraitin your entities. - Use
SequentialIdTraitto provide integeridproperty in your entities. - Use
UuidTraitto provide Uuididproperty in your entities. - Replace
$this->initAbstractDateTimed();calls with$this->initDateTimedTrait();in your entities.
ExplorerItemInterface::getId()now returnsstring|int|Uuid
NodesSourcesPathGeneratingEventdoes not havethemeproperty anymore.
- Make sure to upgrade to v2.4.11 first. And perform
bin/console nodetypes:export-filesbefore upgrading to 2.5. - A backup of your database is highly recommended before upgrading to 2.5.
- Run new migrations
- Dropped
phone,jobandbirthdaycolumns from users table, they are rarely used and aren't GDPR friendly.
Roadiz requires rezozero/intervention-request-bundle to ~4.0.0
It's possible to remove it from composer.json, and Composer will automatically use the correct version.
Roadiz requires jms/serializer-bundle to ~5.5.1
It's possible to remove it from composer.json, and Composer will automatically use the correct version.
Roadiz exposes a new Captcha validation service, which is generic and can be used with any captcha service.
- Roadiz requires php 8.2 minimum
- Upgraded to ApiPlatform 3.3 - requires config changes
- Prefix all resource files with
resources:for example:
- Prefix all resource files with
# config/api_resources/node.yml
resources:
RZ\Roadiz\CoreBundle\Entity\Node:
operations:
ApiPlatform\Metadata\Get:
method: 'GET'
normalizationContext:
groups:
- node
- tag_base
- translation_base
- document_display
- document_display_sources
enable_max_depth: true- Deleted
Controller::findTranslationForLocale,Controller::renderJson,Controller::denyResourceExceptForFormats,Controller::getHandlerFactory,Controller::getPreviewResolvermethods - Deleted deprecated
AppController::makeResponseCachable - Removed sensio/framework-extra-bundle, upgraded sentry/sentry-symfony and doctrine/annotations
- Upgraded rollerworks/password-strength-bundle, removed
Top500Provider.php - Removed Embed finder for Twitch (they disabled OEmbed on their API)
- All AbstractEmbedFinder sub-classes require HttpClientInterface, dropped GuzzleRequestMessage, changed HttpRequestMessageInterface
- Changed
WebResponseDataTransformerInterface::transformsignature to allow passing an existing WebResponseInterface - Changed all node exports to CSV format to be able to stream response.
- Pass NodesSources repository entityClass to parent constructor. Changed NodesSourcesRepository constructor signature.
AbstractPathNormalizer::__constructsignature changed (added Stopwatch).
Make sure to upgrade bundles.php file and api_platform.yaml configuration:
- Merge
collectionOperationsanditemOperationsintooperationsfor each resource usingApiPlatform\Metadata\GetorApiPlatform\Metadata\GetCollectionclasses - Regenerate your api platform resource YAML files, or rename
getByPathoperation to%entity%_get_by_path
- Solr: Removed
$proximityargument fromsearchandsearchWithHighlightSearchHandlerInterface methods - Make sure you don't have fields with name longer than 50 characters before migrating. Migration can be skipped if so.
- Removed NodeTypeField
idjoin column from NodesCustomForms, NodesSourcesDocuments and NodesToNodes relation tables to usefield_namestring column for loose relation. Make sure to backup your database before performing this migration. node_type_nameJSON property is no-longer required in node-type JSON export files.- Nodes: NodesSources
metaKeywordand Nodepriorityfields will be dropped. - Settings: Setting encryption and crypto keys have been dropped, migrate all your secrets to symfony:secrets to get only one secure vault.
Remove any crypto configuration from config/packages/roadiz_core.yml:
security:
private_key_name: defaultgetResultItemsmethod will always returnarray<SolrSearchResultItem>no matter item type or highlighting.- Command constructor signatures changed
- Controller::get and Controller::has methods have been removed
- Requires PHP 8.1 minimum
- Upgraded to Symfony 6.4 LTS
Log namespace changed to RZ\Roadiz\CoreBundle\Logger\Entity\Log.
Make sure you update config/packages/doctrine.yaml with:
# config/packages/doctrine.yaml
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
orm:
auto_generate_proxy_classes: true
default_entity_manager: default
entity_managers:
# Put `logger` entity manager first to select it as default for Log entity
logger:
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
mappings:
## Just sharding EM to avoid having Logs in default EM
## and flushing bad entities when storing log entries.
RoadizCoreLogger:
is_bundle: false
type: attribute
dir: '%kernel.project_dir%/vendor/roadiz/core-bundle/src/Logger/Entity'
prefix: 'RZ\Roadiz\CoreBundle\Logger\Entity'
alias: RoadizCoreLogger
default:
dql:
string_functions:
JSON_CONTAINS: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Mysql\JsonContains
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
## Keep RoadizCoreLogger to avoid creating different migrations since we are using
## the same database for both entity managers. Just sharding EM to avoid
## having Logs in default EM and flushing bad entities when storing log entries.
RoadizCoreLogger:
is_bundle: false
type: attribute
dir: '%kernel.project_dir%/vendor/roadiz/core-bundle/src/Logger/Entity'
prefix: 'RZ\Roadiz\CoreBundle\Logger\Entity'
alias: RoadizCoreLogger
App:
is_bundle: false
type: attribute
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
RoadizCoreBundle:
is_bundle: true
type: attribute
dir: 'src/Entity'
prefix: 'RZ\Roadiz\CoreBundle\Entity'
alias: RoadizCoreBundle
RZ\Roadiz\Core:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/vendor/roadiz/models/src/Core/AbstractEntities'
prefix: 'RZ\Roadiz\Core\AbstractEntities'
alias: AbstractEntities
App\GeneratedEntity:
is_bundle: false
type: attribute
dir: '%kernel.project_dir%/src/GeneratedEntity'
prefix: 'App\GeneratedEntity'
alias: App\GeneratedEntity
# ...First Roadiz version to use a monorepository structure. All Roadiz components are now in the same lib folder (except for nodetype-contracts).
roadiz/models namespace root is now ./src. Change your Doctrine entities path:
RZ\Roadiz\Core:
is_bundle: false
type: attribute
dir: '%kernel.project_dir%/vendor/roadiz/models/src/Roadiz/Core/AbstractEntities'
prefix: 'RZ\Roadiz\Core\AbstractEntities'
alias: AbstractEntitiesYou must migrate your config/api_resources/*.yml files to use new ApiPlatform interfaces and resource YML syntax
- Remove and regenerate your NS entities with
bin/console generate:nsentitiesto update namespaces - Remove and regenerate your Resource configs with
bin/console generate:api-resources- If you do not want to remove existing config, you'll have to move
itemOperationsandcollectionOperationsto singleoperationsnode and addclasswithApiPlatform\Metadata\GetorApiPlatform\Metadata\GetCollection - Rename
iritotypesand wrap single values into array - Rename
pathtouriTemplate - Rename
normalization_contexttonormalizationContext - Rename
openapi_contexttoopenapiContext - Move
shortNameto eachoperation - Rename
attributestoextraProperties(for/archivesendpoints) - Add
uriTemplatefor your custom endpoints (for/archivesendpoints) - Prefix all named operations with
api_to avoid conflict with non API routes
- If you do not want to remove existing config, you'll have to move
- All filters and extensions use new interfaces
- Removed all deprecated DataTransformer and Dto classes
- Once everything is migrated changed
metadata_backward_compatibility_layer: falseinconfig/packages/api_platform.yaml