Releases: smartbooster/sonata-bundle
Releases · smartbooster/sonata-bundle
v2.6.0
Added
- add vich_uploader translations (@mathieu-ducrot)
- add sonata templates for logo and vich download file (@mathieu-ducrot)
sonata_helper.html.twig
macro to centralize crud action rendering (@mathieu-ducrot)
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)
v2.4.0
Add markdown documentation rendering feature (@mathieu-ducrot)
Added
DocumentationController::renderMarkdown
action to render markdown documentation files stored in the /documentation directoryRouteLoader
+RouteCompilerPass
to auto generate routing for each markdown filesmarkdown.html.twig
template to render the markdown content as html
_documentation.scss
.sb-documentation class based on @tailwindcss/typography plugin_tailwind.scss
dedicated smartbooster tailwind override or missing class from unalign tailwind version
Changed
services.yaml
reorder services declaration by alphabetical namespace subject
Fixed
DocumentationController::email
use twig injected service to render the response content so no extra controller extending DocumentationController is
needed.standard_layout.html.twig
add missing extra padding on sonata_page_content_header when there is an env_banner
Removed
/config/routing.yaml
deleted in favor of route being available through theRouteLoader
(so when updating to this version you no longer need to
import it)
v2.3.0
Added
ui_banner.html.twig
macro to prompt a tailwind banner for usefull info (current environment, ...) (@mathieu-ducrot)AbstractApiCallAdmin::getOriginChoices
for api call origin filter (@mathieu-ducrot)ui_banner.html.twig
macro to prompt a tailwind banner for usefull info (current environment, ...) (@mathieu-ducrot)empty_layout.html.twig
addui_banner
on the sonata_wrapper block to show current server environmentstandard_layout.html.twig
addui_banner
on the sonata_header_noscript_warning block to show current server environment- to unlock it add the following to your
twig.globals
config :smart_server_environment: '%env(default::ENVIRONMENT)%'
- to unlock it add the following to your
admin.en.xlf
add missing english translations (@mathieu-ducrot)RestartApiCallTrait
controller action to recall already monitored api call (@mathieu-ducrot)- Dedicated
restart_api_call.html.twig
action template with specialROLE_MONITORING_RESTART_API_CALL
role check - Dedicated admin.extension.action_restart_api_call sonata extension
- Dedicated
AbstractApiCallAdmin
addrestartedAt
date show view + refresh icon on list to check which api has been recalled (@mathieu-ducrot)
v2.2.0
Changed
AbstractAdmin::__construct
params are now all optionnal as we must configure it through tags from what's ask on the next v5 of Sonata Admin (@mathieu-ducrot)- Update minimal smartbooster/core-bundle requirements to have ProcessMonitor and ApiCallMonitor services (@mathieu-ducrot)
Added
- Sonata abstract monitoring admin for CRON and ApiCall (@mathieu-ducrot)
- Sonata admin template for generic fields : (@mathieu-ducrot)
list_nl2br.html.twig
show_json.html.twig
show_process_logs.html.twig
process_status.html.twig
api_call_status_code.html.twig
Fixed
ParameterAdmin
fix remove useless translations options on the type enum field (@mathieu-ducrot)
Removed
- Remove allowing version
^3.3
foryokai/enum-bundle
bundle becauseParameterTypeEnum
extendsTranslatedEnum
and this is not present in version^3.3
(@lfortunier )
v2.1.1
Added
- Add annotations for orm mapping in addition to attributes to be compatible with both implementation (@lfortunier)
Fixed
BatchLog::date
type toDATETIME_MUTABLE
(type error introduce in update v2.0.0) (@mathieu-ducrot )UserTrait::lastLogin
type toDATETIME_MUTABLE
(type error introduce in update v2.0.0) (@mathieu-ducrot )
v2.1.0
Better Smart Parameter type management and value validation (@mathieu-ducrot )
Uprade guide
The upgrade to this version needs some extra steps from your part to work properly. Please do the following :
- Run a doctrine migration for the new properties added to the Smart Parameter Entity if you use them.
- Also add the following templates on your project if you use our ParameterAdmin
{# templates/admin/parameter_admin/list_value.html.twig #}
{% extends '@SonataAdmin/CRUD/base_list_field.html.twig' %}
{% block field %}
{% include '@SmartSonata/admin/parameter_admin/render_value.html.twig' %}
{% endblock %}
{# templates/admin/parameter_admin/timeline_history_field.html.twig #}
{% extends '@SmartSonata/admin/base_field/timeline_history_field.html.twig' %}
{% block render_value %}
{% include '@SmartSonata/admin/parameter_admin/render_value.html.twig' %}
{% endblock %}
- Once this is done, the ParameterAmin should work back as before. Update your smart_sonata.parameters types if you need to and you are good to go.
Now back to what have changes on this version ...
Added
ParameterInterface
for a better following on Parameter method and type evolution- It extends the
HistorizableInterface
which add the history field to the entity - So when upgrading to this version make sure to run a doctrine migration to have your updated values properly logged.
- It extends the
ParameterInterface::type
Parameter can now have a type (text by default) which impact the validation and the return type of the getValueParameterInterface::getArrayValue
for list values and email chain, this method return the value as a proper array typeParameterInterface::regex
used for value validation for text and list parameter type- Add
yokai/enum-bundle
composer requirement for the ParameterTypeEnum
Changed
ParameterProvider::getValue
now handle every new type added to theParameterInterface
ParameterAdmin
impact of new type and regex property added to theParameterInterface
- Changes made to the parameter value are now logged in the history of the Parameter
- The help field is now visible on the show/form only if it's not null
v2.0.1
Fixed
- Fix clear cache error on
EmailProvider
locale -> can be nullable and check$requestStack->getCurrentRequest()
is not null. (@lfortunier)
v2.0.0
Added
- Add Symfony v6.4 support
- Default
nelmio_alice
locale config to fr_FR SmartAdminInterface
which is used on AdminCompilerPass to add the required extra services- Missing admin and security trad added
Removed
- Drop Symfony v4 support
- Remove
doctrine/annotations
as we now use PHP8 attributes to define ORM properties - User roles aren't stored in database anymore, each entity with UserInterface must just define the getRoles function
Changed
- Use
Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface
service instead ofSymfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface
to be compatible with
SF 6 - Reformat all the entity annotations with PHP8 attributes
AbstractAdmin::setTokenManager
is now preset by the newAdminCompilerPass
(as the services.yaml abstract: true old way don't work properly with
SF 6 and the latest Sonata version)- The
AbstractAdmin::get
function has been flagged as @deprecated and will be remove next major (instead inject service via construct DI)
Fixed
- Fix auto margin of the login-box using display flex
v1.5.1
Changes
- Use namespace after use core bundle in
PasswordSafeableTrait.php
- Use bundle
smartbooster/standard-bundle
, changes in :- /bin
- Add configs
- Deletes make files
- Add Kernel
- Add .gitignore content
- Changes require dev
- Changes config of phpcs, phpstan and phpunit
- Comment base test because it doesn't work with the new
smartbooster/standard-bundle
implementation
- Fix some style because of the new
smartbooster/standard-bundle
implementation - Change action phpunit and qa order and use make, delete cache steps
- Add install.mk instead of use command in Makefile
- Delete codecov scan sending