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

Util Bundle Laravel Package

ecommit/util-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

First Steps

  1. Check Deprecation Notice Since this bundle is deprecated, verify if any of its features are critical to your project. If so, evaluate the suggested replacements (e.g., ecommit/deploy-rsync-bundle for deployment tasks).

  2. Installation (if absolutely necessary)

    composer require ecommit/util-bundle
    

    Register the bundle in config/bundles.php:

    return [
        // ...
        Ecommit\UtilBundle\EcommitUtilBundle::class => ['all' => true],
    ];
    
  3. First Use Case If using the Util class (now replaced by ecommit/scalar-values), check for legacy code dependencies:

    use Ecommit\UtilBundle\Util; // Avoid; migrate to scalar-values
    

Implementation Patterns

Legacy Workflow (If Still in Use)

  1. Command-Based Tasks

    • Deployments: If using DeployCommand, migrate to ecommit/deploy-rsync-bundle:
      php bin/console ecommit:deploy-rsync
      
    • Entity Generation: Replace GenerateEntitiesCommand with:
      php bin/console make:entity
      php bin/console ecommit:generate-entities
      
  2. Doctrine Integration

    • For ClearEntityManager, use ecommit/doctrine-orm-refetch:
      use Ecommit\DoctrineOrmRefetch\ClearEntityManager;
      $clearer = new ClearEntityManager();
      $clearer->clear();
      
  3. Twig Extensions

    • If ecommit_util_table was used, replace with custom Twig filters or Symfony’s built-in table rendering.
  4. Cache Management

    • Migrate from Cache class to Symfony’s Cache component:
      use Symfony\Contracts\Cache\CacheInterface;
      $cache = $container->get('cache.app');
      

Gotchas and Tips

Pitfalls

  1. Deprecation Risks

    • Avoid writing new code relying on this bundle. Features may break without notice.
    • Search for usages:
      grep -r "Ecommit\\UtilBundle" .
      
  2. Command Conflicts

    • If InstallCommand/UpdateCommand were used, replace with custom scripts or Symfony’s MakeCommand.
  3. APCu Cache

    • ClearApcuCommand has no replacement; use apcu_clear_cache() or Symfony’s cache system.
  4. Locale Comparison

    • CompareLocalesCommand lacks a direct replacement; implement a custom solution with Symfony’s translation tools.

Debugging Tips

  • Check for Hidden Dependencies: Run composer why-not ecommit/util-bundle to identify blocking dependencies.
  • Log Warnings: Enable Symfony’s debug mode to catch deprecation warnings:
    // config/packages/dev/debug.php
    return [
        'debug' => true,
        'deprecation_warnings' => true,
    ];
    

Extension Points (If Forking)

  • If maintaining a fork, prioritize:
    • Replacing Util class with ecommit/scalar-values.
    • Adding Symfony 6+ compatibility.
    • Documenting migration paths for all removed features.
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
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