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

Custom App Essentials Bundle Laravel Package

akeneo-presales/custom-app-essentials-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation

    composer require akeneo-presales/custom-app-essentials-bundle
    
  2. Routing Configuration Add to config/routes.yaml:

    akeneo_presales_custom_app_essentials:
        resource: "@AkeneoPresalesCustomAppEssentialsBundle/Controller"
        type: attribute
    
  3. Tenant Entity Implementation Implement TenantInterface on your tenant entity:

    use AkeneoPresales\CustomAppEssentialsBundle\Entity\TenantInterface;
    
    class YourTenantEntity implements TenantInterface
    {
        // Implement required methods (e.g., getId(), getName())
    }
    
  4. First Use Case: Event Platform UI Access the event platform management UI via:

    <a href="{{ path('akeneo_presales_custom_app_essentials_event_platform_configuration') }}">Event Platform</a>
    

Implementation Patterns

Multi-Tenant Service Integration

  • Dependency Injection: Inject PubSubService or GraphQLService into your services:

    use AkeneoPresales\CustomAppEssentialsBundle\Service\PubSubService;
    
    public function __construct(
        private PubSubService $pubSubService
    ) {}
    
  • Tenant-Aware Operations:

    $this->pubSubService->publish('event.topic', $data, $tenantId);
    

Event Platform Management

  • Subscriber Configuration: Use the UI to register subscribers (e.g., Akeneo\Tool\EventPlatformBundle\Subscriber\SubscriberInterface). Programmatically, configure via:

    # config/packages/akeneo_event_platform.yaml
    akeneo_event_platform:
        subscribers:
            - 'App\Subscriber\YourSubscriber'
    
  • Subscription Management:

    $this->pubSubService->subscribe('topic', $callback, $tenantId);
    

GraphQL Client Workflows

  • Query Execution:

    $result = $this->graphQLService->query($tenantId, $query, $variables);
    
  • Mutation Handling:

    $this->graphQLService->mutate($tenantId, $mutation, $variables);
    

UI Extensions (WIP)

  • Extension Registration: Use the UI to manage UI extensions (e.g., Akeneo PIM UI customizations). Programmatically, extend via:
    // In a custom bundle
    $extension = new YourUIExtension();
    $this->uiExtensionManager->addExtension($extension);
    

Gotchas and Tips

Debugging

  • Event Platform Issues:

    • Verify subscribers are properly tagged with akeneo.event_platform.subscriber.
    • Check Symfony logs for Akeneo\Tool\EventPlatformBundle errors.
  • Pub/Sub Delays:

    • Google Cloud Pub/Sub may introduce latency. Use async mode for non-critical events:
      $this->pubSubService->publishAsync('topic', $data, $tenantId);
      

Configuration Quirks

  • Tenant Isolation: Ensure TenantInterface is implemented correctly. Missing methods (e.g., getId()) will cause runtime errors.

    // Example fix
    public function getId(): ?int
    {
        return $this->id;
    }
    
  • GraphQL Client:

    • Validate queries against the Akeneo schema before execution to avoid runtime errors.
    • Cache responses for performance:
      $this->graphQLService->setCacheEnabled(true);
      

Extension Points

  • Custom Pub/Sub Backends: Override PubSubService to support alternative providers (e.g., RabbitMQ):

    // src/Service/CustomPubSubService.php
    class CustomPubSubService extends PubSubService
    {
        public function __construct(private RabbitMQClient $client) {}
    
        public function publish(string $topic, $data, ?int $tenantId): void
        {
            $this->client->publish($topic, $data);
        }
    }
    
  • Event Platform Extensions: Create custom event types by extending Akeneo\Tool\EventPlatformBundle\Event\EventInterface and register them via:

    akeneo_event_platform:
        events:
            - 'App\Event\YourCustomEvent'
    

Performance Tips

  • Batch Processing: Use PubSubService::publishBatch() for high-volume events:

    $this->pubSubService->publishBatch(['topic1' => $data1, 'topic2' => $data2], $tenantId);
    
  • GraphQL Query Optimization: Limit fields in queries to reduce payload size:

    $query = <<<'GRAPHQL'
    query {
        products {
            id
            sku
        }
    }
    GRAPHQL;
    
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.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
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