4.8 KiB
Migration
- General
- From
v5.x.x
tov6.x.x
- From
v4.x.x
tov5.x.x
- From
v3.x.x
tov4.x.x
- From
v2.x.x
tov3.x.x
- From
v1.x.x
tov2.x.x
General
Update your version of this library via Composer [?]:
$ composer update delight-im/auth
From v5.x.x
to v6.x.x
-
The database schema has changed.
-
The MySQL database schema has changed. Use the statement below to update your database:
ALTER TABLE users ADD COLUMN roles_mask INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER verified, ADD COLUMN resettable TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 AFTER verified; ALTER TABLE users_confirmations ADD COLUMN user_id INT(10) UNSIGNED NULL DEFAULT NULL AFTER id; UPDATE users_confirmations SET user_id = ( SELECT id FROM users WHERE email = users_confirmations.email ) WHERE user_id IS NULL; ALTER TABLE users_confirmations CHANGE COLUMN user_id user_id INT(10) UNSIGNED NOT NULL;
-
The SQLite database schema has changed. Use the statement below to update your database:
ALTER TABLE users ADD COLUMN "roles_mask" INTEGER NOT NULL CHECK ("roles_mask" >= 0) DEFAULT "0", ADD COLUMN "resettable" INTEGER NOT NULL CHECK ("resettable" >= 0) DEFAULT "1"; ALTER TABLE users_confirmations ADD COLUMN "user_id" INTEGER CHECK ("user_id" >= 0); UPDATE users_confirmations SET user_id = ( SELECT id FROM users WHERE email = users_confirmations.email ) WHERE user_id IS NULL;
-
-
The two methods
forgotPassword
andresetPassword
may now throw an additional\Delight\Auth\ResetDisabledException
if the user has disabled password resets for their account. -
The
Base64
class is now an external module and has been moved from the namespaceDelight\Auth
to the namespaceDelight\Base64
. The interface and the return values are not compatible with those from previous versions anymore.
From v4.x.x
to v5.x.x
-
The MySQL database schema has changed. Use the statement below to update your database:
ALTER TABLE `users` ADD COLUMN `status` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0 AFTER `username`;
-
The two classes
Auth
andBase64
are nowfinal
, i.e. they can't be extended anymore, which has never been a good idea, anyway. If you still need to wrap your own methods around these classes, consider object composition instead of class inheritance.
From v3.x.x
to v4.x.x
- PHP 5.6.0 or higher is now required.
From v2.x.x
to v3.x.x
- The license has been changed from the Apache License 2.0 to the MIT License.
From v1.x.x
to v2.x.x
-
The MySQL schema has been changed from charset
utf8
to charsetutf8mb4
and from collationutf8_general_ci
to collationutf8mb4_unicode_ci
. Use the statements below to update the database schema:ALTER TABLE `users` CHANGE `email` `email` VARCHAR(249) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; ALTER TABLE `users_confirmations` CHANGE `email` `email` VARCHAR(249) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -- ALTER DATABASE `<DATABASE_NAME>` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; ALTER TABLE `users` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE `users_confirmations` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE `users_remembered` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE `users_resets` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE `users_throttling` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE `users` CHANGE `email` `email` VARCHAR(249) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; ALTER TABLE `users` CHANGE `username` `username` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL; ALTER TABLE `users_confirmations` CHANGE `email` `email` VARCHAR(249) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; ALTER TABLE `users_throttling` CHANGE `action_type` `action_type` ENUM('login','register','confirm_email') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; REPAIR TABLE users; OPTIMIZE TABLE users; REPAIR TABLE users_confirmations; OPTIMIZE TABLE users_confirmations; REPAIR TABLE users_remembered; OPTIMIZE TABLE users_remembered; REPAIR TABLE users_resets; OPTIMIZE TABLE users_resets; REPAIR TABLE users_throttling; OPTIMIZE TABLE users_throttling;