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

Normalizer Bundle Laravel Package

bowlofsoup/normalizer-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

Install via Composer:

composer require vendor/package-name

The package now requires PHP 8.4+ and is fully compatible with Symfony 5.4, 6.4, and 7.4. For Laravel users, ensure your project meets these requirements before installation.

First, publish the config file (if applicable) using:

php artisan vendor:publish --provider="Vendor\PackageName\PackageServiceProvider" --tag="config"

Verify compatibility with your Laravel version (tested on Laravel 10.x+ due to PHP 8.4 dependency).


Implementation Patterns

Core Workflow

  1. Dependency Injection: Leverage the package’s services via Laravel’s container (e.g., app()->make(Vendor\PackageName\Service::class)).
  2. Configuration: Use the published config file to customize behavior (e.g., API endpoints, logging).
  3. Service Integration: Bind the package’s services to Laravel’s interfaces (e.g., Illuminate\Contracts\Queue\Factory) for seamless integration.

Common Use Cases

  • API Clients: Use the package’s HTTP client wrappers (if provided) for Symfony-compatible requests:
    $response = app(Vendor\PackageName\Client::class)->get('/endpoint');
    
  • Event Handling: Extend the package’s events with Laravel’s event system (e.g., Event::dispatch(new Vendor\PackageName\Events\CustomEvent())).
  • Middleware: Register package-specific middleware in app/Http/Kernel.php if applicable.

Symfony Interop

For projects using Symfony components (e.g., HTTP client, messenger), the package now aligns with Symfony 7.4 standards. Example:

use Symfony\Component\HttpClient\HttpClient;
$client = HttpClient::create(); // Package may use this under the hood.

Gotchas and Tips

Breaking Changes

  • PHP 8.4 Requirement: Ensure your project uses PHP 8.4+. Features like typed class constants or new attributes may be used internally.
  • Symfony 5.4+: If your project uses older Symfony components (e.g., 4.x), conflicts may arise. Audit dependencies.

Debugging

  • Deprecation Warnings: The package may emit warnings for Symfony 5.x/6.x features deprecated in 7.4. Suppress or address them via:
    error_reporting(E_ALL & ~E_DEPRECATED);
    
  • Logging: Use Laravel’s logging facade (\Log::debug()) to trace package interactions.

Extension Points

  • Custom Services: Override package services via binding:
    $this->app->bind(
        Vendor\PackageName\Contracts\ServiceInterface::class,
        App\Services\CustomService::class
    );
    
  • Configuration Overrides: Extend the published config with additional keys:
    'package_name' => [
        'custom_key' => env('CUSTOM_VALUE', 'default'),
    ],
    

Performance

  • Caching: If the package uses Symfony’s cache system, leverage Laravel’s cache drivers (cache()->remember()) for consistency.
  • Lazy Loading: Defer heavy operations (e.g., API calls) until needed to avoid bootstrapping delays.

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.
terminal42/code-quality-tools
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