Weave Code
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

Extranet Bundle Laravel Package

atoolo/extranet-bundle

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Symfony Bundle for Extranets: The package is a Symfony bundle designed to secure GraphQL and controller-based API endpoints, making it a partial fit for Laravel ecosystems. While Laravel and Symfony share some foundational concepts (e.g., dependency injection, routing), Laravel lacks native Symfony bundle support, requiring abstraction or middleware-based integration.
  • GraphQL & Controller Security: The core value proposition—access control for GraphQL and RESTful endpoints—aligns with Laravel’s need for API security (e.g., Sanctum, Passport, or custom middleware). However, Laravel’s GraphQL stack (e.g., graphql-php, laravel-graphql) differs from Symfony’s overblog/graphql-bundle, necessitating compatibility checks.
  • Extranet Use Case: If the Laravel application requires role-based access control (RBAC) or tenant isolation for API endpoints (e.g., multi-tenant SaaS), this bundle’s design philosophy could inspire custom middleware or service logic.

Integration Feasibility

  • Symfony Dependency: The bundle is Symfony-specific, relying on Symfony’s Config, DependencyInjection, and FrameworkBundle. Laravel’s service container and configuration system (e.g., config/, app/Providers) are incompatible without a wrapper or adapter layer.
  • GraphQL Integration: Laravel’s GraphQL implementations (e.g., rebing/graphql-laravel) use middleware or resolvers for authorization, unlike Symfony’s bundle-integrated approach. Direct porting is unlikely; instead, extracting authorization logic (e.g., access control rules) for reuse in Laravel middleware is viable.
  • PHP Version Support: Supports PHP 8.1–8.4, which aligns with Laravel’s LTS support (Laravel 10+ uses PHP 8.1+). No immediate version conflicts.

Technical Risk

  • High Abstraction Gap: Converting Symfony bundle logic (e.g., AccessControl services, YAML config) to Laravel requires rewriting core components (e.g., replacing Symfony’s ContainerBuilder with Laravel’s ServiceProvider).
  • GraphQL Vendor Lock-in: The bundle’s GraphQL integration assumes overblog/graphql-bundle. Laravel’s GraphQL stack (e.g., graphql-php) has divergent APIs, increasing risk of partial functionality if ported.
  • Testing Overhead: The bundle’s E2E tests and PHPStan level 9 suggest high code quality, but Laravel-specific edge cases (e.g., route caching, middleware precedence) may introduce bugs.
  • Documentation Gaps: Limited stars/dependents and minimal external documentation imply unproven reliability in production. The bundle documentation is a critical dependency for understanding internals.

Key Questions

  1. Use Case Alignment:

    • Does the Laravel app need Symfony-level RBAC for GraphQL/REST, or are existing tools (e.g., Laravel Policies, Gates) sufficient?
    • Is tenant isolation or extranet-specific workflows (e.g., partner portals) a core requirement?
  2. Integration Strategy:

    • Should the TPM extract authorization logic (e.g., access control rules) and adapt it to Laravel middleware, or build a Symfony-compatible microservice for shared auth logic?
    • How will GraphQL authorization be implemented? (e.g., middleware vs. resolver-level checks)
  3. Maintenance Trade-offs:

    • Is the team willing to maintain a fork or abstract the bundle into a framework-agnostic library?
    • What’s the cost of rewriting Symfony-specific features (e.g., config loading, DI) for Laravel?
  4. Alternatives:

    • Could existing Laravel packages (e.g., spatie/laravel-permission, laravel-graphql-auth) fulfill the same needs with lower risk?
    • Is there a Symfony-to-Laravel bridge (e.g., API gateway) to avoid direct integration?

Integration Approach

