pyro/custom-install

提供额外的PyroCMS安装配置、操作和命令。排除/包含要安装的模块、扩展或种子,钩子、回调等

1.0.0 2020-02-14 10:22 UTC

This package is auto-updated.

Last update: 2024-09-23 16:36:55 UTC


README

此包允许您

  • 排除某些模块或扩展以进行安装
  • 排除某些模块或扩展以进行种子
  • 跳过某些安装步骤
  • 从步骤开始安装
  • 安装过程中抛出的异常将询问您是否要继续到下一个步骤或
  • 将PyroCMS插件作为composer依赖项安装,而不自动安装它们
  • 忽略琐碎的错误
  • 等等...

安装

提供者

\Pyradic\CustomInstall\CustomInstallServiceProvider

配置

使用提供的配置。一些示例

return [
    // call artisan commands before running install
    'call_before'          => [
        ['db:seed', ['--class' => 'Name\\Space\\Class']]
    ],
    
    // dispatch bus commands before running install
    'dispatch_before'      => [
        function($app){
            return new \Name\Space\PreInstallActions();
        }
    ],
    
    // call artisan commands after running install
    'call_after'           => [
        ['db:seed', ['--class' => 'Namespace\\To\\Class']]
    ],
    
    // dispatch bus commands after running install
    'dispatch_after'       => [
        function($app){
            return new \Name\Space\PostInstallActions();
        }
    ],
    
    // --skip_steps=11,22,46
    'skip_steps'           => [
        // 11, 22, 46
    ],
    
    // --start_from_step=1
    'start_from_step'      => 1,
    
    // --ignore_exceptions
    // if true, asks to continue 
    // if true + no-interaction, continues with warning 
    'ignore_exceptions'    => false, 
    
    // skip seeds of certain modules 
    'skip_seed'            => [
        'anomaly.module.users',
    ],
    
    // `include` takes precedence over `exclude`
    'include'              => [
        'pyro.module.*',
        'anomaly.module.preferences',
        'anomaly.module.configuration',
        'anomaly.module.dashboard',
        'anomaly.module.repeaters',
        'anomaly.module.search',
        'anomaly.module.settings',
        'anomaly.module.users',
        'anomaly.extension.default_authenticator',
        'anomaly.extension.html_block',
        'anomaly.extension.html_widget',
        'anomaly.extension.private_storage_adapter',
        'anomaly.extension.robots',
        'anomaly.extension.sitemap',
        'anomaly.extension.throttle_security_check',
        'anomaly.extension.user_security_check',
        'anomaly.extension.wysiwyg_block',
        'anomaly.extension.xml_feed_widget',    
    ],
    'exclude'              => [
        '*' // excluding all, which makes it only install addons defined in `include` 
    ],
    'skip_base_migrations' => false, // skip database/migrations/*
    'skip_base_seeds'      => false, // skip database/seeds/*
];

install 命令

您可能更喜欢在控制台中使用 --help 选项进行检查。
基本上,所有 custom_install.php 配置值都可以使用选项来覆盖。

用法

  • install [--ready] [--call_before [CALL_BEFORE]] [--dispatch_before [DISPATCH_BEFORE]] [--call_after [CALL_AFTER]] [--dispatch_after [DISPATCH_AFTER]] [--skip_steps [SKIP_STEPS]] [--start_from_step [START_FROM_STEP]] [--ignore_exceptions] [--skip_install [SKIP_INSTALL]] [--skip_seed [SKIP_SEED]] [--include [INCLUDE]] [--exclude [EXCLUDE]] [--skip_base_migrations] [--skip_base_seeds] [--] [<method>]
  • install list

参数

method

方法名称

  • 是否必需:否
  • 是否为数组:否
  • 默认值:'install'

选项

--ready

指示安装程序应使用现有的.env文件。

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:false

--call_before

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--dispatch_before

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--call_after

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--dispatch_after

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--skip_steps

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--start_from_step

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--ignore_exceptions

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--skip_install

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--skip_seed

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--include

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--exclude

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--skip_base_migrations

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--skip_base_seeds

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--help|-h

显示此帮助信息

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--quiet|-q

不输出任何消息

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--verbose|-v|-vv|-vvv

增加消息的详细程度:1 为正常输出,2 为更多详细输出,3 为调试

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--version|-V

显示此应用程序版本

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--ansi

强制ANSI输出

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--no-ansi

禁用ANSI输出

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--no-interaction|-n

不询问任何交互式问题

  • 接受值:否
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--env

命令应在哪个环境中运行

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值

--app

此命令应在哪个应用程序下运行。

  • 接受值:是
  • 值是否必需:否
  • 是否多个:否
  • 默认值:在 custom_install.php 配置文件中此选项的值