nucleos/setlistfm
Laravel/PHP client for the setlist.fm API. Fetch setlists, artists, venues, tours, and search results with a simple, typed interface. Built for quick integration into apps that need concert history, recent shows, and setlist lookups.
## Technical Evaluation
### **Architecture Fit**
- **Microservice/API Layer Fit**: Continues to align perfectly with Laravel applications requiring **Setlist.fm API integration**, particularly for **music/entertainment apps**, ticketing platforms, or fan engagement tools. The package’s lightweight design remains ideal for **dedicated API clients** rather than full-stack monoliths.
- **Domain-Specific Use Case**: Unchanged—optimal for applications where setlist history, artist data, or event tracking is a core feature.
- **Laravel Synergy**: Leverages Laravel’s **HTTP client (Guzzle)** under the hood, ensuring compatibility with Laravel’s ecosystem (e.g., `Http` facade, middleware, caching). **No architectural misalignment** introduced, even with Symfony 8 support.
### **Integration Feasibility**
- **Low-Coupling Design**: Abstracts API calls behind a clean facade, reducing direct HTTP client management. **No changes** to this core principle.
- **Dependency Isolation**: **Symfony 8 support** (via PR #421) introduces a **new dependency risk** but maintains minimalism (PHP core + Guzzle + Symfony 8 components). The package remains **Laravel-agnostic** in its core logic.
- **Laravel-Specific Features**:
- Continues to integrate with **Laravel’s service container**, **queued jobs**, and **caching**.
- **No breaking changes** to Laravel integration patterns detected.
- **Symfony 8 compatibility** is now **explicitly supported**, but this is **opt-in** (only relevant if your app uses Symfony components directly).
### **Technical Risk**
- **API Stability Risk**: *(Unchanged)* Setlist.fm’s API may still evolve without versioned support. **Monitor for breaking changes** post-integration.
- **Rate Limiting**: *(Unchanged)* No built-in exponential backoff or retry logic (still requires Laravel-level handling).
- **Authentication**: *(Unchanged)* Assumes external management of OAuth2/API keys (no Laravel `Auth` integration).
- **Testing Gaps**: *(Unchanged)* Limited test coverage (4 stars, low activity) persists; **custom validation** may still be required for edge cases.
- **Symfony 8 Dependency Risk** *(Updated)*:
- **Impact**: While the package now supports Symfony 8, **conflicts may arise** if your Laravel app uses **Symfony components directly** (e.g., `symfony/http-client`).
- **Mitigation**:
- If using **Laravel 11+**, Symfony 8 is natively supported; **no action needed**.
- If using **Laravel 10**, test for conflicts by running:
```bash
composer require symfony/http-client:^8.0 --dev
composer why symfony/http-client
```
- If conflicts exist, **isolate the package** behind a custom service layer (see *Integration Approach*).
- **New Risk**: **Backward Compatibility with Symfony 6/7**
- The package now **requires Symfony 8**, which may break apps using older Symfony versions. **Avoid mixing Symfony versions** in your project.
### **Key Questions**
1. **API Contract**: *(Unchanged)* Does Setlist.fm’s API have a public changelog? How often does it evolve?
2. **Rate Limits**: *(Unchanged)* What are the API’s request quotas, and how will Laravel handle throttling?
3. **Data Model**: *(Unchanged)* Does the package align with your database schema?
4. **Error Handling**: *(Unchanged)* Are there custom exceptions for API failures?
5. **Performance**: *(Unchanged)* For high-traffic apps, will parallel requests (Guzzle `Promise`) be needed?
6. **Localization**: *(Unchanged)* Does the package support multi-language setlist data?
7. **Symfony 8 Compatibility**: *(Updated)*
- Are you using **Symfony components** (e.g., `symfony/http-client`, `symfony/contracts`) elsewhere in the Laravel app?
- What is your **Laravel version**? (Laravel 11+ is recommended for Symfony 8 support.)
- Have you **audited dependencies** for conflicts?
```bash
composer show symfony/* | grep -E "8\.0|^symfony/"
```
8. **Symfony Version Locking**: *(New)*
- Should you **pin Symfony dependencies** to avoid unintended upgrades?
```bash
composer require symfony/http-client:^6.4 --dev # For Laravel 10
```
---
## Integration Approach
### **Stack Fit**
- **Laravel Core**: *(Unchanged)* Seamless integration with HTTP client, service container, Eloquent, and caching.
- **Symfony 8 Considerations**:
- **Laravel 11+**: Full Symfony 8 support; **no issues expected**.
- **Laravel 10**: **Potential conflicts** with Symfony 8. Test thoroughly or **isolate the package** (see *Sequencing*).
- **Symfony-Heavy Apps**: If using Symfony components directly, ensure version alignment:
```php
// Example: Force Symfony 8 compatibility in Laravel 10
composer require symfony/http-client:^8.0 symfony/contracts:^8.0
```
### **Migration Path**
1. **Phase 1: Proof of Concept** *(Unchanged)*
- Replace a single API endpoint (e.g., artist setlists) with the package.
- Validate response mapping to data models.
2. **Phase 2: Core Integration** *(Updated)*
- **Symfony 8 Compatibility Check**:
- For **Laravel 10**, test in a staging environment:
```bash
composer require nucleos/setlistfm:^3.6.0 --with-all-dependencies
composer validate --strict
```
- For **Laravel 11**, proceed directly to integration.
- **Isolate Symfony Dependencies** (if needed):
```php
// Wrap the package to avoid Symfony conflicts
class SetlistService {
public function __construct(private \Nucleos\Setlistfm\Setlistfm $client) {}
public function fetchArtist(int $id) {
return $this->client->getArtist($id);
}
}
```
- Inject the service into Laravel’s container:
```php
app()->bind(SetlistService::class, fn() => new SetlistService(new \Nucleos\Setlistfm\Setlistfm(config('setlistfm.key'))));
```
3. **Phase 3: Scaling** *(Unchanged)*
- Implement queued jobs for bulk operations.
- Add circuit breakers (e.g., Spatie’s `CircuitBreaker`).
### **Compatibility**
- **PHP Version**: *(Unchanged)* Confirmed for PHP 8.1+ (Laravel 9+).
- **Laravel Version**: *(Updated)*
- **Laravel 11**: Officially supports Symfony 8; **no issues expected**.
- **Laravel 10**: **Symfony 8 may cause conflicts**. Use `--with-all-dependencies` during testing.
- **Laravel 9**: **Not recommended** due to Symfony 8 requirement.
- **Database**: *(Unchanged)* No ORM assumptions; use Eloquent or raw queries.
- **Third-Party**: *(Updated)*
- **Symfony HttpClient**: If your app uses Symfony’s `HttpClient`, ensure **version alignment** (Symfony 8 for Laravel 11, Symfony 6/7 for Laravel 10).
- **Avoid conflicts** with other HTTP clients (e.g., Guzzle standalone).
### **Sequencing**
1. **Setup** *(Updated)*
- Install with Symfony 8 support:
```bash
composer require nucleos/setlistfm:^3.6.0
```
- **For Laravel 10**: Pin Symfony dependencies to avoid conflicts:
```bash
composer require symfony/http-client:^6.4 symfony/contracts:^6.4 --dev
```
- Configure API credentials in `.env` (e.g., `SETLISTFM_API_KEY`).
- **Verify compatibility**:
```bash
composer validate --strict
```
2. **Basic Usage** *(Unchanged)*
```php
use Nucleos\Setlistfm\Setlistfm;
$client = new Setlistfm(config('setlistfm.key'));
$artist = $client->getArtist(123);
class SetlistService {
public function __construct(private Setlistfm $client) {}
public function fetchArtist(int $id) {
return $this->client->getArtist($id);
}
}
app()->bind(SetlistService::class, fn() => new SetlistService(new Setlistfm(config('setlistfm.key'))));
composer require symfony
How can I help you explore Laravel packages today?