v4.8.0
4.8.0
This new release adds the possibility for back-end packages to publish their own state to the front-end as well migrates the framework & packages to PHP 8.0. Where applicable, updated packages to take advantage of the new language features.
Front-end
Most of the packages received a dependency list cleanup.
bulma
- added enhanced progress indicator
- added
ProgressIndicatorcomponent export
charts
- fixed labels update on structure change
- added
displayfunction prop
enums
- renamed the internal
i18nattribute to_i18n, to avoid potention conflicts with enum keys
financials
- fixed supplier invoice index layout
localisation
- improved store module
products
- improved the product form to update slug dynamically
- improved product picture styling/layout in table & form
- added newly computed supplier discounted price to the form
progress-indicator
- implemented enhanced indicator; various progress indicator improvements
rating
- updated mobile bottom position
scroll-to-top
- updated mobile bottom position
strings
- fixed the slug helper
tables
- removed the already deprecated
moneysupport; templates should now usenumber- more details are found in the upgrade steps - added customizable total label via the template's
totalLabelproperty - fixed page toggling
ui
- improved store module to allow for automatic package store registration
- small refactor and various fixes
- added sentry spike protection
user-groups
- removed unneeded file
Back-end
- all packages have had the route
requiresyntax updated toreqire __DIR__./xxx.php - all packages that were using
moneyconfiguration for numeric formatting have been updated to use the already availablenumberconfiguration - all packages that were including data imports, have been updated so that importers respect the new methods' signatures
- all
get_class($instance)usages refactored to$instance::class - seeders and factories have been updated, and where it made sense, helper methods (such as
test()) were added which create a different factory state (such as for testing)
action-logger
- code cleanup
activity-log
- route refactor
api (new)
- new package that provides boileplate for implementing APIs
categories
- fixed stacked bar chart
charts
- added
containsnested scope
companies
- extracted user state to the users package
core
- extracted user state to the users package
currencies
- removed
FixesCurrencyApiexception - refactored to use the new
apipackage
data-export
- added
data_exports.nameindex upgrade
data-import
- improved error logging for local environments
- updated interfaces to pass the import model instead of params/user
- added avoids deletion conflicts and updated delete method
- added
notifiesboolean flag in json template andnotifiableIdsconfig option - added
paramsto optional attributes
files
- improved the file resource
helpers
- disabled algolia syncing when not in production
- fixed searchable
- added price computor
- added new custom cast for
Object
localisation
- added & updated various keys & translations
measurement-units
- added the name attribute to the rememberable keys config array
- added
MeasurementUnitsenum
products
- updated price computor use
- updated product visibility in the supplier resource
- added newly computed supplier discounted price
- added
generateSlughelper - added
part_numberindex onproduct_supplierpivot - updated
package_quantitytype to int
roles
- added config options for restricting user groups
- improved visible scope
sentry
- extracted sentry functionality from the Core package
services
- made measurement unit not nullable in the table
- improved upgrade
upgrade
- renamed
nullableColumn method toisNullable - added
isSigned,isUnsignedhelpers,getPrecisionandgetScalefor decimals
users (new)
- extracted user functionality from the Core package
- removed title from profile builder
- added state provider
- improved
changeGrouppolicy
user-groups (new)
- extracted user groups functionality from the Core package
- added config options for restricting user groups
- improved visible scope
tables
- added customizable total label
- removed the already deprecated
moneysupport; templates should now usenumber- more details are found in the upgrade steps
Upgrade steps
- run
composer updatein the project's root - run the upgrade commands (both regular and
before-migration) to ensure
database & strucure is up to date, since this release cleans up a lot of package upgrades - upgrade your machine to php8
- in
composer.jsonupdate the following dependencies to the given versions:"laravel-enso/core": "^7.0","sentry/sentry-laravel": "^2.0.0""laravel-enso/phpunit-pretty-print": "^1.0","nunomaduro/phpinsights": "^2.0",
- search & replace in your local project (including the database folder) the following namespaces:
Core\Models\UserGroup->UserGroups\Models\UserGroupCore\Enums\UserGroups->UserGroups\Enums\UserGroupsCore\\Enums\\UserGroups->UserGroups\\Enums\\UserGroupsCore\Models\User->Users\Models\UserCore\Policies\User->Users\Policies\UserCore\Models\Session->Users\Models\SessionCore\Http\Controllers\Administration\Users->Users\Http\ControllersCore\Http\Controllers\Administration\UserGroups->UserGroups\Http\ControllersCore\Tables\Administration\Users->Users\TabelsCore\Forms\Administration\Users->Users\FormsCore\Http\Resources\User->Users\Http\Resources\UserCore\\Http\\Resources\\User->Users\\Http\\Resources\\UserCore\Http\Requests\ValidateUserRequest->Users\Http\Requests\ValidateUserRequestCore\Database\Factories\UserFactory->Users\Database\Factories\UserFactoryCore\Database\Seeders\UserGroupSeeder->UserGroups\Database\Seeders\UserGroupSeederCore\Database\Seeders\UserSeeder->Users\Database\Seeders\UserSeeder
- remove from
config/insights.phpthe deprecated:
use ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff;
use ObjectCalisthenics\Sniffs\Metrics\MethodPerClassLimitSniff;
use ObjectCalisthenics\Sniffs\NamingConventions\ElementNameMinimalLengthSniff;
- run
composer updatein the project's root
- update any local person/people factories and seeders and remove the
titleattribute as it has been dropped - for your local imports, for the importer & validator classes, update the following method signatures (& logic where necessary):
- run:
public function run(Obj $row, DataImport $import); - after:
public function after(DataImport $import); - authorizes:
public function authorizes(DataImport $import): bool; - before:
public function before(DataImport $import);
- run:
- for your local table JSON templates, change any
moneykeys tonumber, and remove any "thousand" & "decimal" attributes. Number supportsprecision,symbolandtemplate(e.g. "%v %s" -%vfor value,%sfor symbol) - local
storage/app/.gitignoreshould be updated to ignore all and look like thisYou may also remove* !.gitignore.gitignorefiles from individual enso created, app sub-folders (exceptpublic) - check the local
config/enso/tables.phpfile and if theexport.pathkey is present, update it toexport.folder - local state:
- remove the local state binding from
App\Providers\AppServiceProvider:CoreLocalState::class => LocalState::class, - remove the
App\Services\LocalStateclass after moving any logic to one or more state builder services - from
client/src/js/enso.js, remove the import:import './localState'; - remove the file
client/src/js/localState.js - if you moved logic from the old
LocalStateclass, update the fileclient/src/js/store/local.jsas required, otherwise you may delete it. Note that theclient/src/js/storefolder MUST be present.
- remove the local state binding from
- compare
config/enso/config.phpwithvendor/laravel-enso/core/config/config.php
and remove any extra, deprecated keys - still in
config/enso/config.phpupdate the Enso version to 4.8.0 - compare
config/enso/addresses.phpwithvendor/laravel-enso/addresses/config/addresses.phpand remove any extra, deprecated keys - update the
passwordconfig/enso/auth.phpkey as follows:'password' => [ 'lifetime' => env('PASSWORD_LIFETIME', 0), 'minLength' => env('PASSWORD_MIN_LENGTH', 6), 'mixedCase' => (bool) env('PASSWORD_MIXED_CASE', 0), 'numeric' => (bool) env('PASSWORD_NUMERIC', 0), 'special' => (bool) env('PASSWORD_SPECIAL', 0), ], - from
Database\Seeders\DatabaseSeeder, from therun()method's unit tests running branch, you may delete the following seeders, as the respective factories have been updated to no longer require this:CountrySeeder::class, RegionSeeder::class, TownshipSeeder::class, LocalitySeeder::class, - update/rename the following
.envvariables:PASSWORD_LENGTH->PASSWORD_MIN_LENGTHPASSWORD_NUMERIC_CHARACTERS->PASSWORD_NUMERICPASSWORD_SPECIAL_CHARACTERS->PASSWORD_SPECIALPASSWORD_UPPER_CASE_CHARACTERS->PASSWORD_MIXED_CASE
- replace
LaravelEnso\Core\Exceptions\Sentryusage and import withLaravelEnso\Sentry\Exceptions\HandlerinApp\Exceptions\Handler.php - remove
bulma-rtlpatch fromclient\patches, as is no longer needed - run
yarn,yarn upgrade && yarnin/clientto ensure you have the latest versions and patches are applied. If necessary, update your patches php artisan migratephp artisan enso:upgrade- as per every release, delete any local, deprecated upgrades
- it recommended to also run the all the enso tests to make everything is working properly; therefore, compare your local
phpunit.xmlwith Enso's and make sure that you're not missing any package tests.