Skip to content

Latest commit

 

History

History
110 lines (84 loc) · 4.44 KB

File metadata and controls

110 lines (84 loc) · 4.44 KB

UPGRADE FROM 2.0 TO 2.1

General

  1. The sylius_admin_customer_orders_statistics route has been deprecated.

  2. The minimum version of Symfony 7 packages has been bumped from Symfony ^7.1 to ^7.2

  3. The tabler package has been updated to version ^1.3.0. Please pay attention to the accordion element in final applications, as its implementation has changed.

Twig Hooks

  1. The sylius_admin.dashboard.index.content.latest_statistics.new_customers hook has been deprecated and disabled. It has been replaced by the sylius_admin.dashboard.index.content.latest_statistics.pending_actions.

  2. The history, cancel and resend_confirmation_email hookables from 'sylius_admin.order.show.content.header.title_block.actions' hook have been deprecated and disabled. Now these templates are located in 'sylius_admin.order.show.content.header.title_block.actions.list' hook.

  3. 'sylius_shop.account.address_book.index.content.main.buttons' hook has been deprecated and disabled. Content of this hook has been moved to 'sylius_shop.account.address_book.index.content.main.header' section.

  4. 'sylius_shop.account.address_book.index.content.main.buttons.add_address' hook has been deprecated and disabled. Content of this hook has been moved to 'sylius_shop.account.address_book.index.content.main.header.buttons.add_address' section.

  5. The price, original_price, minimum_price hookables from 'sylius_admin.product.update.content.form.sections.channel_pricing' hook have been deprecated and disabled. Now these templates are located in 'sylius_admin.product.create.content.form.sections.channel_pricing.info'.

Assets

Overview of Changes

Sylius has modernized its asset management system with these key improvements:

  • Bundle-prefixed controller paths
  • JSON-based configuration
  • Flexible controller registration options

Updated Controller Paths

All core controllers now use standardized bundle prefixes:

Admin Controllers

Old Path New Path
slug @sylius/admin-bundle/slug
taxon-slug @sylius/admin-bundle/taxon-slug
taxon-tree @sylius/admin-bundle/taxon-tree
delete-taxon @sylius/admin-bundle/delete-taxon
product-attribute-autocomplete @sylius/admin-bundle/product-attribute-autocomplete
product-taxon-tree @sylius/admin-bundle/product-taxon-tree
save-positions @sylius/admin-bundle/save-positions
compound-form-errors @sylius/admin-bundle/compound-form-errors
tabs-errors @sylius/admin-bundle/tabs-errors

Shop Controller
api-login@sylius/shop-bundle/api-login

New Configuration System

Configuration Files

assets/
  admin/
    controllers.json  # Admin controller configurations
  shop/
    controllers.json  # Shop controller configurations
  controllers.json # Shared controllers configurations imported via flex

Example Configuration:

{
  "@sylius/admin-bundle/slug": {
    "enabled": true,
    "fetch": "lazy"
  }
}

Key Actions:

  • Enable/disable controllers
  • Change loading behavior (lazy/eager)
  • Extend with custom controllers

Controller Registration Methods

  1. Automatic Discovery

    • Files in ./controllers/ directory
    • Naming pattern: [name]_controller.js
    • Auto-registered with Stimulus
  2. JSON Configuration

    • Pre-configured bundle controllers
    • Managed via controllers.json files
    • Lazy-loaded by default
  3. Manual Registration

    // In bootstrap.js:
    import CustomController from './custom_controller_dir/custom_controller';
    app.register('custom', CustomController);

    Use for:

    • Third-party controllers
    • Non-standard locations
    • Advanced initialization

Migration Guide

  1. Update all controller references to use new prefixed paths
  2. Review Sylius-Standard PR #1126 for implementation details

Note: The old mechanism will remain functional until you actively migrate to the new system.