rappasoft / laravel-authentication-log

Log user authentication details and send new device notifications.
MIT License
783 stars 95 forks source link

Support for Laravel 10 #70

Closed publiux closed 1 year ago

publiux commented 1 year ago

To support both Laravel 9 and 10, change should be "^9.0|^10.0". See discussion #69

Ordinarily yes but the developer has chosen to use major version numbers for different Laravel version. This change was proposed in anticipation of the author creating a v3.0.0 release for L10.

vincentauger commented 1 year ago

Thank you for the clarification, much appreciated. It makes sense to keep easier and clear compatibility with major Laravel releases.

lrljoe commented 1 year ago

Both 9+10 supported in other Rappasoft packages. Suggest you modify pull to match.

publiux commented 1 year ago

Both 9+10 supported in other Rappasoft packages. Suggest you modify pull to match.

I’ll leave that up to the developer.

CovertError commented 1 year ago

when do we expect this package to support laravel 10

colinmackinlay commented 1 year ago

Hello @publiux - you also need to modify https://github.com/rappasoft/laravel-authentication-log/blob/main/src/Models/AuthenticationLog.php since $dates (previously deprecated) is no longer allowed.

login_at and logout_at need to be cast to datetime and $dates needs to be removed:

    protected $casts = [
        'cleared_by_user' => 'boolean',
        'location' => 'array',
        'login_successful' => 'boolean',
        'login_at' => 'datetime',
        'logout_at' => 'datetime',
    ];

Other than that, your PR works for me and I am using my own fork in live Laravel 10 applications until it is merged and tagged for release.

lrljoe commented 1 year ago

I know @rappasoft is being kept busy with his various repos lately, I imagine this one will be sorted out in the near future tho!

lrljoe commented 1 year ago

And here he is, cheers @rappasoft !