Stack Fit

  • Laravel Compatibility: The bundle is not natively compatible with Laravel due to:
    • Symfony’s Bundle system (Laravel uses ServiceProvider/Package).
    • GraphQL stack divergence (overblog/graphql-bundle vs. graphql-php).
    • Configuration system differences (YAML vs. Laravel’s PHP/ENV files).
  • Mitigation Strategies:
    1. Middleware Adaptation: Port the bundle’s AccessControl logic into Laravel middleware (e.g., HandleGraphQLRequests, ExtranetAuthMiddleware).
    2. Service Extraction: Isolate auth logic (e.g., AccessControlResolver) into a shared library (e.g., atoolo/auth-core) usable in both stacks.
    3. API Gateway: Deploy the bundle in a Symfony microservice and expose auth via Laravel’s HTTP client (e.g., Guzzle).

Migration Path

Step Action Tools/Dependencies Risk
1 Audit Requirements Compare bundle features vs. Laravel’s spatie/laravel-permission/laravel-graphql-auth. Low
2 Extract Core Logic Clone the bundle’s AccessControl and GraphQLAuth classes, rewrite for Laravel. Medium
3 Build Adapters Create Laravel-specific:
  • ExtranetServiceProvider (registers auth services).
  • GraphQLMiddleware (replaces Symfony’s GraphQL hooks). | High | | 4 | Test Integration | Validate with:
  • Laravel’s php artisan route:list (middleware precedence).
  • GraphQL queries (e.g., graphql playground). | Medium | | 5 | Deprecate Bundle | Replace Symfony-specific calls (e.g., ContainerBuilder) with Laravel equivalents. | High |

Compatibility

  • GraphQL: The bundle’s GraphQL integration assumes overblog/graphql-bundle. For Laravel:
    • Use graphql-php’s middleware or resolver hooks to replicate access control.
    • Example: Extend GraphQL\Server\Middleware to inject auth logic.
  • Configuration: Symfony’s YAML config (config/packages/atoolo_extranet.yaml) must be migrated to Laravel’s config/extranet.php or ENV vars.
  • Dependency Injection: Replace Symfony’s services.yaml with Laravel’s bind()/singleton() in AppServiceProvider.

Sequencing

  1. Phase 1: Proof of Concept (2–4 weeks)
    • Implement a minimal middleware replicating the bundle’s AccessControl for REST endpoints.
    • Test with Laravel’s built-in auth (e.g., Auth::check()).
  2. Phase 2: GraphQL Integration (3–6 weeks)
    • Adapt auth logic to graphql-php’s middleware/resolvers.
    • Validate with sample queries (e.g., @auth directives).
  3. Phase 3: Full Feature Parity (4–8 weeks)
    • Port config, tenant isolation, and advanced RBAC rules.
    • Benchmark performance vs. existing Laravel auth tools.
  4. Phase 4: Deployment & Monitoring (2 weeks)
    • Roll out in staging, monitor for:
      • Middleware conflicts (e.g., auth:api vs. extranet).
      • GraphQL query failures (e.g., missing permissions).

Operational Impact

Maintenance

  • Long-Term Costs:
    • Forking the Bundle: Requires dual maintenance (Symfony + Laravel branches) if future updates are needed.
    • Custom Adaptations: Laravel-specific fixes (e.g., route caching bugs) will drift from upstream.
  • Dependency Risks:
    • The bundle’s symfony/security-bundle dependency is irrelevant in Laravel, increasing technical debt.
    • GraphQL auth logic may obsolete if Laravel’s graphql-php evolves.
  • Mitigation:
    • Decouple auth logic into a framework-agnostic library (e.g., atoolo/auth-rules).
    • Use Laravel’s Package system to encapsulate bundle adaptations.

Support

  • Debugging Complexity:
    • Stack traces will mix Symfony and Laravel frameworks, complicating error resolution.
    • Example: A ContainerException in Symfony’s DI may surface as a Laravel BindingResolutionException.
  • Community Resources:
    • No active maintainers (0 stars, last release 2026-03-23) imply limited support.
    • Documentation relies on external sitepark.io, which may change.
  • Recommendation:
    • Engage with Symfony maintainers (if possible) for clarification on bundle internals.
    • Build internal runbooks for Laravel-specific edge cases.

Scaling

  • Performance:
    • The bundle’s Symfony-specific optimizations (e.g., ContainerAware services
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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle