users icon indicating copy to clipboard operation
users copied to clipboard

Since 3.3.0: loadIdentifier() usage is deprecated. Directly pass `'identifier'` config to the Authenticator.

Open LordSimal opened this issue 6 months ago • 5 comments

With the latest updates installed I get the following deprecation warning:

Since 3.3.0: loadIdentifier() usage is deprecated. Directly pass `'identifier'` config to the Authenticator.
/Users/kevin/Documents/sunlime/alfred/vendor/cakedc/users/src/Loader/AuthenticationServiceLoader.php, line: 58

CakePHP 5.2.5

+-------------------------+-----------+------------+----------+----------+---------+
| Plugin                  | Is Loaded | Only Debug | Only CLI | Optional | Version |
+-------------------------+-----------+------------+----------+----------+---------+
| Authentication          |           |            |          |          | 3.3.1   |
| Authorization           |           |            |          |          | 3.4.1   |
| CakeDC/Auth             |           |            |          |          | 10.1.3  |
| CakeDC/Users            | X         |            |          |          | 15.1.0  |
+-------------------------+-----------+------------+----------+----------+---------+

LordSimal avatar Jul 28 '25 08:07 LordSimal

I guess this has been fixed by https://github.com/cakephp/authentication/pull/734

LordSimal avatar Jul 31 '25 06:07 LordSimal

Actually it wasn't fixed.

LordSimal avatar Aug 03 '25 14:08 LordSimal

I'm not sure if we can remove that call now.

To avoid issue with existing applications the solution is to manually update confgs in the app to remove config key 'Auth.Identifiers' and update 'Auth.Authenticators' with new keys.

Configure::write('Auth.Identifiers', []);

rochamarcelo avatar Aug 03 '25 19:08 rochamarcelo

Well the default config can be adjusted to contain the new array structure. Then all "default" installs won't have that problem anymore.

For anyone who adjusted their config to have adjusted authenticator and identifiert config, they need to adjust it accordingly (which can be mentioned in the next release of this plugin imho)

LordSimal avatar Aug 03 '25 19:08 LordSimal

This change will be selected for the next major release, as existing users would experience a breaking change in their working configurations. The Authenticators and Identifiers array will be merged in configuration to match the new convention.

steinkel avatar Oct 19 '25 19:10 steinkel