qoliber/magerun

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:magento2-component

1.0.0 2025-02-25 08:46 UTC

This package is auto-updated.

Last update: 2025-02-25 08:47:23 UTC


README

Command Lines for Magerun to

  • data-trimmed DB dumps (additional tables added)
  • compile themes and run production mode 95% faster.
  • optimize NonComposerComponentRegistration.php file (saves between 30-80ms on page loading times) For more info visit the YAML file.

Installation

Require the package

composer require qoliber/magerun

New Commands:

  • qoliber:magerun:theme:active: Get list of used themes

    Example:

    www-data@www-data@mageos-php-fpm:/var/www/html$ ./n98-magerun2.phar qoliber:magerun:theme:active
    --theme Qoliber/default --theme Magento/luma --theme Hyva/default --theme Magento/backend adsasd
  • qoliber:magerun:locale:active: Get list of active locales

    Example:

    www-data@mageos-php-fpm:/var/www/html$ ./n98-magerun2.phar qoliber:magerun:locale:active
    en_US pl_PL
    • qoliber:magerun:mode:production: Set production mode but compile only used themes and locales

      Only compiles required themes and locales that are active, examples. Static compilation:

      php bin/magento deploy:mode:set production n98-magerun2.phar qoliber:magerun:mode:production
      2 store views
      2 locales
      2 store views
      2 locales
      Time: Execution time: 49.60s Execution time: 4.13s
      8 store views
      2 locales
      8 store views
      2 locales
      Time: Execution time: 373.39s Execution time: 5.57s
  • qoliber:magerun:non-composer-autoloader: Removes glob from app/etc/NonComposerComponentRegistration.php - use only in production mode

    Replaces content of app/etc/NonComposerComponentRegistration.php file like this:

      $registrationFiles = array (
          0 => '/var/www/html/app/code/MerchantUniqueFeatures/ShippingBoxes/registration.php',
          1 => '/var/www/html/app/code/MerchantUniqueFeatures/Showoutofstockprice/registration.php',
          2 => '/var/www/html/app/code/MerchantUniqueFeatures/Extensions/registration.php',
          3 => '/var/www/html/app/code/MerchantUniqueFeatures/UrlOptimization/registration.php',
          4 => '/var/www/html/app/code/MerchantUniqueFeatures/LayoutProcessorPlugin/registration.php',
          5 => '/var/www/html/app/code/MerchantUniqueFeatures/AutoAssignSources/registration.php',
          6 => '/var/www/html/app/code/MerchantUniqueFeatures/StockFilter/registration.php',
          7 => '/var/www/html/app/code/MerchantUniqueFeatures/Pay2Ship/registration.php',
          //
          97 => '/var/www/html/app/design/frontend/MerchantUniqueTheme/Theme1/registration.php',
          98 => '/var/www/html/app/design/frontend/MerchantUniqueTheme/Theme2/registration.php',
    [...]

Enjoy, @qoliber team