Download the PHP package calliostro/spotify-bundle without Composer
On this page you can find all versions of the php package calliostro/spotify-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download calliostro/spotify-bundle
More information about calliostro/spotify-bundle
Files in calliostro/spotify-bundle
Package spotify-bundle
Short Description Lightweight Symfony bundle for the Spotify Web API with autowiring, resilience, and rate limiting support.
License MIT
Homepage https://github.com/calliostro/spotify-bundle
Informations about the package spotify-bundle
Spotify Bundle for Symfony
A lightweight Symfony bundle integrating calliostro/spotify-client into your Symfony application. Provides dependency injection, autowiring, Client Credentials and Authorization Code Flow support, built-in retry resilience, and optional rate limiting for PHP 8.1+ and Symfony 6.4, 7.x, and 8.x.
๐ฆ Installation
Install via Composer:
โ๏ธ Configuration
Configure the bundle in config/packages/calliostro_spotify.yaml:
[!NOTE] By default, the client uses
SpotifyClient/1.0.xas User-Agent. You can override this in the configuration if needed.
Authentication Methods
- Client Credentials Flow (Server-to-Server): Ideal for backend processes, cron jobs, and public catalog endpoints (search, artists, albums, tracks). Provide
client_idandclient_secret; bearer tokens are automatically fetched and renewed. - Authorization Code Flow (User Auth): For user-specific actions (e.g.
/me, playlists, player control). InjectCalliostro\Spotify\AuthHelperto build authorization URLs and exchange authorization codes for access and refresh tokens.
๐ Quick Start
Basic Usage (Client Credentials)
Inject SpotifyClient directly into your controllers or services:
Authorization Code Flow (OAuth)
Inject Calliostro\Spotify\AuthHelper to handle OAuth user authorization:
โฑ๏ธ Rate Limiting with symfony/rate-limiter
To proactively shape and throttle requests before sending them to Spotify:
1. Install the Component
2. Configure the Rate Limiter
3. Assign to the Bundle
๐ Requirements
- PHP
^8.1(tested on PHP 8.1โ8.6) - Symfony
^6.4 || ^7.0 || ^8.0 - calliostro/spotify-client
^1.0
๐งช Development & Testing Guide
See DEVELOPMENT.md for detailed setup instructions, test suite commands, static analysis, and contribution guidelines.
๐ค Contributing
Contributions are welcome! Please ensure that all tests pass and coding standards are maintained:
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
โ๏ธ Disclaimer
Spotify is a registered trademark of Spotify AB. This project is an independent, unofficial open-source library and is not affiliated with, endorsed by, or sponsored by Spotify or Spotify AB.
๐ Acknowledgments
calliostro/spotify-clientfor the underlying Spotify Web API client.- Spotify Developer Platform for providing the Web API.
- Symfony for the web framework and dependency injection container.
- Sister Symfony bundles:
calliostro/spotify-web-api-bundleโ Closely related Spotify integration using the alternativejwilsson/spotify-web-api-phpclient.calliostro/discogs-bundleโ Symfony bundle for the Discogs API.calliostro/lastfm-bundleโ Symfony bundle for the Last.fm API.calliostro/musicbrainz-bundleโ Symfony bundle for the MusicBrainz API.
All versions of spotify-bundle with dependencies
calliostro/spotify-client Version ^1.0
symfony/config Version ^6.4 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.0 || ^8.0