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

Slack Exception Logger Bundle Laravel Package

dopiaza/slack-exception-logger-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

The package now requires Symfony 3.0+ compatibility, meaning it aligns with modern Laravel (v5.5+) and Symfony ecosystems. To get started:

  1. Update dependencies: Run composer update to ensure your project meets Symfony 3.0+ requirements (e.g., symfony/http-foundation, symfony/console).
  2. Check Laravel version: Verify compatibility with Laravel 5.5+ (most packages drop PHP 5.5/7.0 support post-Symfony 3.0).
  3. First use case: Install via Composer (composer require vendor/package) and follow the package’s updated docs for initialization (e.g., service provider registration, config publishing).

Key change: No breaking API changes yet, but Symfony 3.0+ enforces stricter type hints and PSR-4 autoloading. Test with php artisan config:clear if issues arise.


Implementation Patterns

Updated Workflows

  • Dependency Injection: Leverage Symfony’s ContainerInterface (now fully compatible) for tighter integration with Laravel’s service container. Example:
    use Symfony\Component\HttpFoundation\Request;
    $request = app(Request::class); // Works as expected in Laravel 5.5+
    
  • Event Handling: If the package uses Symfony events (e.g., KernelEvents), ensure your Laravel event listeners extend Symfony\Component\EventDispatcher\EventSubscriberInterface.
  • Configuration: Use config('package.key') as before, but validate against Symfony’s YamlFileLoader if the package ships config files.

Integration Tips

  • Middleware: If the package provides middleware, extend Symfony\Component\HttpKernel\HttpKernelInterface for Laravel’s middleware stack.
  • Console Commands: Symfony 3.0+ commands now require Symfony\Component\Console\Command as the base class. Example:
    use Symfony\Component\Console\Command\Command;
    class MyCommand extends Command { ... }
    
  • HTTP Clients: Prefer Symfony\Component\HttpClient\HttpClient (if available) over Guzzle for consistency.

Gotchas and Tips

Breaking Changes

  1. PHP Version: Symfony 3.0+ drops PHP 5.5/7.0 support. Ensure your project uses PHP 7.1+.
  2. Autoloading: PSR-4 is mandatory. Update composer.json autoload if the package uses non-PSR-4 namespaces:
    "autoload": {
      "psr-4": { "Vendor\\Package\\": "src/" }
    }
    
  3. Deprecated Symfony Components: Some older Symfony 2.x components (e.g., HttpFoundation methods) may be removed. Check the package’s composer.json for required versions.

Debugging

  • Class Not Found: Run composer dump-autoload if Symfony classes fail to load.
  • Type Errors: Enable strict typing in composer.json:
    "config": { "platform-check": true, "preferred-install": "dist" }
    
  • Event Dispatcher: If events fail, verify the package’s event subscriber is registered in AppServiceProvider::boot().

Extension Points

  • Custom Symfony Components: Override Symfony services in config/services.php:
    'symfony.http_client' => [
        'timeout' => 30,
    ],
    
  • Monolog Integration: Use Symfony’s MonologHandler for unified logging:
    use Symfony\Component\HttpKernel\Log\MonologHandler;
    $handler = new MonologHandler(new Monolog\Logger('name'));
    

Pro Tips

  • Laravel Mix: If the package includes assets, use @symfony/webpack-encore for Symfony-compatible Webpack.
  • Testing: Mock Symfony services with Laravel’s Mockery:
    $mockRequest = Mockery::mock(Symfony\Component\HttpFoundation\Request::class);
    
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor