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

fix(partners): Fix Laravel 11 Compatibility- Implement getAuthPasswordName() Method in OAuthUser Model #35

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

salzebari
Copy link
Contributor

Overview

This PR addresses compatibility issues with Laravel 11 for the oauth2-merchant package by implementing the getAuthPasswordName() method in the OAuthUser model.

Problem

In Laravel 11, the Authenticatable contract introduces a new method getAuthPasswordName(). Models implementing this contract must provide an implementation of this method.

Solution

We've added an implementation of getAuthPasswordName() to the OAuthUser model that throws a BadMethodCallException when invoked, since OAuth users do not have a traditional password:

public function getAuthPasswordName()
{
    throw new \BadMethodCallException('Not available for OAuth users');
}

Changes

  • Implemented getAuthPasswordName() method in OAuthUser model
  • Added test coverage for the new method implementation

Reference

This change is based on the Laravel framework update: Laravel Framework PR #48665

@SallaDev SallaDev marked this pull request as draft December 17, 2024 15:23
Copy link

@Attia-Ahmed Attia-Ahmed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@EngRashaAmer EngRashaAmer marked this pull request as ready for review December 17, 2024 15:55
@EngRashaAmer EngRashaAmer changed the title fix(partners): Fix Laravel 11 Compatibility: Implement getAuthPasswordName() Method in OAuthUser Model fix(partners): Fix Laravel 11 Compatibility- Implement getAuthPasswordName() Method in OAuthUser Model Dec 17, 2024
@EngRashaAmer
Copy link

/merge

@SallaDev SallaDev merged commit bd6dce0 into master Dec 17, 2024
12 of 13 checks passed
@SallaDev
Copy link

#35 is been merged ✅


Merge by: @EngRashaAmer

@SallaDev SallaDev deleted the bugfix/DPD-6078-fix-error-in-laravel-11 branch December 17, 2024 15:57
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.

4 participants