Mautic Community 5.0.0-rc2
Pre-release
Pre-release
Big thanks to @TomasVotruba for his dedicated time improving Mautic's codebase with his amazing tool https://github.com/rectorphp/rector. Most of the changes in this release were made by Tomas and moves the quality of the code into a new level.
There are also many bug fixes in this release. Thanks to everyone involved!
What's Changed
🔧 Refactoring
- [type-declarations] Add known bool return type declarations by @TomasVotruba in #12946
- [cs] remove redundant class docblock - round #2 by @TomasVotruba in #12950
- [type-declarations] Add known return array type declarations by @TomasVotruba in #12945
- [type-declarations] Add known return type declarations from new instances by @TomasVotruba in #12947
- [dead-code] Symplify useless variable assign, remove redundant null param by @TomasVotruba in #12953
- [type-declarations] Add ctor based property types in - Lead bundles by @TomasVotruba in #12952
- [type-declarations] Add return type declaration based on constants + add known array types by @TomasVotruba in #12954
- [dead-code] Remove unused variable assigns by @TomasVotruba in #12961
- [type-declarations] Add ctor based property types in - Plugin, Page, Category, Channel bundles by @TomasVotruba in #12955
- [type-declarations] Add ctor based property types in - Stage, Point, Api, Install, Dashboard bundles by @TomasVotruba in #12956
- [type-declarations] Add ctor based property types in - Webhook, Core, Sms, Campaign bundles by @TomasVotruba in #12957
- [type-declarations] Add ctor based property types in - Report bundles by @TomasVotruba in #12958
- [dead-code] Apply remove default null and && over ternary rules by @TomasVotruba in #12960
- [type-declarations] Add known void return type to /plugins by @TomasVotruba in #12963
- [type-declarations] Add known void return type to Stage, User and Webhook bundles by @TomasVotruba in #12964
- [typed-properties] Add ctor based typed properties to Integrations bundle by @TomasVotruba in #12969
- [typed-properties] Add ctor based typed properties to User bundle by @TomasVotruba in #12970
- [typed-properties] Add ctor based typed properties to Cache bundle by @TomasVotruba in #12972
- [typed-properties] Add ctor based typed properties to Email bundles by @TomasVotruba in #12971
- [type-declarations] Add known return void types in Point, Plugin bundles by @TomasVotruba in #12974
- [typed-properties] Add ctor based typed properties to Notification bundle by @TomasVotruba in #12976
- [typed-properties] Add ctor based typed properties to Form bundles by @TomasVotruba in #12978
- [typed-properties] Add ctor based typed properties to Stats bundle by @TomasVotruba in #12977
- [type-declarations] Add known return void types in Page bundle by @TomasVotruba in #12981
- [type-declarations] Add known return void types in Notification bundle by @TomasVotruba in #12975
- [type-declarations] Add known return void types in Report bundles by @TomasVotruba in #12973
- [typed-properties] Add ctor based typed properties to DynamicContent bundle by @TomasVotruba in #12980
- [type-declarations] Add known return void types in Sms bundles by @TomasVotruba in #12979
- [types] Add known void types in Forms bundle by @TomasVotruba in #12983
- [types] Add known void types in Asset bundle by @TomasVotruba in #12991
- [types] Add known void types in Chanel bundle by @TomasVotruba in #12987
- [types] Add known void types in Dashboard bundle by @TomasVotruba in #12990
- [types] Add known void types in Email bundle by @TomasVotruba in #12984
- [types] Add known void types in Lead bundle by @TomasVotruba in #12985
- [types] Add known void types in Core bundle by @TomasVotruba in #12986
- [type-declaration] Add known void return type declarations to the rest of code by @TomasVotruba in #12992
- [types] Add known void types in Api bundle by @TomasVotruba in #12989
- [types] Add known void types in Campaign bundle by @TomasVotruba in #12988
- [types] Add known return scalar types + strict types in Webhook, Report, Notification, Install and Core bundles by @TomasVotruba in #12994
- [types] Add known return scalar types + strict types in Email, Marketplace, Api and Channel bundles by @TomasVotruba in #12995
- [types] Add known return scalar types + strict types in Form, Assert and Config bundles by @TomasVotruba in #12996
- [types] Add known return scalar types + strict types in Sms, Page, Integrations, Dashboard and Campaign bundles by @TomasVotruba in #12997
- [types] Add known return scalar types + strict types in Stats, Point, Asset bundles by @TomasVotruba in #12999
- [types] Add known return scalar types + strict types in Stage, Plugin, Lead, Category and DynamicContent bundles by @TomasVotruba in #12998
- [dead-code] Apply full dead-set + remove few dead code parts by @TomasVotruba in #13000
- [PHP 8.0] Add promoted properties in Webhook, User, Stats bundles - step 2 by @TomasVotruba in #13004
- [PHP 8.0] Make use of property promotion - step 1 by @TomasVotruba in #13001
- [PHP 8.0] Add promoted properties in Stage, Sms, Report and Point bundles - step 3 by @TomasVotruba in #13005
- [PHP 8.0] Add promoted properties in Page, Notification, Lead and Plugin bundles - step 4 by @TomasVotruba in #13006
- [type-declarations] Add known bool return type declarations by @TomasVotruba in #13010
- [PHP 8.0] Add promoted properties in Marketplace, Integrations, Email, Form and leftovers - step 5 by @TomasVotruba in #13009
- [PHP 8.0] Make use of str start, ends, contains functions by @TomasVotruba in #13011
- [PHP 8.0] Make use of match() by @TomasVotruba in #13012
- [type-coverage] Add new, ternary, param based returns by @TomasVotruba in #13014
- [PHP 7.0] Make use of array destruct by @TomasVotruba in #13022
- [PHP 5.6] Make use of up to PHP 5.6 features by @TomasVotruba in #13017
- [PHP 7.0] Make use of coalsece by @TomasVotruba in #13023
- [PHP 8.0] Remove unused catch variable by @TomasVotruba in #13015
- [PHP 8.0] Add property promotion to plugins by @TomasVotruba in #13027
- [type-declarations] Re-apply rector type rules to Form, Email, Core and Campaign bundles + bump Rector/PHPStan version by @TomasVotruba in #13025
- [type-declarations] Re-run rector rules on plugins, Report, Sms, User, Lead, Dynamic, Config bundles by @TomasVotruba in #13028
- [PHP 7.3] Make use of array key last/first by @TomasVotruba in #13030
- [PHP 7.4] Add arrow functions and coalessce assign by @TomasVotruba in #13031
- [PHP 7.0] Make use of up to PHP 7.0 features by @TomasVotruba in #13033
- [type-declaration] Re-run current sets for whole project on PHP 8 by @TomasVotruba in #13032
- [PHP 8.0] Make use of PHP 8.0 features by @TomasVotruba in #13035
- [tests] Add known void return type declarations by @TomasVotruba in #13040
- [tests] Add known setup based property types by @TomasVotruba in #13041
- getSubscribedEvents() always returns an array. Adding the return type… by @escopecz in #13039
- [pre-phpunit-10] Make data providers static by @TomasVotruba in #13049
- [phpstan] Rebuild phpstan baseline by @TomasVotruba in #13053
- [tests] Add features up to PHP 8 by @TomasVotruba in #13042
- [type-declarations] Add scalar and strict type-based returns by @TomasVotruba in #13056
- [phpstan] Remove null param/return tag that was hidding missing param/return tags by @TomasVotruba in #13057
- [cs] cleanup unused iheritdoc docblocks by @TomasVotruba in #13051
- [cs] newlines for promoted properties to make them easier to read by @TomasVotruba in #13062
- [phpstan] Few fixes from AbstractStandardFormController by @TomasVotruba in #13059
- [type-declarations] Add property type from assigns by @TomasVotruba in #13063
🐛 Bugs
- fix: dynamic content timeline entry by @davidgorges in #12902
- Fix incorrect logic when tokenising email headers by @mollux in #12912
- Remove HTTP response info from unsubscibe page by @patrykgruszka in #12879
- Ensure an empty mail subject doesn't throw an error by @mollux in #12908
- Keep correct migration name by @kuzmany in #12886
- Allow multiple lookup fields for same type in same form by @dadarya0 in #12875
- Fix missing required constraint on (not) in filters by @mollux in #12852
- Adding VIEW_INJECT_CUSTOM_TEMPLATE back even in the Twig world by @escopecz in #12924
- [dead-code] Remove unused var annotations by @TomasVotruba in #12938
- [dead-code] Remove unnecesary array check by @TomasVotruba in #12939
- [dead-code] Remove redundant class and constructor comments by @TomasVotruba in #12940
- The $siteUrl is null on installation. substr() requires string. It fails on PHP 8.1 by @escopecz in #12936
- Remove duplicate button from interface by @andersonjeccel in #12937
- Issue #12941. Move .ck-body-wrapper from css to less. by @pasxel in #12942
- [ci] run Rector only once, with --dry-run to fail in case of change by @TomasVotruba in #13024
- [ci] make use of composer validate and make composer.lock testing simple by @TomasVotruba in #13029
- [rector] Kick of ligther config splits by @TomasVotruba in #13048
- Fixing API error caused by the strict type mismatch by @escopecz in #13061
- Removing obvious comments by @escopecz in #13037
- Deprecating unused classes by @escopecz in #13066
- "Don't overwrite value if already exists" option is not working In Import Contacts. by @rohitpavaskar in #13008
- Mitigate missing country flags when a contact is rendered by @mollux in #12911
- Fix point tags triggering by @kuzmany in #12867
- Fix locked category by @npracht in #11854
New Contributors
- @davidgorges made their first contribution in #12902
- @andersonjeccel made their first contribution in #12937
- @pasxel made their first contribution in #12942
Full Changelog: 5.0.0-rc1...5.0.0-rc2
SHA1(5.0.0-rc2.zip)= 597cfd4cc97f0685463e74805e03157aa43c05e7
SHA1(5.0.0-rc2-update.zip)= 7952b7b6576b3943d3177733b14c4f3ba5703428