From 1b073038cb5e1d3fc03bb4f7d04d8da337dd8450 Mon Sep 17 00:00:00 2001 From: Daniel Bannert Date: Sat, 8 Sep 2018 21:08:48 +0200 Subject: [PATCH] fixed information about configurators changed exception message --- README.md | 16 +++++++++------- doc/CONFIGURATORS.md | 38 ++++++++++++++++++++++--------------- src/Automatic/Automatic.php | 2 +- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 22b973fc..941ebb1c 100644 --- a/README.md +++ b/README.md @@ -90,16 +90,18 @@ This means you can execute the following command: `composer create-project your/ Read the [skeleton documentation](doc/SKELETON.md) to learn everything about how to create skeletons for your own application. -Narrowspark Automatic Configuration are defined in a `automatic.json` file or in the composer extra key `automatic` and can contain any number of other files and directories. For example, this is the `automatic.json` for `viserio/console`: +Narrowspark Automatic tasks are defined in a `automatic.json` file or in the composer extra key `automatic` and can contain any number of other files and directories. For example, this is the `automatic.json` for `viserio/console`: ```json { - "providers": { - "Viserio\\Component\\Console\\Provider\\ConsoleServiceProvider": ["global"], - "Viserio\\Component\\Console\\Provider\\LazilyCommandsServiceProvider": ["global"] - }, - "proxies": { - "Viserio\\Component\\Console\\Proxy\\Console": ["global"] + "configurators": { + "providers": { + "Viserio\\Component\\Console\\Provider\\ConsoleServiceProvider": ["global"], + "Viserio\\Component\\Console\\Provider\\LazilyCommandsServiceProvider": ["global"] + }, + "proxies": { + "Viserio\\Component\\Console\\Proxy\\Console": ["global"] + } }, "script-extenders": [ "Viserio\\Component\\Console\\Automatic\\CerebroScriptExtender" diff --git a/doc/CONFIGURATORS.md b/doc/CONFIGURATORS.md index 5d61cbbd..5a35f8a2 100644 --- a/doc/CONFIGURATORS.md +++ b/doc/CONFIGURATORS.md @@ -9,7 +9,7 @@ Configurators define the different tasks executed when installing a dependency, The package only contain the tasks needed to install and configure the dependency, because Narrowspark Automatic Configurators are smart enough to reverse those tasks when uninstalling and unconfiguring the dependencies. -Narrowspark Automatic comes with several types of tasks, which are called **configurators**: `copy`, `env`, `composer-scripts`, `gitignore`, and `post-install-output`. +Narrowspark Automatic comes with several types of tasks, which are called **configurators**: `copy`, `env`, `composer-scripts`, `gitignore` and a special configurator `post-install-output`. ### Copy Configurator `copy` @@ -20,8 +20,10 @@ directory of the application: ```json { - "copy": { - "bin/check.php": "%BIN_DIR%/check.php" + "configurators": { + "copy": { + "bin/check.php": "%BIN_DIR%/check.php" + } } } ``` @@ -49,8 +51,10 @@ files stored in the root of your application project: ```json { - "env": { - "APP_ENV": "dev" + "configurators": { + "env": { + "APP_ENV": "dev" + } } } ``` @@ -76,9 +80,11 @@ The value is an associative array where the key is the script to execute (includ ```json { - "composer-scripts": { - "echo \"hallo\";": "php-script", - "bash -c \"echo hallo\"": "script" + "configurators": { + "composer-scripts": { + "echo \"hallo\";": "php-script", + "bash -c \"echo hallo\"": "script" + } } } ``` @@ -119,12 +125,14 @@ each line): ```json { - "gitignore": [ - ".env", - "/public/bundles/", - "/var/", - "/vendor/" - ] + "configurators": { + "gitignore": [ + ".env", + "/public/bundles/", + "/var/", + "/vendor/" + ] + } } ``` @@ -132,7 +140,7 @@ Similar to other configurators, the contents are copied into the `.gitignore` file and wrapped with section separators (``###> your-package-name-here ###``) that must not be removed or modified. -Post-install output Configurator `post-install-output` +The package messages `post-install-output` Displays contents in the command console after the package has been installed. Avoid outputting meaningless information and use it only when you need to show diff --git a/src/Automatic/Automatic.php b/src/Automatic/Automatic.php index 12e9dcb6..756de94c 100644 --- a/src/Automatic/Automatic.php +++ b/src/Automatic/Automatic.php @@ -1134,7 +1134,7 @@ private function showWarningOnRemainingConfigurators( if (\count($packageConfigurators) !== 0) { $this->container->get(IOInterface::class)->writeError(\sprintf( - 'No configurators were run for [%s] in [%s]', + 'Configurators [%s] did not run for package [%s]', \implode(', ', $packageConfigurators), $package->getPrettyName() ));