clarity-project/yandex-oauth-bundle
socialiteproviders/yandex or laravel/socialite for OAuth integrations. However, this bundle’s Doctrine ORM dependency and Symfony-specific components (e.g., MisdGuzzleBundle, JMSSerializerBundle) may complicate adoption.session, redis, or database via Eloquent). A custom storage layer would be needed.ContainerAware interfaces won’t work natively in Laravel. A facade or service provider wrapper would be required.MisdGuzzleBundle (Guzzle 5/6). Laravel’s built-in HTTP client (Guzzle 7+) or illuminate/http would need alignment.JMSSerializerBundle can be replaced with Laravel’s native JSON handling or spatie/array-to-object.doctrine/dbal for DBAL compatibility).EventDispatcher) differs from Laravel’s. A custom event listener bridge may be needed.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony2 Dependency | High | Abstract Symfony-specific components via interfaces. |
| Doctrine ORM | Medium | Use Eloquent or a lightweight ORM like cycle-orm. |
| Guzzle Version Mismatch | Medium | Downgrade Laravel’s Guzzle or polyfill Guzzle 6. |
| Event System | Low | Replace Symfony events with Laravel’s Events facade. |
| Token Storage | Medium | Implement a custom storage repository. |
| Testing Overhead | High | Write integration tests for the adapter layer. |
Why Yandex OAuth specifically?
socialiteproviders/yandex) that could serve the same purpose with lower risk?Database Strategy
Long-Term Maintenance
Performance Implications
JMSSerializer) that could bloat the app?Fallback Options
socialiteproviders/yandex)?MisdGuzzleBundle with Laravel’s Http facade or a Guzzle 6/7 adapter.JMSSerializer with Laravel’s json_decode() or spatie/array-to-object.Event system via a custom listener.doctrine/dbal.RoutingBundle) is not needed in Laravel. Use Laravel’s route model binding or API resource controllers.// app/Providers/YandexOAuthServiceProvider.php
public function register()
{
$this->app->singleton(YandexOAuthClient::class, function ($app) {
return new LaravelYandexOAuthClient(
$app['config']['services.yandex.client_id'],
$app['config']['services.yandex.client_secret'],
new GuzzleHttpClient() // Laravel's HTTP client
);
});
}
// app/Models/YandexOAuthToken.php
class YandexOAuthToken extends Model
{
protected $fillable = ['access_token', 'refresh_token', 'expires_at'];
}
| Component | Symfony2 Implementation | Laravel Equivalent |
|---|---|---|
| Dependency Injection | ContainerAware |
Laravel’s bind() or singleton() |
| HTTP Client | MisdGuzzleBundle |
Http facade or Guzzle 7 |
| Serialization | JMSSerializerBundle |
json_decode() or spatie/array-to-object |
| Database | Doctrine ORM | Eloquent or Doctrine DBAL |
| Events | Symfony EventDispatcher | Laravel’s Event facade |
| Routing | RoutingBundle |
Laravel’s router |
Http client.JMSSerializer with a lightweight alternative.EventDispatcher, Routing, Doctrine). Over time, these may require updates or forks to maintain compatibility.How can I help you explore Laravel packages today?