- What is alaouy/youtube used for in Laravel?
- alaouy/youtube is a Laravel facade and wrapper for the YouTube Data API v3. It lets you fetch video, channel, and playlist details, run searches, upload, update, and delete videos, manage playlists, and handle comments through a fluent interface. Configuration is handled through a package config file instead of scattered raw API calls.
- Which PHP and Laravel versions does alaouy/youtube 2.2.6 support?
- Version 2.2.6 drops PHP 7 support and requires PHP 8.0 or higher, which aligns with Laravel 9 and later. The release notes do not name an explicit Laravel major floor, so check the exact require.php constraint in composer.json before upgrading. Laravel 6, 7, and 8 applications pinned to PHP 7.4 should remain on 2.2.5.
- How do I install alaouy/youtube in a Laravel application?
- Install it with Composer's require command at your project root. On Laravel versions with package auto-discovery, the service provider and facade are registered automatically; on older versions you add them to config/app.php manually. Then publish the package configuration and add your YouTube Data API key before making requests.
- Is alaouy/youtube 2.2.6 a breaking change even though it is a patch release?
- Effectively yes for PHP 7 consumers, because dropping the platform requirement is a breaking environment change published under a patch version number. Composer resolves the newest version your platform allows, so PHP 7.4 applications normally fall back to 2.2.5 rather than failing outright. Treat it as a constraint release, not a capability release, and diff the composer.json of 2.2.5 and 2.2.6.
- Will composer update break a PHP 7.4 CI build that uses alaouy/youtube?
- It can. If a PHP 7.4 builder runs composer update and tries to resolve 2.2.6, dependency resolution will fail because that release requires PHP 8.0 or higher. The failure is fast and loud at resolution time, not at test time, but it can block an unrelated hotfix. Pin 2.2.5 or upgrade the CI builder before the next dependency refresh.
- How do I pin alaouy/youtube to 2.2.5 on an older Laravel app?
- Use an explicit Composer constraint such as alaouy/youtube:2.2.5 and commit the resulting composer.lock. Record the pin and its rationale in your dependency register with a dated exit plan, because older branches may not receive future fixes. Upgrade your PHP runtime and CI builder first, then remove the pin as a separate change.
- How can I test code that uses alaouy/youtube without calling the live API?
- Mock the facade or bind a fake YouTube client in Laravel's container so tests never hit the network. If your code resolves the package through the facade, Laravel's facade mocking helpers let you assert the expected calls. Keep a small number of contract tests with recorded fixtures if you need to verify request shapes and parameters.
- Can alaouy/youtube upload videos and manage playlists?
- Yes. The package exposes YouTube Data API v3 operations for uploading, updating, and deleting videos, managing playlists, and handling comments, plus search and video, channel, and playlist detail lookups. You call these through a fluent Laravel facade rather than writing raw HTTP requests.
- Is alaouy/youtube actively maintained and safe for production?
- The 2.2.6 release signals active maintenance and tooling modernization, which is a positive indicator. The main production concerns are semver discipline around the PHP floor and whether the 2.2.5 branch receives security backports for PHP 7 holdouts. Pin versions, monitor releases, and set a PHP 7.4 sunset date if you are on the legacy tail.
- What are the alternatives to alaouy/youtube for the YouTube Data API?
- The official google/apiclient library is the vendor-maintained PHP client for the same YouTube Data API, but it is not a Laravel facade. You can also call the YouTube Data API v3 directly with Laravel's HTTP client when you want full control. Choose alaouy/youtube when you want a fluent Laravel wrapper and are comfortable with its release cadence.