Skip to content

Latest commit

 

History

History
742 lines (630 loc) · 32.1 KB

File metadata and controls

742 lines (630 loc) · 32.1 KB

Upgrade to 2.8

⚠ Twig breaking changes

  • Removed bulk confirmation templates (bulk_base.html.twig, bulk_delete.html.twig), use admin/confirm_action.html.twig instead

For Twig templates using @RoadizRozier/admin/base.html.twig as parent template, make sure to update

  • content_title
  • content_count_filters
  • content_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 %}

⚠ Rozier menu icons changed

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-line

New admin templates

New reusable templates for building back-office pages:

  • admin/head.html.twig - Page header with title, breadcrumb, buttons
  • admin/confirm_action.html.twig - Generic confirmation page
  • widgets/rz_filters_bar.html.twig - Filter bar widget
  • widgets/rz_bulk_actions.html.twig - Bulk actions widget
  • New macros: rz_button, rz_badge, rz_actions_menu, rz_card

Upgrade to 2.7

⚠ Breaking changes

  • Upgrade Symfony dependencies to 7.4
  • NodeSourceWalkerContext requires a new service NodeTypeClassLocatorInterface in its constructor.
  • Removed Node::sterile property and Node::isSterile() method.
  • Removed deprecated Node status constants in favor of NodeStatus enum
  • Custom forms and contact form now return a constraint violation list in JSON format: roadiz_core.useConstraintViolationList: true. This requires to configure roadiz_core.customFormPostOperationName with your custom form operation name if you want to use this feature.
  • Interface setter methods now return static instead of self to 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 getFontsFilesPath and getFontsFilesBasePath methods from RZ\Roadiz\Documents\Models\FileAwareInterface

New custom-form webhook system

  • 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

Other changes

  • 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 static to 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\EntityThumbnailProviderInterface system to get a thumbnail URL for any Roadiz entity.

Upgrade to 2.6

⚠ Breaking changes

  • 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\Rozier namespace. Controllers, templates and services have been moved to RZ\Roadiz\RozierBundle namespace.
  • Dropped Roles entity, use native Symfony Roles hierarchy to define your roles instead
  • Dropped RoleArrayVoter BC, you cannot use isGranted and denyUnlessGranted methods with arrays
  • New CaptchaServiceInterface to make captcha support any provider service.
  • All Solr and SearchEngine related logic has been moved to the new roadiz/solr-bundle bundle.
  • ThemeAwareNodeRouter and ThemeAwareNodeUrlMatcher classes have been removed
  • All deprecated AbstractField constants have been removed (in favor of FieldType enum)
  • NodesSourcesRepository::findBySearchQuery method has been removed to remove dependency on SearchEngine
  • NodesSourcesHeadInterface has been simplified: getPolicyUrl, getHomePageUrl and getHomePage methods have been removed
  • Roadiz Core solr configuration has been deprecated, use nelmio/solarium-bundle configuration instead.
    • All Solr services now depends on ClientRegistryInterface
    • All Solr commands must provide a clientName argument to validateSolrState.
    • SolrPaginator renamed to SearchEnginePaginator
    • SolrSearchListManager renamed to SearchEngineListManager
  • 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
  • EmailManager has been deprecated, use symfony/notifier instead.
  • email_sender Setting has been removed, use framework.mailer.envelope.sender configuration parameter instead.
  • EmailManager::getOrigin() method has been removed, this will use framework.mailer.envelope.sender configuration parameter.
  • Added DocumentDto to expose NodesSources documents in API Platform with contextualized hotspot and imageCropAlignment properties.
  • Added new ROLE_ACCESS_USERS_DETAIL role to allow user details edition (GDPR) and moved user language into default UserType form.
  • ContactFormManager::setReceiver has been renamed to setRecipients and accepts an array of RecipientInterface.

Upgrade your composer.json

  • Set roadiz packages to 2.6.*
  • Set symfony packages to 7.3.*
  • Allow symfony 7.3 on extra.symfony.require key
    "extra": {
        "symfony": {
            "allow-contrib": false,
-           "require": "6.4.*",
+           "require": "7.3.*",
        }
    }
  • Remove symfony/proxy-manager-bridge and doctrine/annotations packages, they are no longer required.
  • Remove roadiz/compat-bundle and roadiz/rozier packages

Remove Roadiz CompatBundle

  • Remove RZ\Roadiz\CompatBundle\RoadizCompatBundle::class from your config/bundles.php file
  • Remove config/packages/roadiz_compat.yaml file
  • Remove roadiz/compat-bundle from your composer.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

Upgrade you project code base for Symfony 7.3

  • Replace Symfony\Component\Security\Core\Security with Symfony\Bundle\SecurityBundle\Security
  • Remove security.enable_authenticator_manager option from your config/packages/security.yaml
  • Doctrine annotation have been removed:
    • Switch all Doctrine entity mappings from type: annotation to type: attribute
    • Remove any routes using type: annotation
  • All Normalizer classes must comply to the new method signatures for normalize, supportsNormalization, supportsDenormalization methods: 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\MessageHandlerInterface interface with Symfony\Component\Messenger\Attribute\AsMessageHandler attribute 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

Upgrade your Messenger configuration with Scheduler

  • 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 cron from your Dockerfile, and compose.yaml
  • For Docker users: replace your cron service with a new scheduler worker 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-stopped

Upgrade your API Platform configuration

Add 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: true

And rename openapiContext to openapi on your api-resources configuration files for each operation.

Enable new DocumentDto

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
  }
]

Upgrade your Roadiz roles hierarchy

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_SWITCH

And 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']

