Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Youtube Laravel Package

socialiteproviders/youtube

YouTube OAuth 2.0 provider for Laravel Socialite. Adds Google/YouTube authentication so users can sign in with their YouTube accounts and grant access to channels, uploads, and analytics via the standard Socialite API.

View on GitHub
Deep Wiki
Context7

Getting Started

Install the release that ships PHP 8 support:

composer require vendor/package:^4.1

Before you run anything else, confirm three things:

  1. Your PHP version — php -v. This release advertises PHP 8 support, so you should be on 8.0+ locally and in CI. If your app is still on 7.4, stop here; do not partially upgrade.
  2. The composer.json constraints — read the package's own require block, not just the release note. "Supports PHP 8" tells you about the platform requirement; it does not tell you which illuminate/* versions are supported. Check those separately.
  3. Laravel version compatibility — a package can support PHP 8 while still capping at Laravel 8.x. Verify before assuming it works on 9/10.

First place to look: the package's service provider. It is the map of everything the package registers — config merges, container bindings, singletons, commands, migrations, event listeners. Five minutes there saves an hour in the README.

Then publish what you need:

php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider"
# or, more precisely, only the tags you want:
php artisan vendor:publish --tag=package-config
php artisan vendor:publish --tag=package-migrations

First use case — prove the wiring end to end with the smallest possible path: resolve the package's main class from the container, perform one read and one write, and verify the side effects (a DB row, a queued job, a log line). Do this in tinker or a throwaway test before integrating it into real code. If it works there, it will work in your controllers.

Implementation Patterns

Resolve from the container, never new. Published config, constructor injection, and any test fakes only take effect if the container builds the object. Inject the interface or the package class into your own constructor, or resolve via the facade if the package ships one.

Put a thin adapter in front of it. Create your own service class (App\Services\Something) that wraps the package's API. Your controllers and jobs depend on your adapter, not the vendor namespace. This is what makes future major-version upgrades — and a possible swap-out — a one-file change instead of a repo-wide search-and-replace.

Keep configuration in config/ and out of call sites. Anything the package reads from config should stay there so it is overridable per environment. Do not scatter API keys, model class names, or queue names across controllers.

Defer side effects until after commit. If the package fires events, queues jobs, or writes related records, wrap the triggering call so it runs after the transaction commits:

DB::transaction(function () use ($service) {
    $record = $service->create($data);
    // let queued listeners and side effects fire only once the row is durable
});

Use the package's fakes in tests, and RefreshDatabase. Most Laravel packages ship a fake or a testing trait for HTTP/queue/notification boundaries; use them rather than hitting the network. Freeze time ($this->travelTo()) if the package does anything date-based, and reset static state in tearDown if it caches.

PHP 8 idioms are now safe to use around the package — but apply them in your code, not against its public API:

  • match() is a clean way to map the package's status strings/enums to your own behaviour.
  • Named arguments are tempting against long package method signatures, but they are a semver hazard: a renamed parameter in a minor release breaks you silently at the call site. Prefer positional or your own wrapper methods.
  • Constructor property promotion and readonly properties are fine in your adapter; you cannot retroactively apply them to vendor classes.
  • Nullsafe (?->) is useful when the package's lookups return null by design — verify that assumption before relying on it.

Roll out behind a config flag. If this release is replacing an older integration path, gate the new code path on a config value, ship it dark, and flip it per environment. Long-running queue workers and Octane need a restart to pick up the change — php artisan queue:restart.

Gotchas and Tips

"PHP 8" is ambiguous — read the actual constraint. ^8.0, >=8.0, and ~8.0 mean very different things, and a package that claims PHP 8 support may still trip the PHP 8.1 "passing null to non-nullable internal parameter" deprecation, or not be tested on 8.2/8.3. Run your suite on the highest version you deploy to.

PHP 8 support does not imply Laravel 9/10 support. This is the single most common cause of "I upgraded and Composer gave me an unresolvable set." Diagnose with composer why-not vendor/package 4.1.0 — it names the exact conflicting constraint instead of leaving you guessing.

Stale config cache is the classic silent failure. config/package.php changes have no effect until php artisan config:cache is re-run (or config:clear in local). Related trap: env() inside a config file returns null once config is cached. Only call env() from config files, and always give it a default.

Do not edit files in vendor/. Re-publish instead, and remember that publishing again overwrites your edits — diff before you confirm. Better: publish only once, then keep your customisation in your own config file or adapter.

Debugging order that actually works:

  1. php artisan about — confirms driver, environment, cache state.
  2. php artisan tinker — resolve the class from the container and poke at it directly.
  3. php artisan vendor:publish --list (or --help) when you are unsure which tags exist.
  4. Log::info() around the call to see whether it is even reached, before you blame the package.
  5. A one-line Pest/PHPUnit test that hits the boundary — much faster to iterate than a browser request.

Extension points worth knowing before you fork anything: container bindings in your own service provider (override the package's binding after it registers), macros if the package's fluent API supports them, custom drivers via the manager's extend() if it wraps a driver-based system, and the package's events/listeners for cross-cutting concerns. Most "I need to modify the package" situations are actually one of these four.

Add the version matrix to CI. Run the suite against PHP 8.0 through your current maximum, and pin larastan/PHPStan to a level that at least checks your adapter's boundaries. Static analysis catches signature drift between minor releases faster than your test suite will.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource