-
-
Notifications
You must be signed in to change notification settings - Fork 674
Update lastfm client bundle 2.0 #1885
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
Update lastfm client bundle 2.0 #1885
Conversation
|
Thanks for the PR 😍 How to test these changes in your application
Diff between recipe versionsIn order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. calliostro/last-fm-client-bundle1.0 vs 2.0diff --git a/calliostro/last-fm-client-bundle/1.0/config/calliostro_last_fm_client.yaml b/calliostro/last-fm-client-bundle/1.0/config/calliostro_last_fm_client.yaml
deleted file mode 100644
index df6031ac..00000000
--- a/calliostro/last-fm-client-bundle/1.0/config/calliostro_last_fm_client.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-calliostro_last_fm_client:
- # Get your API credentials from https://www.last.fm/api/account/create
- api_key: '%env(LASTFM_API_KEY)%'
- secret: '%env(LASTFM_SECRET)%'
-
- # Optional: session key for user-specific actions (scrobbling, etc.)
- # session: '%env(LASTFM_SESSION_KEY)%'
-
- # Optional: HTTP client configuration
- # http_client_options:
- # timeout: 30
diff --git a/calliostro/last-fm-client-bundle/2.0/config/packages/calliostro_lastfm.yaml b/calliostro/last-fm-client-bundle/2.0/config/packages/calliostro_lastfm.yaml
new file mode 100644
index 00000000..2a0f5b92
--- /dev/null
+++ b/calliostro/last-fm-client-bundle/2.0/config/packages/calliostro_lastfm.yaml
@@ -0,0 +1,16 @@
+calliostro_lastfm:
+ # Required: API Key for all practical operations (get from https://www.last.fm/api/account/create)
+ api_key: '%env(LASTFM_API_KEY)%'
+
+ # Required for authenticated operations: API Secret
+ api_secret: '%env(LASTFM_SECRET)%'
+
+ # Optional: Session key for scrobbling and user operations
+ # Get this via Last.fm OAuth flow or use a pre-generated session key
+ # session_key: '%env(LASTFM_SESSION_KEY)%'
+
+ # Optional: HTTP User-Agent header for API requests
+ # user_agent: 'MyApp/1.0 +https://myapp.com'
+
+ # Optional: Professional rate limiting (requires symfony/rate-limiter)
+ # rate_limiter: lastfm_api # Your configured RateLimiterFactory service
diff --git a/calliostro/last-fm-client-bundle/1.0/manifest.json b/calliostro/last-fm-client-bundle/2.0/manifest.json
index 440dd06b..305d922b 100644
--- a/calliostro/last-fm-client-bundle/1.0/manifest.json
+++ b/calliostro/last-fm-client-bundle/2.0/manifest.json
@@ -1,6 +1,6 @@
{
"bundles": {
- "Calliostro\\LastFmClientBundle\\CalliostroLastFmClientBundle": ["all"]
+ "Calliostro\\LastfmBundle\\CalliostroLastfmBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
@@ -8,6 +8,6 @@
"env": {
"LASTFM_API_KEY": "",
"LASTFM_SECRET": "",
- "#LASTFM_SESSION_KEY": ""
+ "#LASTFM_SESSION": ""
}
} |
There was a problem hiding this comment.
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 completes the Last.fm client bundle 2.0 recipe by standardizing configuration file locations and adding support for session-based authentication.
- Moves configuration from
config/toconfig/packages/directory following Symfony conventions - Adds optional
LASTFM_SESSIONenvironment variable for authenticated operations - Documents the new
session_keyconfiguration option with usage guidance
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| calliostro/last-fm-client-bundle/2.0/manifest.json | Updates config path to packages/ subdirectory and adds optional LASTFM_SESSION environment variable |
| calliostro/last-fm-client-bundle/2.0/config/packages/calliostro_lastfm.yaml | Adds documented session_key configuration option for scrobbling/user operations and updates existing comment descriptions |
Comments suppressed due to low confidence (1)
calliostro/last-fm-client-bundle/2.0/config/packages/calliostro_lastfm.yaml:10
- [nitpick] The environment variable reference
LASTFM_SESSIONdoesn't align with the config parameter namesession_key. Consider usingLASTFM_SESSION_KEYinstead for better consistency with:
- The config parameter naming (
session_key) - The version 1.0 convention
- Other environment variables in this config (e.g.,
LASTFM_API_KEY)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Update session_key configuration to use LASTFM_SESSION_KEY for consistency - Addresses feedback from PR symfony#1885
Head branch was pushed to by a user without write access
- Change from '%CONFIG_DIR%/packages/' to '%CONFIG_DIR%/' - Prevents files from being copied to config/packages/packages/ - Thanks @diimpp for catching this issue
Head branch was pushed to by a user without write access
Complete the existing lastfm-bundle 2.0 recipe with missing features.
packages/directoryLASTFM_SESSIONenvironment variablesession_keyconfiguration option