|
1 | 1 | # Laravel Enso's Changelog |
2 | 2 |
|
| 3 | +## 4.8.0 |
| 4 | + |
| 5 | +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. |
| 6 | + |
| 7 | +### Front-end |
| 8 | + |
| 9 | +Most of the packages received a dependency list cleanup. |
| 10 | + |
| 11 | +#### bulma |
| 12 | +- added enhanced progress indicator |
| 13 | +- added `ProgressIndicator` component export |
| 14 | + |
| 15 | +#### charts |
| 16 | +- fixed labels update on structure change |
| 17 | +- added `display` function prop |
| 18 | + |
| 19 | +#### enums |
| 20 | +- renamed the internal `i18n` attribute to `_i18n`, to avoid potention conflicts with enum keys |
| 21 | + |
| 22 | +#### financials |
| 23 | +- fixed supplier invoice index layout |
| 24 | + |
| 25 | +#### localisation |
| 26 | +- improved store module |
| 27 | + |
| 28 | +#### products |
| 29 | +- improved the product form to update slug dynamically |
| 30 | +- improved product picture styling/layout in table & form |
| 31 | +- added newly computed supplier discounted price to the form |
| 32 | + |
| 33 | +#### progress-indicator |
| 34 | +- implemented enhanced indicator; various progress indicator improvements |
| 35 | + |
| 36 | +#### rating |
| 37 | +- updated mobile bottom position |
| 38 | + |
| 39 | +#### scroll-to-top |
| 40 | +- updated mobile bottom position |
| 41 | + |
| 42 | +#### strings |
| 43 | +- fixed the slug helper |
| 44 | + |
| 45 | +#### tables |
| 46 | +- removed the already deprecated `money` support; templates should now use `number ` - more details are found in the upgrade steps |
| 47 | +- added customizable total label via the template's `totalLabel` property |
| 48 | +- fixed page toggling |
| 49 | + |
| 50 | +#### ui |
| 51 | +- improved store module to allow for automatic package store registration |
| 52 | +- small refactor and various fixes |
| 53 | +- added sentry spike protection |
| 54 | + |
| 55 | +#### user-groups |
| 56 | +- removed unneeded file |
| 57 | + |
| 58 | +### Back-end |
| 59 | + |
| 60 | +- all packages have had the route `require` syntax updated to `reqire __DIR__./xxx.php` |
| 61 | +- all packages that were using `money` configuration for numeric formatting have been updated to use the already available `number` configuration |
| 62 | +- all packages that were including data imports, have been updated so that importers respect the new methods' signatures |
| 63 | +- all `get_class($instance)` usages refactored to `$instance::class` |
| 64 | +- 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) |
| 65 | + |
| 66 | +#### action-logger |
| 67 | +- code cleanup |
| 68 | + |
| 69 | +#### activity-log |
| 70 | +- route refactor |
| 71 | + |
| 72 | +#### api (new) |
| 73 | +- new package that provides boileplate for implementing APIs |
| 74 | + |
| 75 | +#### categories |
| 76 | +- fixed stacked bar chart |
| 77 | + |
| 78 | +#### charts |
| 79 | +- added `contains` nested scope |
| 80 | + |
| 81 | +#### companies |
| 82 | +- extracted user state to the users package |
| 83 | + |
| 84 | +#### core |
| 85 | +- extracted user state to the users package |
| 86 | + |
| 87 | +#### currencies |
| 88 | +- removed `FixesCurrencyApi` exception |
| 89 | +- refactored to use the new `api` package |
| 90 | + |
| 91 | +#### data-export |
| 92 | +- added `data_exports.name` index upgrade |
| 93 | + |
| 94 | +#### data-import |
| 95 | +- improved error logging for local environments |
| 96 | +- updated interfaces to pass the import model instead of params/user |
| 97 | +- added avoids deletion conflicts and updated delete method |
| 98 | +- added `notifies` boolean flag in json template and `notifiableIds` config option |
| 99 | +- added `params` to optional attributes |
| 100 | + |
| 101 | +#### files |
| 102 | +- improved the file resource |
| 103 | + |
| 104 | +#### helpers |
| 105 | +- disabled algolia syncing when not in production |
| 106 | +- fixed searchable |
| 107 | +- added price computor |
| 108 | +- added new custom cast for `Object` |
| 109 | + |
| 110 | +#### localisation |
| 111 | +- added & updated various keys & translations |
| 112 | + |
| 113 | +#### measurement-units |
| 114 | +- added the name attribute to the rememberable keys config array |
| 115 | +- added `MeasurementUnits` enum |
| 116 | + |
| 117 | +#### products |
| 118 | +- updated price computor use |
| 119 | +- updated product visibility in the supplier resource |
| 120 | +- added newly computed supplier discounted price |
| 121 | +- added `generateSlug` helper |
| 122 | +- added `part_number` index on `product_supplier` pivot |
| 123 | +- updated `package_quantity` type to int |
| 124 | + |
| 125 | +#### roles |
| 126 | +- added config options for restricting user groups |
| 127 | +- improved visible scope |
| 128 | + |
| 129 | +#### sentry |
| 130 | +- extracted sentry functionality from the Core package |
| 131 | + |
| 132 | +#### services |
| 133 | +- made measurement unit not nullable in the table |
| 134 | +- improved upgrade |
| 135 | + |
| 136 | +#### upgrade |
| 137 | +- renamed `nullable` Column method to `isNullable` |
| 138 | +- added `isSigned`, `isUnsigned` helpers, `getPrecision` and `getScale` for decimals |
| 139 | + |
| 140 | +#### users (new) |
| 141 | +- extracted user functionality from the Core package |
| 142 | +- removed title from profile builder |
| 143 | +- added state provider |
| 144 | +- improved `changeGroup` policy |
| 145 | + |
| 146 | +#### user-groups (new) |
| 147 | +- extracted user groups functionality from the Core package |
| 148 | +- added config options for restricting user groups |
| 149 | +- improved visible scope |
| 150 | + |
| 151 | +#### tables |
| 152 | +- added customizable total label |
| 153 | +- removed the already deprecated `money` support; templates should now use `number ` - more details are found in the upgrade steps |
| 154 | + |
| 155 | +### Upgrade steps |
| 156 | +* run `composer update` in the project's root |
| 157 | +* run the upgrade commands (both regular and `before-migration`) to ensure |
| 158 | + database & strucure is up to date, since this release cleans up a lot of package upgrades |
| 159 | +* upgrade your machine to php8 |
| 160 | +* in `composer.json` update the following dependencies to the given versions: |
| 161 | + - `"laravel-enso/core": "^7.0",` |
| 162 | + - `"sentry/sentry-laravel": "^2.0.0"` |
| 163 | + - `"laravel-enso/phpunit-pretty-print": "^1.0",` |
| 164 | + - `"nunomaduro/phpinsights": "^2.0",` |
| 165 | +* search & replace in your local project (including the database folder) the following namespaces: |
| 166 | + - `Core\Models\UserGroup` -> `UserGroups\Models\UserGroup` |
| 167 | + - `Core\Enums\UserGroups` -> `UserGroups\Enums\UserGroups` |
| 168 | + - `Core\\Enums\\UserGroups` -> `UserGroups\\Enums\\UserGroups` |
| 169 | + - `Core\Models\User` -> `Users\Models\User` |
| 170 | + - `Core\Policies\User` -> `Users\Policies\User` |
| 171 | + - `Core\Models\Session` -> `Users\Models\Session` |
| 172 | + - `Core\Http\Controllers\Administration\Users` -> `Users\Http\Controllers` |
| 173 | + - `Core\Http\Controllers\Administration\UserGroups` -> `UserGroups\Http\Controllers` |
| 174 | + - `Core\Tables\Administration\Users` -> `Users\Tabels` |
| 175 | + - `Core\Forms\Administration\Users` -> `Users\Forms` |
| 176 | + - `Core\Http\Resources\User` -> `Users\Http\Resources\User` |
| 177 | + - `Core\\Http\\Resources\\User` -> `Users\\Http\\Resources\\User` |
| 178 | + - `Core\Http\Requests\ValidateUserRequest` -> `Users\Http\Requests\ValidateUserRequest` |
| 179 | + - `Core\Database\Factories\UserFactory` -> `Users\Database\Factories\UserFactory` |
| 180 | + - `Core\Database\Seeders\UserGroupSeeder` -> `UserGroups\Database\Seeders\UserGroupSeeder` |
| 181 | + - `Core\Database\Seeders\UserSeeder` -> `Users\Database\Seeders\UserSeeder` |
| 182 | +- remove from `config/insights.php` the deprecated: |
| 183 | +``` |
| 184 | +use ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff; |
| 185 | +use ObjectCalisthenics\Sniffs\Metrics\MethodPerClassLimitSniff; |
| 186 | +use ObjectCalisthenics\Sniffs\NamingConventions\ElementNameMinimalLengthSniff; |
| 187 | +``` |
| 188 | +* run `composer update` in the project's root |
| 189 | +- update any local person/people factories and seeders and remove the `title` attribute as it has been dropped |
| 190 | +- for your local imports, for the importer & validator classes, update the following method signatures (& logic where necessary): |
| 191 | + - run: `public function run(Obj $row, DataImport $import);` |
| 192 | + - after: `public function after(DataImport $import);` |
| 193 | + - authorizes: `public function authorizes(DataImport $import): bool;` |
| 194 | + - before: `public function before(DataImport $import);` |
| 195 | +* for your local table JSON templates, change any `money` keys to `number`, and remove any "thousand" & "decimal" attributes. Number supports `precision`, `symbol` and `template` (e.g. "%v %s" - `%v` for value, `%s` for symbol) |
| 196 | +* local `storage/app/.gitignore` should be updated to ignore all and look like this |
| 197 | + ``` |
| 198 | + * |
| 199 | + !.gitignore |
| 200 | + ``` |
| 201 | + You may also remove `.gitignore` files from individual enso created, app sub-folders (except `public`) |
| 202 | +* check the local `config/enso/tables.php` file and if the `export.path` key is present, update it to `export.folder` |
| 203 | +* local state: |
| 204 | + - remove the local state binding from `App\Providers\AppServiceProvider`: `CoreLocalState::class => LocalState::class,` |
| 205 | + - remove the `App\Services\LocalState` class after moving any logic to one or more state builder services |
| 206 | + - from `client/src/js/enso.js`, remove the import: `import './localState';` |
| 207 | + - remove the file `client/src/js/localState.js` |
| 208 | + - if you moved logic from the old `LocalState` class, update the file `client/src/js/store/local.js` as required, otherwise you may delete it. Note that the `client/src/js/store` folder MUST be present. |
| 209 | +* compare `config/enso/config.php` with `vendor/laravel-enso/core/config/config.php` |
| 210 | + and remove any extra, deprecated keys |
| 211 | +* still in `config/enso/config.php` update the Enso version to 4.8.0 |
| 212 | +* compare `config/enso/addresses.php` with `vendor/laravel-enso/addresses/config/addresses.php` and remove any extra, deprecated keys |
| 213 | +* update the `password` `config/enso/auth.php` key as follows: |
| 214 | + ``` |
| 215 | + 'password' => [ |
| 216 | + 'lifetime' => env('PASSWORD_LIFETIME', 0), |
| 217 | + 'minLength' => env('PASSWORD_MIN_LENGTH', 6), |
| 218 | + 'mixedCase' => (bool) env('PASSWORD_MIXED_CASE', 0), |
| 219 | + 'numeric' => (bool) env('PASSWORD_NUMERIC', 0), |
| 220 | + 'special' => (bool) env('PASSWORD_SPECIAL', 0), |
| 221 | + ], |
| 222 | + ``` |
| 223 | +* from `Database\Seeders\DatabaseSeeder`, from the `run()` method's unit tests running branch, you may delete the following seeders, as the respective factories have been updated to no longer require this: |
| 224 | + ``` |
| 225 | + CountrySeeder::class, |
| 226 | + RegionSeeder::class, |
| 227 | + TownshipSeeder::class, |
| 228 | + LocalitySeeder::class, |
| 229 | + ``` |
| 230 | +* update/rename the following `.env` variables: |
| 231 | + - `PASSWORD_LENGTH` -> `PASSWORD_MIN_LENGTH` |
| 232 | + - `PASSWORD_NUMERIC_CHARACTERS` -> `PASSWORD_NUMERIC` |
| 233 | + - `PASSWORD_SPECIAL_CHARACTERS` -> `PASSWORD_SPECIAL` |
| 234 | + - `PASSWORD_UPPER_CASE_CHARACTERS` -> `PASSWORD_MIXED_CASE` |
| 235 | +* replace `LaravelEnso\Core\Exceptions\Sentry` usage and import with `LaravelEnso\Sentry\Exceptions\Handler` in `App\Exceptions\Handler.php` |
| 236 | +* remove `bulma-rtl` patch from `client\patches`, as is no longer needed |
| 237 | +* run `yarn`, `yarn upgrade && yarn` in `/client` to ensure you have the latest versions and patches are applied. If necessary, update your patches |
| 238 | +* `php artisan migrate` |
| 239 | +* `php artisan enso:upgrade` |
| 240 | +* as per every release, delete any local, deprecated upgrades |
| 241 | +* it recommended to also run the all the enso tests to make everything is working properly; therefore, compare your local `phpunit.xml` with Enso's and make sure that you're not missing any package tests. |
| 242 | +
|
3 | 243 | ## 4.7.1 |
4 | 244 |
|
5 | 245 | This is a patch release whose main purpose is to update localisation files. |
|
0 commit comments