v2.5.0
Added
show_history_field.html.twig
based on tailwind class + TwigHistoryExtension
required to autocomplete some data of the history rowsHistoryExtension
to automaticaly add the mentioned above template on the show view of every entity that implement theSmart\CoreBundle\Entity\HistoryInterface
- iconify cdn to use iconify-icon Web Component in
standard_layout.html.twig
andempty_layout.html.twig
- Twig
FormatExtension
to detect data type base on string value templates/macros/badge.html.twig
to use in tailwind blockAbstractAdmin::showHistoryTemplate
property to ease the override of the show_history_template.html.twig per admin
Changed
- BC Break
SendAccountCreationEmailTrait::sendAccountCreationEmailAction
the user subject is now entirely passed to theBaseMailer
to log the email sent in
his history.- You must add the
MailableInterface
to your User entity forBaseMailer::setRecipientToEmail
to work properly
- You must add the
BaseMailer::setRecipientToEmail
advanced scenario to init the to, cc and bcc of the email based on the recipient type- BC Break
AbstractApiCallAdmin
andAbstractCronAdmin
now use messages forchoice_translation_domain
for their type properties- You must move your cron.my_command.label translations on the messages.%lang%.%format% file instead of using the admin.%lang%.%format%
api_call_status.html.twig
now display null status code as "Ongoing" placeholder textParameter
entity now useHistorizableInterface
from core-bundle- Impact on
ParameterAdmin
: HistoryLogger DI removed + all previous log mention removed - No more need to declare the
list_value.html.twig
andtimeline_history_field.html.twig
on the project as they are handle by the Sonata-Bundle - BC Break database migration require to keep old history legacy :
<?php declare(strict_types=1); namespace DoctrineMigrations; use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; final class Version20240619081425 extends AbstractMigration { public function getDescription(): string { return "Rename history field to historyLegacy for conversion and add new history field which is saved from the core-bundle"; } public function up(Schema $schema): void { $this->addSql('ALTER TABLE smart_parameter CHANGE history history_legacy JSON DEFAULT NULL'); $this->addSql('ALTER TABLE smart_parameter ADD history JSON DEFAULT NULL'); } public function down(Schema $schema): void { $this->addSql('ALTER TABLE smart_parameter DROP history'); $this->addSql('ALTER TABLE smart_parameter CHANGE history_legacy history JSON DEFAULT NULL'); } }
- Impact on
Flag as deprecated
In anticipation for the v3.0.0 (cf. UPGRADE-3.0.md) we mark the following classes as deprecated :
Smart\SonataBundle\Entity\Log\BatchLog
Smart\SonataBundle\Entity\Log\HistorizableInterface
Smart\SonataBundle\Entity\Log\HistorizableTrait
Smart\SonataBundle\Logger\BatchLogger
Smart\SonataBundle\Logger\HistoryLogger
templates\admin\base_field\timeline_history_field.html.twig
Release handle by (@mathieu-ducrot)