From 95d0beea3c254cc1a5f29f627297aad36fc3feb6 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 19 Jul 2016 16:50:02 +0200 Subject: [PATCH] Created CLI module --- composer.json | 11 +++++++++-- config/autoload/services.global.php | 2 +- cli-config.php => config/cli-config.php | 2 +- config/config.php | 2 ++ .../CLI/config/cli.config.php | 2 +- .../CLI/src}/Command/GenerateShortcodeCommand.php | 2 +- .../CLI/src}/Command/GetVisitsCommand.php | 2 +- .../CLI/src}/Command/ListShortcodesCommand.php | 2 +- .../CLI/src}/Command/ResolveUrlCommand.php | 2 +- module/CLI/src/Config/ConfigProvider.php | 13 +++++++++++++ .../CLI/src}/Factory/ApplicationFactory.php | 2 +- phpcs.xml | 3 +-- 12 files changed, 33 insertions(+), 12 deletions(-) rename cli-config.php => config/cli-config.php (83%) rename config/autoload/cli.global.php => module/CLI/config/cli.config.php (87%) rename {src/CLI => module/CLI/src}/Command/GenerateShortcodeCommand.php (98%) rename {src/CLI => module/CLI/src}/Command/GetVisitsCommand.php (98%) rename {src/CLI => module/CLI/src}/Command/ListShortcodesCommand.php (98%) rename {src/CLI => module/CLI/src}/Command/ResolveUrlCommand.php (98%) create mode 100644 module/CLI/src/Config/ConfigProvider.php rename {src/CLI => module/CLI/src}/Factory/ApplicationFactory.php (96%) diff --git a/composer.json b/composer.json index 9965ebe6..91f340c1 100644 --- a/composer.json +++ b/composer.json @@ -2,6 +2,7 @@ "name": "shlinkio/shlink", "type": "project", "homepage": "http://shlink.io", + "description": "A PHP-based URL shortener application with analytics and management", "license": "MIT", "authors": [ { @@ -36,12 +37,18 @@ }, "autoload": { "psr-4": { - "Acelaya\\UrlShortener\\": "src" + "Acelaya\\UrlShortener\\": "src", + "Shlinkio\\Shlink\\CLI\\": "module/CLI/src", + "Shlinkio\\Shlink\\Rest\\": "module/Rest/src", + "Shlinkio\\Shlink\\Core\\": "module/Core/src" } }, "autoload-dev": { "psr-4": { - "AcelayaTest\\UrlShortener\\": "tests" + "AcelayaTest\\UrlShortener\\": "tests", + "ShlinkioTest\\Shlink\\CLI\\": "module/CLI/test", + "ShlinkioTest\\Shlink\\Rest\\": "module/Rest/test", + "ShlinkioTest\\Shlink\\Core\\": "module/Core/test" } }, "scripts": { diff --git a/config/autoload/services.global.php b/config/autoload/services.global.php index 4d6cc40e..3277159e 100644 --- a/config/autoload/services.global.php +++ b/config/autoload/services.global.php @@ -1,5 +1,5 @@ get(EntityManager::class); diff --git a/config/config.php b/config/config.php index f835a11c..b27d8173 100644 --- a/config/config.php +++ b/config/config.php @@ -1,4 +1,5 @@ - src - tests + module config public/index.php