Class: ShopifyCLI::PHPDeps
- Inherits:
-
Object
- Object
- ShopifyCLI::PHPDeps
- Includes:
- SmartProperties
- Defined in:
- lib/shopify_cli/php_deps.rb
Overview
ShopifyCLI::PHPDeps ensures that all PHP dependencies are installed for projects.
Class Method Summary collapse
-
.install(ctx, verbose = false) ⇒ Object
Proxy to instance method ShopifyCLI::PHPDeps.new.install.
Instance Method Summary collapse
-
#install(verbose = false) ⇒ Object
Installs all of a project’s PHP dependencies using Composer.
Class Method Details
.install(ctx, verbose = false) ⇒ Object
Proxy to instance method ShopifyCLI::PHPDeps.new.install.
#### Parameters
-
‘ctx`: running context from your command
-
‘verbose`: whether to run the installation tools in verbose mode
#### Example
ShopifyCLI::PHPDeps.install(ctx)
23 24 25 |
# File 'lib/shopify_cli/php_deps.rb', line 23 def self.install(ctx, verbose = false) new(ctx: ctx).install(verbose) end |
Instance Method Details
#install(verbose = false) ⇒ Object
Installs all of a project’s PHP dependencies using Composer.
#### Parameters
-
‘verbose`: whether to run the installation tools in verbose mode
#### Example
# context is the running context for the command
ShopifyCLI::PHPDeps.new(context).install(true)
38 39 40 41 42 43 44 45 46 |
# File 'lib/shopify_cli/php_deps.rb', line 38 def install(verbose = false) title = ctx.("core.php_deps.installing") success = ctx.("core.php_deps.installed") failure = ctx.("core.php_deps.error.install_error") CLI::UI::Frame.open(title, success_text: success, failure_text: failure) do composer(verbose) end end |