- Allow Symfony 7.4
- QA changes to match standard-bundle related from version ^1.2 : .php-cs-fixer.dist + phpcs security + phpstan lvl10
ProcessStatusEnum::addQbOrderByAdd method to add a qb order by on the enum
- Update
phpunit.xml&phpstan.neonconfig according to standard-bundle v1.1.2 - Add use_savepoints on doctrine test config in case of future database tests in the bundle
- Use DataProvider attribut as PHPUnit version updated to 12.2
- Fix PHP 8.4 deprecations in
ArrayUtils&StringUtilswith trim & strlen functions
composer.jsonAllow sentry/sentry-symfony ^5.1 for PHP 8.4 support
- Fixed deprecated on implicitly nullable param for PHP 8.4 support
HistoryDoctrineListener::handleHistoryFixed an issue with double flush operations inside listener. Logging is now forced without an immediate flush to prevent potential bugs caused by multiple flushes.
ProcessStatusEnumnew methods based on theEnumTraitfrom the platform-core-bundle : getBgColor, getBgColors, getTextColors, getTextColor, labels
FileUtils::slugifyFilenameSlugify and normalize filename + tests
ProcessMonitor::logExceptionswitch $e param type from\Exceptionto\Throwableto better handle lower level error log (such as undefined method, ...)
GroupConcat::parseFix access to the value of the$lexer->lookaheadif it's an array or a Token object
StringUtils::getEntitySnakeNamefixed return value on folder named with full capital letter by doing the snake conversion first then the replace
ArrayUtils::toIndexedArray+ tests Delete keys of array and multidimensional array (@lfortunier)
RequestUtils::getContextFromHostadd host ending with '.localhost' fallback
HistoryDoctrineListener::handleHistoryset deleted collection only to the owner
HistorizableInterface::getHistoryDiffFieldsToSkipbe able to skip doctrine collections fields inHistoryDoctrineListener::handleHistory
EntityCleanupCommandto delete cron, clean api calls or other entity easily through the bundle configuration entity_cleanup_command_configs
UpdatableInterface::getUpdatedAtandUpdatableInterface::setUpdatedAthandle nullable datetime
ArchivableInterface& traitCanonicalInterface& traitCodableInterface& traitEnableInterface& traitPositionableInterface& traitSearchableInterface& traitUpdatableInterface& trait
CreatableTraitTrait & interface with creation dateMonthYearTraitTrait & interface with numeric representation of a month and his numeric year. Useful for statistics purposes.
README.mdupdate : Add missing nelmio security settings configuration (@lfortunier)
HistoryLoggeradd missing STATUS_PROPERTY check on log update skipNameableInterface::setNameadd missing null case as it is mentioned on the traitNameableTrait::nameproperty scope set as protectedPersonNameableTrait::getInitialuse mb_substr for string with first accentuated character
ArrayUtils::hasDuplicateValue+ tests (@lfortunier)StringUtils::fillPrefixFill a prefix to value until specified length + tests (@lfortunier)DateUtils::addWorkingDaysto calculate a date based on working days + tests (@lfortunier)HistorizableInterface::getHistoryDiffFieldsToSkipto manage fields to skip logging on history (@mathieu-ducrot)
README.mdupdate : add scripts to the list of scripts that can be executed inscript-srcNelmio Security recommendations config. (@lfortunier)README.mdupdate : Add missing sentry settings configuration (@lfortunier)RequestUtils::getContextFromHostAdd .sso subdomain for proper detection on localhost (@mathieu-ducrot)HistoryLogger::logskip history log if it's an update without data (ex: diff detected in EntityChangeSet but the targetted fields are actually skip from getHistoryDiffFieldsToSkip @mathieu-ducrot)
FileableInterface,ImageableInterface,PdfInterfaceand their trait to demonstrate how to properly configure VichUploader annotations/attributesEmbeddedFileto deal with multiple files on the same entity. To use in combination with a OneToOne relation and ORM\EmbeddedUuidInterfaceand trait to for uuid managementParentFileTransformerto used on form with entity implementing theFileableInterfaceto auto set the parent relationMimeTypesUtilshelper for constraints mimeTypes check
NameableTraithandle setName with null type
Add Entity json History feature
HistoryInterface(s) and trait to add json history on entityUserProfileInterfaceto add on User entity that can be mentioned on history rowsMailableInterfaceto identify entities which have email sending featureHistoryLoggerand dedicated listeners to call him when doctrine detect changes during prePersist and preUpdateHistoryLoggernew CRON_ID_PROPERTY and API_ID_PROPERTY to link the history row with his corresponding monitoring entity idRequestUtilsto ease domain context detection
MonitoringApiControllerTrait::startApiCalladd optionnal $flush param in case we directly want the id to be logged in an entity historyApiCallMonitor::startWe now start the process after parsing the request to ensure all ApiCall properties that are non-nullable are set before flushing itApiCallTraitstatusCode is now nullable for ongoing ApiCall
MonitoringApiControllerTraitused to centralize ApiCall manipulation during api monitoringApiCallMonitor::logExceptionsimplify logging exception forApiCallusing theProcessMonitor
MarkdownUtilsto help formatting markdown content before being render as html
ProcessTrait::restartedAtUsed to know when we wanted to retry this process (creating a new dedicated process based on this one)ApiCallTraitadd missing properties rawContent, headers and contentTypeFormat to be able to redo the api call with every orginal dataApiCallMonitor::restartMethod to recall an already monitor api callsmart_coreconfig to handle which API route is allowed to be restarted by theApiCallMonitor
ApiCallMonitor::getProcessMonitorgetter to access the ProcessMonitor instance through it
ApiCallMonitor::startadd $flush param to matchProcessMonitor::startdefinitionApiCallMonitor::enduse Symfony Response const instead of hard coded value for the isSuccess check, also expand the range to >= 100 and < 400
DateUtils::millisecondsToStringint type cast when calling secondsToString to fix the deprecated: Implicit conversion from float
PhpFormattercommon date formatting to use on DateTime::format https://www.php.net/manual/en/datetime.format.php
ISO8601Formatterfor common date formattingProcessMonitorAdd functions to manage process log and print them out to the console
ProcessMonitor::startAdd boolean flush param to better manage when the process should be flushedProcessMonitor::endHandle passing process param as null
The process duration value is now calculated in milliseconds instead of seconds.
So update your databases values accordingly when updating to this version.
We added new function to the interface to get the value in seconds if you don't care about milliseconds.
ProcessMonitor::endduration calculation in milliseconds instead of seconds.
ProcessInterface::getDurationSeconds+ProcessInterface::getDurationSecondsAsStringto still manage process duration in seconds.DateUtils::millisecondsToStringthat adds up the number of milliseconds to the string, only if the value is less than a minute.
StringUtils::upperAccentuatedCharacter+ testsStringUtils::lowerAccentuatedCharacter+ testsStringUtils::formatLastName+ testsStringUtils::formatFirstName+ testsStringUtils::formatSpaceBetween+ tests
- Add mapping comment on EntityTrait to be compatible with doctrine annotations type
ApiCallMonitorto manage start/end ApiCallInterfaceProcessInterface::addExceptionTraceDatafunction to store the exception trace
ProcessTrait::addLogSwitch adding log at the end instead of the beginning
ArrayUtils::checkIssetKeys: Modify method with not strict comparaison
- Common Entity Interface and Trait such as the
ProcessInterfacewhich we will use to monitor cron, api and file generation. ProcessMonitorto centralize process code managementCommandPoolHelperservice to fetch data about the project symfony commands (like getting all cron choices)DateUtils::secondsToStringhelper to convert seconds into a small summary stringIniOverrideConfig::initDefaultTimezoneForClihelper to properly set the timezone when using date with PHP CLI on CleverCloudApiCallInterfaceand trait to ease monitoring API calls
RegexUtils::PHONE_PATTERNremove wrong extra digit needed on foreign number
- new
ArrayUtilsmethods :checkIssetKeys,trimExplode,removeEmpty,filterByPattern,flatToMap - new
MathUtilsmethods :calculateAverage,calculateDivision - new
DateUtilsmethods :getFirstDayYearFromDateTime,getLastDayMonthFromDateTime,getMonthsBetweenDateTimes,getDateTimeMonth,getDateTimeYear,getNbOfWorkingDaysBetweenDateTimes,getDateTimeFromMonthYear,getNbDayBetweenDateTimes,isNighttime,getLastDayPreviousMonthFromDateTime,getFirstDayNextMonthFromDateTime,getFirstDayMonth,getNextBirthdayDateTime,getFormattedLongMonth,getFormattedLongMonthYears,getFormattedShortMonthYears,addDays,subDays,addMonths,subMonths,addYears,subYears
StringUtils::getEntityRoutePrefixAdd optional $context param to be more generic and being used on other domain/context.
MathUtils::convertCentsToEuro: Convert cents to euro
MathUtils::formatBytes: Use 1000 instead of 1024 for calculate
MathUtils::formatBytes: Convert and Transform byte into readable format
Fidry\AliceDataFixtures\Loader\PurgerLoaderservice alias intoservices.yaml- Documentation on
^/anonymouspath insecurity.yaml