Hit the road for Symfony full-stack
This version should be the last one using Symfony components and Pimple as a dependency injection container. Last versions pushed forward compatibility with Symfony framework by making all Roadiz components more independant from the DI container. And this release keeps on decoupling our architecture.
If you want to move to our next Roadix major version using Symfony framework, you should upgrade to v1.7 first and resolve any deprecations. Use Controller services instead of using $this->get('service')
or worse $this->container['service']
syntax.
This update requires composer.json changes and performing database migrations, make sure to backup your websites before upgrading.
New Webhook component
Roadiz can now send webhook at content update to any location (we provide Gitlab CI and Netlify webhook consumers). Webhooks can be trigger manually, at content update or scoped for any node inside a given root node. This new feature relies on Symfony Messenger and RateLimiter components.
- Added Webhooks node root to scope triggered events, add
GenericJsonPostMessage
Bye bye Rozier
Backoffice theme has been removed from Roadiz main repository and it is a Composer dependency in order to allow using it into next Roadiz versions with Symfony framework. If you are using standard-edition or headless-edition make sure to require it in your project: composer require roadiz/rozier
- Moved default backoffice services from BackendController to
RozierServiceProvider
- We moved every
EventSubscriber
from backoffice theme back to core because they're essential to Roadiz Core behaviour - Moved Rozier Explorer abstracts and interfaces symbols to
RZ/Roadiz/Explorer
namespace, make sure to update your project if you use/implement explorers - New document listing mode
Headless edition Docker image
Headless edition has now a dedicated Docker image to use it with no code at-all! This is handy if you do not need any custom features and a quick start:
https://github.com/roadiz/headless-edition/tree/develop#usage
Major changes
- Added new Symfony Messenger to allow sync/async operations for webhooks, search-engine indexing
- Added new Controller method
isCsrfTokenValid(string $id, ?string $token): bool
- Added new Controller method
getSettingsBag(): Settings
- Added new Controller method
dispatchEvent($event)
- Added new Controller method
redirectToRoute($route, array $parameters = [], int $status = 302): RedirectResponse
- We use
Psr\Container\ContainerInterface
every time it's possible instead ofPimple\Container
to reuse Roadiz components in Symfony Framework context - We type-hinted lots of parameters and method return types. You may have to upgrade your project methods signatures
- Added
NodeTypeField
Serializable fields andNodeType
searchable field to prevent a node-source title to be indexed in Solr. - Node-type fields can be configured to allow or prevent JSON serialization: added
NodeTypeFieldSerializationType
and translation messages - Fix: we fixed the way documents are linked to NodesSources to avoid duplicated (back-ported on v1.6)
- Solr indexers have been rewritten to cleanup subscribers, commands and allow async indexing (with Symfony messenger).
NodeUpdatedEvent
andNodeStatusChangedEvent
are no longer dispatch when changing node status. You must rely onworkflow.node.*
events.- Added new
ManagerRegistry
to replaceEntityManager
and allow smoother transition to Symfony framework. Classes constructor signatures may change. - Roadiz kernel now implements
Symfony\Component\HttpKernel\KernelInterface
- Changed
createForm
signature to match Symfony Framework - Removed contructor
Container
dependency for Models, inject services directly. - Use
ObjectManager
when possible instead ofEntityManager
- Typed Controller param and methods, you may have to type your own theme parameters
- public static $priority = 0;
public static int $priority = 0;
- protected static $themeName = '';
protected static string $themeName = '';
- protected static $themeAuthor = '';
protected static string $themeAuthor = '';
- protected static $themeCopyright = '';
protected static string $themeCopyright = '';
- protected static $themeDir = '';
protected static string $themeDir = '';
- protected static $backendTheme = false;
protected static bool $backendTheme = false;
Minor changes
- Backoffice section definition was removed from webhook namespace to prevent any dependencies from Core to Rozier theme.
- Added
SettingTypeResolver
to remove Symfony Form types definitions from Entity - Remove deprecated Security classes
- Added
meta
as Twig Globals, fixed Install setup - Removed
static_domain_name
database setting, usestaticDomainName
in YAML configuration to prevent database access to initialize assets packages - Remove
em
service usage as much as possible, i.e. in TreeWidgets. ConsoleCommands - Moved Document related event subscribers to
roadiz/document
package - Replaced Splashbase service with Unsplash, this requires an API key (stored in Roadiz settings)
- Added new
documents:prune:orphans
command to remove document from database when no file has been found on file-system (except for embeds) - Do not prevent
ExceptionSubscriber
to be executed in debug mode and JSON format responses - Additional database table indexes
- Add
Document::isLocal
method to test if filename and folder are not empty - Added
custom_public_scheme
setting for headless projects - Documents: added new
DisplayableInterface
- Documents: added
RandomImageFinder
service to allow different random image service in your project - Documents:
AbstractSplashbasePictureFinder
is deprecated as splashbase.co is not available anymore - OpenID: removed
settingsBag
usage for main configuration, Openid provider throwsUsernameNotFoundException
to allow ChainUserProvider to test other user providers. - Markdown: update to
commonmark
v2 - Added new
roadiz/dts-generator
to generate Typescript type definition from your node-types.
And after?
Roadiz v2 will be a symfony-pack to be added to any existing Symfony 5.3 application. It will composed of a roadiz/core-bundle
and roadiz/compat-bundle
roadiz/rozier-bundle
to ensure compatibility with existing themes (such as our Backoffice theme) in the first time. Then new projects will be able to use App
logic instead of themes and even API-platform.
All Roadiz sub-packages: models
, documents
, entity-generator
, markdown
, nodetype-contracts
, openid
, random
will still be used as framework agnostic package between v1.x and v2.x until v1.x is obsolete.
Our next steps are to migrate latest projects and our most important middleware themes (AbstractBlogTheme, AbstractApiTheme) to this new architecture. This will allow Roadiz to benefit from the awesome Symfony bundle community.
Then in the long-term we plan to re-develop our backoffice theme with new user-interface and better features, taking advantage of headless architecture.