- Allow Symfony 7.4
HealthCheckControllerUse minor version for status comparison instead of patch version + add missing target _blank in templatemain.scssdirect node_modules import path mention for bootstrap-sass
.php-cs-fixer.dist.phpconfig + phpstan lvl 8, 9, 10 ignoreErrors to review
HealthCheckControllerto check used versions on the project and if there are any CVE.
show_history_field.html.twigadd support for HTML rendering in history titles
confid/doctrine.yamladd config to fixLogicException: This bundle relies on savepoints for nested database transactions. You need to enable "use_savepoints" on the Doctrine DBAL config for connection "default".
composer.jsonAllow sentry/sentry-symfony ^5.1 for PHP 8.4 support
list_api_call_route_url.html.twigtemplate to reduce the size of the url onAbstractApiCallAdmin
show_history_field.html.twigfix error "Impossible to access an attribute ("f") on a string variable ("label.empty")." on display empty collections history
- Dropped support on
Parameter::historyLegacyand also remove it from theParameterAdmin
docs/tailwind.mddocumentationAbstractAdmin::getHistoryConfignew method to impact on show_history_field renderingshow_history_field.html.twigAddrender_diffandrender_diff_labelblock to ease template override- Add common translations used on ApiCallAdmin and CronAdmin + history.context.sso
show_history_field.html.twigAdjust the template to translate when history config fields has the enum_prefix_label optiondocs/mailer.mdupdate documentation on doc route import, documentation_help block, MailableInterface use and how to extend the BaseMailer
_documentation.scssFix tailwind sb-documentation style : max-width + table and image max-width/transformBaseMailer::setRecipientToEmailrecipients reset for successive calls on the send method
- add vich_uploader translations
- add sonata templates for logo and vich download file
sonata_helper.html.twigmacro to centralize crud action rendering
show_history_field.html.twigbased on tailwind class + TwigHistoryExtensionrequired to autocomplete some data of the history rowsHistoryExtensionto 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.twigandempty_layout.html.twig - Twig
FormatExtensionto detect data type base on string value templates/macros/badge.html.twigto use in tailwind blockAbstractAdmin::showHistoryTemplateproperty to ease the override of the show_history_template.html.twig per admin
- BC Break
SendAccountCreationEmailTrait::sendAccountCreationEmailActionthe user subject is now entirely passed to theBaseMailerto log the email sent in his history.- You must add the
MailableInterfaceto your User entity forBaseMailer::setRecipientToEmailto work properly
- You must add the
BaseMailer::setRecipientToEmailadvanced scenario to init the to, cc and bcc of the email based on the recipient type- BC Break
AbstractApiCallAdminandAbstractCronAdminnow use messages forchoice_translation_domainfor 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.twignow display null status code as "Ongoing" placeholder textParameterentity now useHistorizableInterfacefrom core-bundle- Impact on
ParameterAdmin: HistoryLogger DI removed + all previous log mention removed - No more need to declare the
list_value.html.twigandtimeline_history_field.html.twigon 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
In anticipation for the v3.0.0 (cf. UPGRADE-3.0.md) we mark the following classes as deprecated :
Smart\SonataBundle\Entity\Log\BatchLogSmart\SonataBundle\Entity\Log\HistorizableInterfaceSmart\SonataBundle\Entity\Log\HistorizableTraitSmart\SonataBundle\Logger\BatchLoggerSmart\SonataBundle\Logger\HistoryLoggertemplates\admin\base_field\timeline_history_field.html.twig
DocumentationController::renderMarkdownaction to render markdown documentation files stored in the /documentation directoryRouteLoader+RouteCompilerPassto auto generate routing for each markdown filesmarkdown.html.twigtemplate to render the markdown content as html
_documentation.scss.sb-documentation class based on @tailwindcss/typography plugin_tailwind.scssdedicated smartbooster tailwind override or missing class from unalign tailwind version
services.yamlreorder services declaration by alphabetical namespace subject
DocumentationController::emailuse twig injected service to render the response content so no extra controller extending DocumentationController is needed.standard_layout.html.twigadd missing extra padding on sonata_page_content_header when there is an env_banner
/config/routing.yamldeleted in favor of route being available through theRouteLoader(so when updating to this version you no longer need to import it)
AbstractApiCallAdmin::getOriginChoicesfor api call origin filterui_banner.html.twigmacro to prompt a tailwind banner for usefull info (current environment, ...)empty_layout.html.twigaddui_banneron the sonata_wrapper block to show current server environmentstandard_layout.html.twigaddui_banneron the sonata_header_noscript_warning block to show current server environment- to unlock it add the following to your
twig.globalsconfig :smart_server_environment: '%env(default::ENVIRONMENT)%'
- to unlock it add the following to your
admin.en.xlfadd missing english translationsRestartApiCallTraitcontroller action to recall already monitored api call- Dedicated
restart_api_call.html.twigaction template with specialROLE_MONITORING_RESTART_API_CALLrole check - Dedicated admin.extension.action_restart_api_call sonata extension
- Dedicated
AbstractApiCallAdminaddrestartedAtdate show view + refresh icon on list to check which api has been recalled
AbstractAdmin::__constructparams are now all optionnal as we must configure it through tags from what's ask on the next v5 of Sonata Admin- Update minimal smartbooster/core-bundle requirements to have ProcessMonitor and ApiCallMonitor services
- Sonata abstract monitoring admin for CRON and ApiCall
- Sonata admin template for generic fields :
list_nl2br.html.twigshow_json.html.twigshow_process_logs.html.twigprocess_status.html.twigapi_call_status_code.html.twig
ParameterAdminfix remove useless translations options on the type enum field
- Remove allowing version
^3.3foryokai/enum-bundlebundle becauseParameterTypeEnumextendsTranslatedEnumand this is not present in version^3.3
- Add annotations for orm mapping in addition to attributes to be compatible with both implementation
BatchLog::datetype toDATETIME_MUTABLE(type error introduce in update v2.0.0)UserTrait::lastLogintype toDATETIME_MUTABLE(type error introduce in update v2.0.0)
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 ...
ParameterInterfacefor a better following on Parameter method and type evolution- It extends the
HistorizableInterfacewhich 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::typeParameter can now have a type (text by default) which impact the validation and the return type of the getValueParameterInterface::getArrayValuefor list values and email chain, this method return the value as a proper array typeParameterInterface::regexused for value validation for text and list parameter type- Add
yokai/enum-bundlecomposer requirement for the ParameterTypeEnum
ParameterProvider::getValuenow handle every new type added to theParameterInterfaceParameterAdminimpact 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
- Fix clear cache error on
EmailProviderlocale -> can be nullable and check$requestStack->getCurrentRequest()is not null.
- Add Symfony v6.4 support
- Default
nelmio_alicelocale config to fr_FR SmartAdminInterfacewhich is used on AdminCompilerPass to add the required extra services- Missing admin and security trad added
- Drop Symfony v4 support
- Remove
doctrine/annotationsas 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
- Use
Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterfaceservice instead ofSymfony\Component\Security\Core\Encoder\UserPasswordEncoderInterfaceto be compatible with SF 6 - Reformat all the entity annotations with PHP8 attributes
AbstractAdmin::setTokenManageris 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::getfunction has been flagged as @deprecated and will be remove next major (instead inject service via construct DI)
- Fix auto margin of the login-box using display flex
- 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-bundleimplementation
- Fix some style because of the new
smartbooster/standard-bundleimplementation - 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
- Stop support for php 7.4
- Add
smartbooster/core-bundlebundle - Remove
IniOverrideConfig.phpto usesmartbooster/core-bundle - Remove
IsPasswordSafevalidator to usesmartbooster/core-bundle - Remove
AbstractFixtures.phpvalidator to usesmartbooster/core-bundle - Remove php 7.4 matrix on action because it can't use
smartbooster/core-bundleon php 7.4. Matrix implementation stay for future dev - Change php version on composer for run with >= 8.1
- Remove implement
\Serializablein User - Add magic method
__serializeand__unserializeinstead of\Serializablemethod - Add class variable of
$databaseTooland$clientinAbstractWebTestCase - Add
unset($this->databaseTool);intearDown()inAbstractWebTestCase - Call controller method with
::not:in routing config - Add return types
- Change
ROLE_PREVIOUS_ADMINtoIS_IMPERSONATOR Configuration::getConfigTreeBuildermust return typeTreeBuilder- Add
Symfony\Component\DependencyInjection\ContainerInterfacein service because use symfony service is deprecated - Set token storage by injection in
AbstractAdmin - User must implement
PasswordAuthenticatedUserInterface. Add implementation inSmartUserInterface - Add missing method and update method in
UserTrait - Set dummy password by default in
UserProcessor - Add
symfony/property-infointo composer to fix compatibility issue - Add
symfony/expression-languageinto composer to fix compatibility issue - Add
symfony/security-coreinto composer to fix missing service@security.user_password_encoder.generic - Remove
scrutinizer.ymlbecause we don't use it
- Service
IniOverrideConfigfor override php memory limit. If application use it, the env variablePLATFORM_BATCH_MEMORYmust be set. ex :PLATFORM_BATCH_MEMORY=1024M
- Update composer php version to use ^8.2
- Add possibility to use version ^7.0 of
dama/doctrine-test-bundle - Restrict use maximal version
^5.4ofsymfony/security-httpbecause of changing onUserPasswordEncoderInterfacein symfony 6 - Add
doctrine/annotationsin the require of composer - Update codes for phpstan issues
- Update github workflow for run in 7.4 and 8.2
- Update bundle version and remove bundle require by other bundle.
- Change
json_arrayintojsonorm type on roles attribute inUserTrait. Need migration on project.
- Encoder call with test on null password
- Sonata deprecated not use construct parameter in Admin
- Add new logic check when use HistoryLogger method
- Saving only different value on save diff in HistoryLogger
- Add overriding possibility of display value in diff show of history
- Fixed local in email layout if request is null
- Improve HistoryLogger with new methods for add diff log
- Add new methods for help to find the diff in HistorizableTrait and HistorizableInterface.
- [#41] Add HistoryLogger for entity modification logs + default admin template timeline_history
- [#41] Admin, model and logger for batch logging
- Fixed infinite loop in impersonate.html.twig because of not strict comparison
- Re add validate method on configureFormOption to ease form validation on the all object
- Fixed Namespace sonata admin extension for UserTrait
- [#37] Fix UserTrait name setter typping for Phpstan
- [#31] Fix old namespace SmartAuthentication with SmartSonata on templates/email/{locale}
- Fixed missing typing on UserTrait that prevent creating user on Admin
- Fixed missnaming of NAME_ACTIONS in ActionExtension to keep one column for it
- [#32] Merge code from the authentication-bundle and the parameter-bundle because in practice all smartbooster/sonata project used them. So it will be easier to maintain in just one repo.
- [#32] bumped major version of sonata-project/admin-bundle and doctrine-orm-admin-bundle to ^4.x to allow Symfony 5 compatibility
- [#32] the deprecated xxxAction formatted action from AbstractSecurityController have not been kept during the merge bundle migration.
- [#28] Automate Mailing management
- Drop support for PHP 7.3
- [#16] Enhance Security by not using Javascript on empty_layout
- [#18] Fix default bundle config loading by using prependExtensionConfig
- [#12] Migrate to github actions
- Add common admin bundles : DoctrineFixturesBundle, WebpackEncore, AliceDataFixtures
- Style for vichuploader form field
- Macro alert using raw filter for message translation
- Background display of login screen
- QA tools and assets compilation for testing