Upgrade your Roadiz Core bundle configuration

  • Add forceLocale and forceLocaleWithUrlAliases parameters
  • Move your Recaptcha configuration to roadiz_core.recaptcha parameters
  • Replace $recaptchaPrivateKey and $recaptchaPublicKey constructor arguments with CaptchaServiceInterface in 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)%'

Upgrade your captcha protected Form types

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,
+           ]);
+        }
     }

Upgrade your Mailer configuration

# 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 ###

Upgrade your email templates

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.

Upgrade your Solr configuration

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.yml to config/packages/nelmio_solarium.yaml
  • Use RZ\Roadiz\SolrBundle\ClientRegistryInterface to get your Solr client.
  • Regenerate your NodesSources entities with bin/console generate:nsentities to update repositories __construct methods.
  • NodesSourcesRepository::__construct signature has changed
  • NodesSourcesRepository::findBySearchQuery method has been removed to remove dependency on SearchEngine.
  • All Solr commands have been moved to RZ\Roadiz\CoreBundle\SearchEngine\Console namespace.
  • RZ\Roadiz\CoreBundle\Api\ListManager\SolrPaginator has been renamed to RZ\Roadiz\CoreBundle\Api\ListManager\SearchEnginePaginator
  • RZ\Roadiz\CoreBundle\Api\ListManager\SolrSearchListManager has been renamed to RZ\Roadiz\CoreBundle\Api\ListManager\SearchEngineListManager

Upgrade rezozero/intervention-request-bundle

  • Roadiz requires rezozero/intervention-request-bundle to ~5.0.1

Use composition instead of inheritance for Abstract entities

  • All Abstract entities now use composition instead of inheritance.
  • Replace extending AbstractEntity with PersistableInterface and SequentialIdTrait in your entities.
  • Replace extending AbstractDateTimed with DateTimedInterface and DateTimedTrait in your entities.
  • Replace extending AbstractPositioned with PositionedInterface and PositionedTrait in your entities.
  • Use SequentialIdTrait to provide integer id property in your entities.
  • Use UuidTrait to provide Uuid id property in your entities.
  • Replace $this->initAbstractDateTimed(); calls with $this->initDateTimedTrait(); in your entities.

Interface changes

  • ExplorerItemInterface::getId() now returns string|int|Uuid

Removed Themes from routing and events

  • NodesSourcesPathGeneratingEvent does not have theme property anymore.

Upgrade to 2.5

Removed node_types and node_type_fields tables

  • Make sure to upgrade to v2.4.11 first. And perform bin/console nodetypes:export-files before upgrading to 2.5.
  • A backup of your database is highly recommended before upgrading to 2.5.
  • Run new migrations

Removed useless user properties

  • Dropped phone, job and birthday columns from users table, they are rarely used and aren't GDPR friendly.

Upgraded rezozero/intervention-request-bundle

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.

Upgraded jms/serializer-bundle

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.

Deprecated Recaptcha validation (since v2.5.30)

Roadiz exposes a new Captcha validation service, which is generic and can be used with any captcha service.

Upgrade to 2.4

⚠ Breaking changes

  • Roadiz requires php 8.2 minimum
  • Upgraded to ApiPlatform 3.3 - requires config changes
    • Prefix all resource files with resources: for example:
# 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::getPreviewResolver methods
  • 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::transform signature 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::__construct signature changed (added Stopwatch).

Upgrade to 2.3

⚠ Breaking changes

Switched to ApiPlatform 3.2

Make sure to upgrade bundles.php file and api_platform.yaml configuration:

  • Merge collectionOperations and itemOperations into operations for each resource using ApiPlatform\Metadata\Get or ApiPlatform\Metadata\GetCollection classes
  • Regenerate your api platform resource YAML files, or rename getByPath operation to %entity%_get_by_path

Other changes

  • Solr: Removed $proximity argument from search and searchWithHighlight SearchHandlerInterface methods
  • Make sure you don't have fields with name longer than 50 characters before migrating. Migration can be skipped if so.
  • Removed NodeTypeField id join column from NodesCustomForms, NodesSourcesDocuments and NodesToNodes relation tables to use field_name string column for loose relation. Make sure to backup your database before performing this migration.
  • node_type_name JSON property is no-longer required in node-type JSON export files.
  • Nodes: NodesSources metaKeyword and Node priority fields 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: default
  • getResultItems method will always return array<SolrSearchResultItem> no matter item type or highlighting.
  • Command constructor signatures changed
  • Controller::get and Controller::has methods have been removed

Upgrade to 2.2

  • Requires PHP 8.1 minimum
  • Upgraded to Symfony 6.4 LTS

Logger configuration

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
	            # ...

Upgrade to 2.1

First Roadiz version to use a monorepository structure. All Roadiz components are now in the same lib folder (except for nodetype-contracts).

⚠ Breaking changes

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: AbstractEntities

ApiPlatform 2.7

You 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:nsentities to 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 itemOperations and collectionOperations to single operations node and add class with ApiPlatform\Metadata\Get or ApiPlatform\Metadata\GetCollection
    • Rename iri to types and wrap single values into array
    • Rename path to uriTemplate
    • Rename normalization_context to normalizationContext
    • Rename openapi_context to openapiContext
    • Move shortName to each operation
    • Rename attributes to extraProperties (for /archives endpoints)
    • Add uriTemplate for your custom endpoints (for /archives endpoints)
    • Prefix all named operations with api_ to avoid conflict with non API routes
  • All filters and extensions use new interfaces
  • Removed all deprecated DataTransformer and Dto classes
  • Once everything is migrated changed metadata_backward_compatibility_layer: false in config/packages/api_platform.yaml