Download the PHP package lukaszzychal/tmdb-client-php without Composer
On this page you can find all versions of the php package lukaszzychal/tmdb-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lukaszzychal/tmdb-client-php
More information about lukaszzychal/tmdb-client-php
Files in lukaszzychal/tmdb-client-php
Package tmdb-client-php
Short Description A comprehensive PHP client for The Movie Database (TMDB) API
License MIT
Informations about the package tmdb-client-php
TMDB Client PHP
A comprehensive PHP client for The Movie Database (TMDB) API built with modern PHP practices and full test coverage.
Author: Łukasz Zychal
⚖️ TMDB License Compliance
This client is designed to help you comply with TMDB API Terms of Service. When using this client, you must:
- ✅ Include TMDB Attribution - Display "This product uses the TMDB API but is not endorsed or certified by TMDB"
- ✅ Use Official TMDB Logo - Include the TMDB logo when displaying data
- ✅ Respect Rate Limits - This client includes built-in rate limiting
- ✅ Handle Errors Properly - Use the provided exception handling
See TMDB_LICENSE_COMPLIANCE.md for detailed requirements and examples.
Features
- 🎬 Complete TMDB API Coverage - Movies, TV Shows, People, Search, Configuration, Genres
- 🚀 Modern PHP - Built for PHP 8.1+ with strict types and PSR compliance
- 🛡️ Type Safety - Full type declarations and static analysis support
- 🧪 Comprehensive Testing - Unit, integration, and contract tests
- 📊 CI/CD Pipeline - Automated testing, code quality, and security scanning
- 📚 Well Documented - Complete API documentation and examples
- 🔧 PSR Standards - PSR-4 autoloading, PSR-3 logging, PSR-7 HTTP messages
- ⚡ Guzzle Integration - Built on top of Guzzle HTTP client
- 🎯 Exception Handling - Specific exceptions for different error types
Installation
Install via Composer:
Configuration
1. Get TMDB API Key
- Visit themoviedb.org
- Create an account or log in
- Request an API key
- Copy your API key
2. Configure API Key
Option A: Using .env file (Recommended)
Option B: Environment Variable
Quick Start
📋 License Compliance Helper
API Documentation
Movies
TV Shows
People
Search
Configuration & Genres
Configuration
You can customize the HTTP client behavior:
Error Handling
The client provides specific exceptions for different error scenarios:
Testing
Running Tests
Contract Tests
Contract tests verify the real TMDB API behavior. To run them:
- Get a TMDB API key from themoviedb.org
-
Configure your API key using one of these methods:
Option A: Using .env file (Recommended)
Option B: Environment variable
- Run contract tests:
Note: Contract tests are rate-limited and should be run sparingly. They're automatically scheduled to run daily in the CI/CD pipeline.
Code Quality
This package maintains high code quality standards using multiple static analysis tools:
Quality Tools Used:
- PHP CS Fixer: Code style and formatting
- PHPStan: Static type analysis (Level 8)
- Psalm: Advanced type analysis and security detection
- PHPUnit: Unit, Integration, and Contract testing
For detailed information about all quality commands, see Quality Commands Reference.
Automated Maintenance
This project includes automated maintenance features to ensure reliability and security:
🔄 Dependabot Integration
- Monthly dependency updates for Composer packages and GitHub Actions
- Automatic pull requests for minor and patch updates
- Grouped updates to reduce noise
- Manual review required for major version updates
🧪 Monthly Contract Testing
- Automated monthly tests against the real TMDB API
- Runs on the 1st day of every month at 2:00 AM UTC
- Validates API compatibility and integration health
- Detailed test reports with failure notifications
- Can be triggered manually via GitHub Actions
📊 CI/CD Pipeline
- Daily lightweight contract tests for quick API health checks
- Comprehensive testing on every push and pull request
- Multi-PHP version support (8.1, 8.2, 8.3, 8.4)
- Security scanning with Trivy vulnerability detection
- Code quality checks with PHP CS Fixer, PHPStan, and Psalm
Examples
Basic Usage
See examples/basic-usage.php for a complete working example.
License Compliance
See examples/license-compliance-example.php for detailed TMDB license compliance examples including:
- HTML attribution generation
- CSS styling
- JSON-LD structured data
- Validation and compliance checking
Run examples:
Requirements
- PHP 8.1 or higher
- Composer
- Guzzle HTTP Client 7.8+
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
Support
- GitHub Issues – Report bugs, request features, or track ongoing work.
- GitHub Discussions – Ask questions, share ideas, or get help from the community.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Links
Changelog
See CHANGELOG.md for a list of changes and version history.
All versions of tmdb-client-php with dependencies
guzzlehttp/guzzle Version ^7.8
psr/http-client Version ^1.0
psr/http-message Version ^1.0|^2.0
psr/log Version ^1.0|^2.0|^3.0