Alexander-Schranz
Alexander Schranz
Core Developer – Sulu GmbH
Core developer and support king. So dedicated to his work that we couldn't find a hobby to mention.
@alex_s_

Sulu 2.5.0 Release

After several months of work and a lot of merged pull requests we are happy to announce a new minor release of our beloved content management system. The release includes new features like support for Symfony 6, Password Policy configuration, Two Factor Authentication and the very useful Copy & Paste feature for blocks.

Copy & Paste for Blocks

The copy & paste feature is a great story about a community prototype developing into a full feature implemented in the CMS. It all began during a call with a new Sulu community member, mavuio. In this call, he showed us around his current systems and the features he’d implemented there, and more importantly, what he was missing in Sulu. One of these points was the ability to copy-and-paste blocks. After creating the feature request, mavuio did not stop working, and some weeks later he had created a working implementation of “copy & paste” for blocks on his fork of Sulu. This working implementation was a great foundation that we could just give directly to our UX Designer to create a UI/UX concept for the new feature. At this point I want to say a big thank you to mavuio for pushing this great feature.

For the copy and paste functionality we did a little cleanup of the look and feel of the blocks. We moved some functionality (like delete) into its own dropdown. And there you can also find the new functionality to copy, cut and duplicate a block. The `Add block` button is now also shown on hover between the blocks so you can easily add content between existing blocks.

The new Block Toolbar has been created (behind the `Select multiple blocks` button). Here you can copy, cut, duplicate and even delete multiple blocks.

The best thing about this feature is that you can even copy blocks from one page to another. We hope you and your content managers are enjoying this new feature.

Symfony 6 Support

With the release of Symfony 6 in November 2021 a new major version of your beloved framework was released. The release of Symfony 6.1 at the end of May 2022 brought another new version with new features, and it was time for Sulu to close the gap and support the latest version of Symfony.

First we had to upgrade several other packages in the PHP open source world, and they are now happy that they are supporting Symfony 6. You can see them in our tracking issue.

To support Symfony 6, some requirements of Sulu had to be changed:

  • Drop Support for Symfony 4.4 (The minimum requirement is now Symfony 5.4).
  • Drop Support for PHP 7.4 and lower. (The minimum requirement is now PHP 8.0).

With the introduction of Sulu Rector, and the existing possibilities of using Rector to upgrade Symfony, projects should now find it a lot easier to upgrade to a new major version of Symfony or a new PHP version.

Password Policy and Two Factor Authentication

We implemented two new features into the Sulu Security Bundle.

With the new password policy configuration it is now possible to configure the strength that a Sulu user password has to be.

sulu_security:
    password_policy:
        enabled: true
        pattern: '.{8,}'
config/packages/sulu_security.yaml

Sulu now supports Two Factor Authentication (2FA) via the scheb/2fa package. Install and configure the scheb/2fa package as outlined in the documentation. After configured correctly, a user can activate 2FA in their profile.

Upgrade instructions

Upgrade to the latest version of Sulu 2.5.0 today! Here’s how to upgrade:

  1. Upgrade your project to Symfony 5.4 (maybe using rector for it)
  2. Upgrade your Project to PHP 8.0 / 8.1 (maybe using rector for it)
  3. Upgrade your database to create the new schema for 2FA
  4. Fix any conflicting return types
  5. Optional but recommended: Replace usage of Swiftmailer with Symfony Mailer
  6. Now follow our Upgrading Sulu 2.x documentation to update your project to Sulu 2.5
  7. Optional but recommended: Update to Symfony 6

Do not hesitate to reach out via GitHub, Slack, or the contact form on our website should you need any help!

Let us know what you think

As always, we are happy to hear your feedback about this new minor release of Sulu CMS. Feel free to create an issue or a discussion on GitHub for bugs and feature requests. You can also contact us via Slack or our website anytime.