New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changes to laravel 10 #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it is better to work on a new major version to incorporate some of the suggestions.
Would requiring PHP 8.1 be an issue for you?
I can take a look at this later today. I am thinking on already making it Laravel 11 ready.
The only change I am not willing to incorporate is adding the is_admin
column, unless it is needed in the package's code
@@ -4,7 +4,7 @@ | |||
use Illuminate\Database\Schema\Blueprint; | |||
use Illuminate\Support\Facades\Schema; | |||
|
|||
class CreateRolesTable extends Migration | |||
return new class extends Migration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't make this change and keep composer.json
allowing Laravel versions before 8, as support for anonymous migrations was introduced in Laravel 8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing previous Laravel versions would require a new major version
@@ -19,6 +19,8 @@ public function up() | |||
|
|||
$table->unsignedSmallInteger('sort_index')->nullable(); | |||
|
|||
$table->boolean('is_admin')->default(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where in the code is this new column used?
If adding this is required in a project level, one can publish the migrations and customize it for their needs
@@ -23,7 +23,7 @@ public function up() | |||
$userForeignKey = $userModel->getForeignKey(); | |||
|
|||
$table->unsignedInteger('role_id'); | |||
$table->unsignedInteger($userForeignKey); | |||
$table->unsignedBigInteger($userForeignKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could consider moving all ids and foreign ids to use unsignedBigInteger
, or use the more modern schema helpers
PHP version 8.1 is not a problem, even 8.2 which will be a prerequisite for Laravel 11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Released version 1.0 with Laravel 9, 10 and 11 support, and PHP 8.1 requirement
Please note that the namespace of the Also, the default model shipped with the configuration was changed to Thanks for the heads-up @juhniorsantos, let me known if you find any issues |
No description provided.