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

[league/oauth2-server-bundle] Add v0.11 recipe #1397

Merged
merged 2 commits into from
Apr 7, 2025

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Apr 6, 2025

Q A
License MIT
Doc issue/PR -
  • Simplify post-install instructions about the key/pair generation which is now handled by a built-in console command
  • Update the routes file path as the bundle upgraded its directory structure to the recommended, modern one.

/cc @ajgarlag

Copy link

github-actions bot commented Apr 6, 2025

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1397/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1397/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'league/oauth2-server-bundle:^0.11'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

league/oauth2-server-bundle

0.4 vs 0.11
diff --git a/league/oauth2-server-bundle/0.4/config/routes/league_oauth2_server.yaml b/league/oauth2-server-bundle/0.11/config/routes/league_oauth2_server.yaml
index b874e00..38a4d1b 100644
--- a/league/oauth2-server-bundle/0.4/config/routes/league_oauth2_server.yaml
+++ b/league/oauth2-server-bundle/0.11/config/routes/league_oauth2_server.yaml
@@ -1,3 +1,3 @@
-oauth2_server:
-    resource: '@LeagueOAuth2ServerBundle/Resources/config/routes.php'
+league_oauth2_server:
+    resource: '@LeagueOAuth2ServerBundle/config/routes.php'
     type: php
diff --git a/league/oauth2-server-bundle/0.4/manifest.json b/league/oauth2-server-bundle/0.11/manifest.json
index 71be019..ee510d4 100644
--- a/league/oauth2-server-bundle/0.4/manifest.json
+++ b/league/oauth2-server-bundle/0.11/manifest.json
@@ -11,8 +11,5 @@
         "OAUTH_PASSPHRASE": "%generate(secret)%",
         "OAUTH_ENCRYPTION_KEY": "%generate(secret)%"
     },
-    "gitignore": [
-        "/%CONFIG_DIR%/jwt/*.pem"
-    ],
     "aliases": ["oauth2-server", "oauth-server"]
 }
diff --git a/league/oauth2-server-bundle/0.4/post-install.txt b/league/oauth2-server-bundle/0.11/post-install.txt
index 2976520..1eba7a5 100644
--- a/league/oauth2-server-bundle/0.4/post-install.txt
+++ b/league/oauth2-server-bundle/0.11/post-install.txt
@@ -1,5 +1,5 @@
   1.  Provide a key pair 
-    * Generate a private/public key pair at the locations defined in your .env file, using the value of the  OAUTH_PASSPHRASE as passphrase: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
+    * Generate a private/public key pair by running php bin/console league:oauth2-server:generate-keypair
 
   2.  Update the database schema 
     * Update your database schema so that bundle entities can be managed by Doctrine

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) April 6, 2025 22:35
fabpot
fabpot previously approved these changes Apr 7, 2025
@chalasr chalasr disabled auto-merge April 7, 2025 12:00
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) April 7, 2025 12:00
@chalasr chalasr disabled auto-merge April 7, 2025 12:00
Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

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

Looks good to me

@chalasr chalasr merged commit 8ee3177 into symfony:main Apr 7, 2025
1 of 2 checks passed
@chalasr chalasr deleted the oauth2-server-0.11 branch April 7, 2025 12:27
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.

5 participants