Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

juhniorsantos
Copy link
Contributor

No description provided.

Copy link
Owner

@rodrigopedra rodrigopedra left a 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
Copy link
Owner

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

see: laravel/framework#36906

Copy link
Owner

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);
Copy link
Owner

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);
Copy link
Owner

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

@juhniorsantos
Copy link
Contributor Author

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

PHP version 8.1 is not a problem, even 8.2 which will be a prerequisite for Laravel 11.

Copy link
Owner

@rodrigopedra rodrigopedra left a 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

@rodrigopedra
Copy link
Owner

Please note that the namespace of the HasACL was changed to RodrigoPedra\LaravelSimpleACL\Concerns\HasACL

Also, the default model shipped with the configuration was changed to App\Models\User, inline with modern Laravel releases

Thanks for the heads-up @juhniorsantos, let me known if you find any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants