GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CmsPlugin/UPGRADE-1.2.md at 1.2 · Sylius/CmsPlugin

Expand file tree

/

UPGRADE-1.2.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
97 lines (78 loc) · 3.85 KB
/

UPGRADE-1.2.md

Copy path

File metadata and controls

97 lines (78 loc) · 3.85 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

UPGRADE FROM 1.1 TO 1.2

Constructors signature changes

  1. The following constructor signatures have been changed:

    Sylius\CmsPlugin\Renderer\ContentElement\ProductsCarouselContentElementRenderer

        public function __construct(
    -       private ProductRepositoryInterface $productRepository,
    +       private ProductsProviderInterface|ProductRepositoryInterface $productsProvider,
        )

    Sylius\CmsPlugin\Renderer\ContentElement\ProductsCarouselByTaxonContentElementRenderer

        public function __construct(
    -       private ProductRepositoryInterface $productRepository,
    -       private TaxonRepositoryInterface $taxonRepository,
    +       private ProductsProviderInterface|ProductRepositoryInterface $productsProvider,
    +       private ?TaxonRepositoryInterface $taxonRepository = null,
        )

    Sylius\CmsPlugin\Renderer\ContentElement\ProductsGridContentElementRenderer

        public function __construct(
    -       private ProductRepositoryInterface $productRepository,
    +       private ProductsProviderInterface|ProductRepositoryInterface $productsProvider,
        )

    Sylius\CmsPlugin\Renderer\ContentElement\ProductsGridByTaxonContentElementRenderer

        public function __construct(
    -       private ProductRepositoryInterface $productRepository,
    -       private TaxonRepositoryInterface $taxonRepository,
    +       private ProductsProviderInterface|ProductRepositoryInterface $productsProvider,
    +       private ?TaxonRepositoryInterface $taxonRepository = null,
        )

    For backward compatibility, the old constructor signatures are still supported but deprecated. Passing repository interfaces will trigger a deprecation notice and will be removed in version 2.0.

Validation

  1. Passing an array of options to configure a CMS Plugin validation constraint is deprecated since CMS Plugin 1.2 and will be removed in CMS Plugin 2.0. Use named arguments instead.

    The CollectionMatchesType and FileMatchesType constraints now declare explicit constructors with named arguments (marked with #[HasNamedArguments]) and can be used as PHP attributes. The legacy array syntax keeps working, it only triggers a deprecation.

    Configuring constraints via XML / YAML / PHP attributes is not affected and requires no changes; the validator loaders pass the options as named arguments automatically. Only direct instantiation in PHP should be migrated:

    -new CollectionMatchesType(['type' => 'page'])
    +new CollectionMatchesType(type: 'page')
    
    -new FileMatchesType(['field' => 'cover'])
    +new FileMatchesType(field: 'cover')

New WYSIWYG editor: Quill

A new Quill WYSIWYG editor is available alongside the existing Trix editor. The default remains trix, so no action is required to keep the previous behavior.

To use Quill, register its Stimulus controller together with its stylesheet in your assets/admin/controllers.json (Webpack Encore only picks up the autoimport entries listed there):

{
    "controllers": {
        "@ehyiah/ux-quill": {
            "quill": {
                "main": "dist/controller.js",
                "webpackMode": "eager",
                "fetch": "eager",
                "enabled": true,
                "autoimport": {
                    "quill/dist/quill.snow.css": true
                }
            }
        }
    }
}

quill.snow.css is the theme the plugin uses by default. Any other Quill stylesheet, for example quill/dist/quill.bubble.css or the module styles listed under symfony.controllers.quill.autoimport in the package.json of @ehyiah/ux-quill, can be added to the same autoimport section.

See the documentation for setup and configuration details: https://docs.sylius.com/cms-plugin/development/wysiwyg-editors

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.