Skip to content

allow to use league/oauth2-google without leafs/leaf#46

Open
fadrian06 wants to merge 10 commits into
leafsphp:v4.xfrom
fadrian06:google-client-without-app
Open

allow to use league/oauth2-google without leafs/leaf#46
fadrian06 wants to merge 10 commits into
leafsphp:v4.xfrom
fadrian06:google-client-without-app

Conversation

@fadrian06

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce? (pls check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe below

Description

Previously you have to install both league/oauth2-google and leafs/leaf to call ->withGoogle() within __construct().

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Copilot AI review requested due to automatic review settings April 2, 2026 13:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the hard dependency on Leaf’s _env() helper for Google OAuth auto-configuration so league/oauth2-google can be used without requiring leafs/leaf.

Changes:

  • Replace direct _env() usage in Google OAuth auto-setup with an internal env() helper.
  • Add Auth::env() to read environment variables with Leaf _env() as a preferred source.
  • Bump league/oauth2-google dev dependency from ^4.0 to ^5.0.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/Auth.php Introduces env() helper and updates Google OAuth auto-setup/default redirect URI logic to use it.
composer.json Updates league/oauth2-google version in require-dev.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Auth.php Outdated
Comment thread src/Auth.php Outdated
Comment thread src/Auth.php Outdated
Comment thread src/Auth.php Outdated
@fadrian06 fadrian06 force-pushed the google-client-without-app branch from 2581405 to 8edb09c Compare June 21, 2026 04:11
@fadrian06

Copy link
Copy Markdown
Contributor Author

@mychidarko please review this old PR, please

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.

Comment thread src/Auth.php
Comment thread tests/google.test.php Outdated
Comment thread tests/google.test.php Outdated
Comment thread tests/google.test.php Outdated
Comment thread tests/google.test.php Outdated
Comment thread tests/google.test.php Outdated
fadrian06 and others added 2 commits June 21, 2026 11:14
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@fadrian06 fadrian06 force-pushed the google-client-without-app branch from b403c43 to f7a8588 Compare June 21, 2026 15:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Comment thread phpstan.dist.neon
Comment thread tests/google.test.php
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.

2 participants