You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+22-19Lines changed: 22 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
## Unreleased
4
4
5
+
- Added `CraftCms\Cms\User\Contracts\CraftUser` and `CraftUserTrait`. ([#19009](https://github.com/craftcms/cms/pull/19009))
6
+
- Removed `CraftCms\Cms\Auth\UserProvider`; the Craft guard now defaults to Laravel’s Eloquent provider using `CraftCms\Cms\User\Models\User`. ([#19009](https://github.com/craftcms/cms/pull/19009))
7
+
- Added `Auth::craftUser()`/`auth('craft')->craftUser()` and `request()->craftUser()` as Craft-safe ways to access the authenticated user. ([#19009](https://github.com/craftcms/cms/pull/19009))
5
8
-`Element::getIterator()` no longer includes custom field values. ([#19004](https://github.com/craftcms/cms/issues/19004))
6
9
- Fixed a bug where checking the elevated session timeout could overwrite newer session data, which could prevent passkeys from being created.
7
10
- Fixed a bug where legacy plugin-defined `actions.php` routes could collide between plugins. ([#18994](https://github.com/craftcms/cms/pull/18994))
@@ -95,7 +98,7 @@
95
98
- Fixed a PHP error that occurred when saving a Structure section with a Max Levels value. ([#18809](https://github.com/craftcms/cms/issues/18809))
96
99
- Fixed a bug where plugin settings pages were missing registered scripts and styles. ([#18815](https://github.com/craftcms/cms/pull/18815))
97
100
- Fixed a PHP error that occurred when saving an entry type. ([#18816](https://github.com/craftcms/cms/pull/18816))
98
-
- Fixed an issue with Typecast where typed setters wouldn't have precedence over private properties.
101
+
- Fixed an issue with Typecast where typed setters wouldn’t have precedence over private properties.
99
102
- Fixed a bug where Control Panel templates failed to load on Windows due to mismatched directory separators or drive-letter casing in `CraftCms\Cms\View\TwigEngine`. ([#18804](https://github.com/craftcms/cms/issues/18804))
100
103
- Fixed a bug where Craft’s Vite hot file configuration could override the host application’s Vite hot file. ([#18810](https://github.com/craftcms/cms/issues/18810))
101
104
- Fixed a bug where `CraftCms\Cms\Support\Typecast` could give private properties precedence over typed setters.
@@ -124,9 +127,9 @@
124
127
- Fixed a bug where a `yii\base\InvalidConfigException` would be thrown when a Yii2-based plugin registered an asset bundle. ([#18818](https://github.com/craftcms/cms/issues/18818))
125
128
- Fixed a bug where using `{{ successMessageInput() }}` would not decrypt the resulting message for the flash message.
126
129
- Fixed a bug where a missing widget from an uninstalled plugin would throw instead of mapping to a MissingWidget.
127
-
- Fixed a bug where an address' ownership ids could be overridden unintentionally.
130
+
- Fixed a bug where an address’ ownership ids could be overridden unintentionally.
128
131
- Fixed a bug where `getHasSsoIdentity()` would return `false` when Socialite was not installed but the user had an SSO identity.
129
-
- Fixed a bug where the site's offline status was not being enforced on matched element routes.
132
+
- Fixed a bug where the site’s offline status was not being enforced on matched element routes.
130
133
- Fixed a user photo validation issue with file extensions.
131
134
- Fixed a bug where legacy controllers could return `null` but were not considered handled.
132
135
- Improved performance of the dashboard by reducing the amount of queries for widgets
@@ -281,7 +284,7 @@
281
284
282
285
#### Mutex
283
286
284
-
Craft's Mutex classes have been deprecated. [Laravel's atomic locking](https://laravel.com/docs/12.x/cache#atomic-locks) should be used instead.
287
+
Craft’s Mutex classes have been deprecated. [Laravel’s atomic locking](https://laravel.com/docs/12.x/cache#atomic-locks) should be used instead.
285
288
286
289
- Deprecated `craft\mutex\Mutex`
287
290
- Deprecated `craft\mutex\MutexTrait`
@@ -371,7 +374,7 @@ Craft's Mutex classes have been deprecated. [Laravel's atomic locking](https://l
371
374
372
375
### Auth
373
376
374
-
- Refactored the authentication system to use Laravel's authentication system.
377
+
- Refactored the authentication system to use Laravel’s authentication system.
- Deprecated `craft\services\Auth`. `CraftCms\Cms\Auth\Auth` should be used instead.
@@ -386,7 +389,7 @@ Craft's Mutex classes have been deprecated. [Laravel's atomic locking](https://l
386
389
- Deprecated `craft\behaviors\SessionBehavior::checkAuthorization`. `CraftCms\Cms\Auth\SessionAuth::checkAuthorization` should be used instead.
387
390
- Deprecated `craft\services\Users::isVerificationCodeValidForUser()`. `Password::broker('craft')->tokenExists($user, $code)` should be used instead.
388
391
- Deprecated the `elevatedSessionDuration` general config setting. The `auth.password_timeout` config value should be used instead. To disable password confirmation (elevated sessions), you now set this value to `-1` instead of `0`.
389
-
- Elevated sessions now work through [Laravel's password confirmation](https://laravel.com/docs/12.x/authentication#password-confirmation) system.
392
+
- Elevated sessions now work through [Laravel’s password confirmation](https://laravel.com/docs/12.x/authentication#password-confirmation) system.
390
393
- Removed `craft\controllers\AuthController`. The following controllers now implement this functionality:
Craft 6 introduces a new validation system that uses Laravel's Validator instead of Yii2's model validation.
598
+
Craft 6 introduces a new validation system that uses Laravel’s Validator instead of Yii2’s model validation.
596
599
597
600
##### Added
598
601
599
602
- Added `CraftCms\Cms\Validation\Contracts\Validatable` interface for classes that support Laravel-style validation.
600
603
- Added `CraftCms\Cms\Validation\Contracts\ValidatableWithRuleset` interface for classes that use a `Ruleset` class to define validation rules.
601
604
- Added `CraftCms\Cms\Validation\Ruleset` abstract class for defining validation rules, messages, and preparation logic.
602
-
- Added `CraftCms\Cms\Validation\Attributes\Ruleset` PHP attribute for specifying a component's ruleset class.
605
+
- Added `CraftCms\Cms\Validation\Attributes\Ruleset` PHP attribute for specifying a component’s ruleset class.
603
606
- Added `CraftCms\Cms\Validation\Concerns\Validates` trait for simple validation support.
604
607
- Added `CraftCms\Cms\Validation\Concerns\ValidatesWithRuleset` trait for ruleset-based validation.
605
608
- Added `CraftCms\Cms\Validation\Concerns\HasScenarios` trait for scenario-based validation filtering.
@@ -622,7 +625,7 @@ Craft 6 introduces a new validation system that uses Laravel's Validator instead
622
625
623
626
##### Changed
624
627
625
-
-`FieldInterface::getElementValidationRules()` has been replaced by `FieldInterface::getElementRules()` which returns rules in Laravel's validation format.
628
+
-`FieldInterface::getElementValidationRules()` has been replaced by `FieldInterface::getElementRules()` which returns rules in Laravel’s validation format.
626
629
- Added `FieldInterface::prepareForElementValidation()` for preparing field values before validation.
627
630
- Validation rules are now defined as Laravel-style arrays (e.g., `['required', 'string', 'max:255']`).
628
631
@@ -685,7 +688,7 @@ Craft 6 introduces a new validation system that uses Laravel's Validator instead
685
688
686
689
### Component
687
690
688
-
- Added `CraftCms\Cms\Component\Component` base class, replacing Yii2's `BaseObject`/`Component` with config hydration, magic getters/setters, and `Arrayable` support.
691
+
- Added `CraftCms\Cms\Component\Component` base class, replacing Yii2’s `BaseObject`/`Component` with config hydration, magic getters/setters, and `Arrayable` support.
@@ -810,11 +813,11 @@ Craft 6 introduces a new validation system that uses Laravel's Validator instead
810
813
811
814
### HTTP
812
815
813
-
- Deprecated the `errorTemplatePrefix` general config setting. Configure [Laravel's custom error pages](https://laravel.com/docs/13.x/errors#custom-http-error-pages) instead.
816
+
- Deprecated the `errorTemplatePrefix` general config setting. Configure [Laravel’s custom error pages](https://laravel.com/docs/13.x/errors#custom-http-error-pages) instead.
814
817
- Deprecated `craft\filters\BasicHttpAuthLogin`. Use the `auth.basic` middleware instead. (see https://laravel.com/docs/12.x/authentication#http-basic-authentication)
815
818
- Deprecated `craft\filters\BasicHttpAuthStatic`. Use the `auth.basic` middleware instead. (see https://laravel.com/docs/12.x/authentication#http-basic-authentication)
816
819
- Deprecated `craft\filters\BasicHttpAuthTrait`. Use the `auth.basic` middleware instead. (see https://laravel.com/docs/12.x/authentication#http-basic-authentication)
817
-
- Deprecated `craft\filters\Cors`. Use Laravel's CORS settings instead. (see https://laravel.com/docs/12.x/routing#cors)
820
+
- Deprecated `craft\filters\Cors`. Use Laravel’s CORS settings instead. (see https://laravel.com/docs/12.x/routing#cors)
818
821
- Deprecated `craft\filters\Headers`. Use Laravel middleware instead. (see https://laravel.com/docs/middleware)
@@ -827,7 +830,7 @@ Craft 6 introduces a new validation system that uses Laravel's Validator instead
827
830
- Removed `craft\controllers\AppController::actionGetPluginLicenseInfo()` and `actionUpdatePluginLicense()`. `CraftCms\Cms\Http\Controllers\App\PluginsController` should be used instead.
828
831
- Removed `craft\controllers\AppController::actionBrokenImage()`. `CraftCms\Cms\Http\Middleware\ShowBrokenImage` should be used instead.
829
832
- Removed `craft\controllers\AppController::actionRenderElements()` and `actionRenderComponents()`. `CraftCms\Cms\Http\Controllers\App\RenderController` should be used instead.
830
-
- Removed `craft\controllers\NotFoundController`. Laravel's exception handling should be used instead.
833
+
- Removed `craft\controllers\NotFoundController`. Laravel’s exception handling should be used instead.
831
834
- Removed the header-setting logic in `yii2-adapter\legacy\web\Application`. The new `\CraftCms\Cms\Http\Middleware\SetHeaders` middleware handles this functionality.
832
835
- Removed the licensing issues screen logic in `yii2-adapter\legacy\web\Application`. The new `\CraftCms\Cms\Http\Middleware\EnforceLicenses` middleware handles this functionality.
833
836
- Removed `craft\controllers\AppController::actionTryEdition()` and `actionSwitchToLicensedEdition()` in favor of `CraftCms\Cms\Http\Controllers\EditionController`.
@@ -842,11 +845,11 @@ Craft 6 introduces a new validation system that uses Laravel's Validator instead
842
845
- Deprecated `craft\helpers\MailerHelper`. Laravel mail configuration and drivers should be used instead.
843
846
- Deprecated the `testToEmailAddress` general config setting. `Illuminate\Support\Facades\Mail::alwaysTo()` should be used instead.
844
847
- Deprecated `craft\mail\Mailer::$template`, `craft\mail\Mailer::$siteOverrides`, `craft\models\MailSettings::$template`, and `craft\models\MailSettings::$siteOverrides`. Laravel mailable views and environment-specific Laravel mailers should be used instead.
845
-
- Removed legacy `projectConfig.email` mail settings and mail transport adapter configuration in favor of Laravel's `mail` config and drivers.
848
+
- Removed legacy `projectConfig.email` mail settings and mail transport adapter configuration in favor of Laravel’s `mail` config and drivers.
846
849
847
850
### Migrations
848
851
849
-
Craft and Yii's migrations have been removed in favor of [Laravel migrations](https://laravel.com/docs/12.x/migrations).
852
+
Craft and Yii’s migrations have been removed in favor of [Laravel migrations](https://laravel.com/docs/12.x/migrations).
850
853
851
854
The `php craft fields:merge` and `php craft entry-types:merge` commands will now generate Laravel migrations.
852
855
@@ -914,8 +917,8 @@ The `php craft fields:merge` and `php craft entry-types:merge` commands will now
- Deprecated `Craft::$app->getSecurity()` in favor of Laravel's Hash and Crypt facades, or `CraftCms\Cms\Support\Facades\Security`.
918
-
- Deprecated the `blowfishHashCost` general config setting in favor of Laravel's `hashing.bcrypt.rounds` config or the `BCRYPT_ROUNDS` environment variable.
920
+
- Deprecated `Craft::$app->getSecurity()` in favor of Laravel’s Hash and Crypt facades, or `CraftCms\Cms\Support\Facades\Security`.
921
+
- Deprecated the `blowfishHashCost` general config setting in favor of Laravel’s `hashing.bcrypt.rounds` config or the `BCRYPT_ROUNDS` environment variable.
919
922
920
923
### Updates
921
924
@@ -1001,7 +1004,7 @@ Moved the following controllers:
1001
1004
### Routes
1002
1005
1003
1006
- Deprecated `craft\services\Routes`. `CraftCms\Cms\Route\Routes` should be used instead.
1004
-
- Using routes in `config/routes.php` is no longer supported. Register routes using [Laravel's routing](https://laravel.com/docs/12.x/routing) instead.
1007
+
- Using routes in `config/routes.php` is no longer supported. Register routes using [Laravel’s routing](https://laravel.com/docs/12.x/routing) instead.
0 commit comments