From 1e8e023f2070d402c2a0a4b76abe03e467df5d04 Mon Sep 17 00:00:00 2001 From: n3vrax Date: Thu, 25 May 2017 23:14:31 +0300 Subject: [PATCH 1/2] console capabilities added --- CHANGELOG.md | 20 ++++++++++ bin/console.php | 22 +++++++++++ composer.json | 50 ++++++++++++++---------- config/autoload/console.global.php | 18 +++++++++ config/config.php | 2 + src/Console/src/Command/HelloCommand.php | 45 +++++++++++++++++++++ src/Console/src/ConfigProvider.php | 29 ++++++++++++++ 7 files changed, 165 insertions(+), 21 deletions(-) create mode 100644 bin/console.php create mode 100644 config/autoload/console.global.php create mode 100644 src/Console/src/Command/HelloCommand.php create mode 100644 src/Console/src/ConfigProvider.php diff --git a/CHANGELOG.md b/CHANGELOG.md index f29f8925..045ef71a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +## 0.5.0 - unreleased + +### Changed +* Nothing + +### Added +* console capabilities added through dot-console based on zf-console +* bin/console.php bootstrap file(e.g php bin/console.php ) +* see [zf-console documentation](https://github.com/zfcampus/zf-console) for details on how to use console + +### Deprecated +* Nothing + +### Removed +* Nothing + +### Fixed +* Nothing + + ## 0.4.1 - 2017-05-03 ### Changed diff --git a/bin/console.php b/bin/console.php new file mode 100644 index 00000000..53d1cf27 --- /dev/null +++ b/bin/console.php @@ -0,0 +1,22 @@ +get(Application::class); + + $exit = $app->run(); + exit($exit); +}); diff --git a/composer.json b/composer.json index 3d922ccc..16a7b392 100644 --- a/composer.json +++ b/composer.json @@ -14,35 +14,17 @@ }, "require": { "php": "^7.1", - "roave/security-advisories": "dev-master", - "zendframework/zend-expressive": "^2.0.2", - "zendframework/zend-expressive-fastroute": "^2.0", - "zendframework/zend-expressive-twigrenderer": "^1.4", - "zendframework/zend-servicemanager": "^3.3.0", - "zendframework/zend-db": "^2.8", - "zendframework/zend-i18n": "^2.7", - "zendframework/zend-i18n-resources": "^2.5", - "zendframework/zend-captcha": "^2.6", - "zendframework/zendservice-recaptcha": "^3.0", - "zendframework/zend-text": "^2.6", - "zendframework/zend-stdlib": "^3.0", - "zendframework/zend-psr7bridge": "^0.2.2", - "zendframework/zend-config": "^3.1", - "zendframework/zend-config-aggregator": "^0.2.0", - "zendframework/zend-component-installer": "^1.0 || ^0.7.0", - "dotkernel/dot-annotated-services": "^1.1", "dotkernel/dot-authentication-service": "^0.2", "dotkernel/dot-authentication-web": "^0.2", "dotkernel/dot-cache": "^1.1", "dotkernel/dot-controller": "^0.3", - "dotkernel/dot-controller-plugin-flashmessenger": "^0.2", "dotkernel/dot-controller-plugin-authentication": "^0.2", "dotkernel/dot-controller-plugin-authorization": "^0.2", + "dotkernel/dot-controller-plugin-flashmessenger": "^0.2", "dotkernel/dot-controller-plugin-forms": "^0.2", "dotkernel/dot-controller-plugin-mail": "^0.1", "dotkernel/dot-controller-plugin-session": "^0.2", - "dotkernel/dot-mapper": "^0.4", "dotkernel/dot-event": "^0.2", "dotkernel/dot-filter": "^1.1", "dotkernel/dot-flashmessenger": "^0.2", @@ -52,6 +34,7 @@ "dotkernel/dot-inputfilter": "^1.1", "dotkernel/dot-log": "^1.1", "dotkernel/dot-mail": "^0.1", + "dotkernel/dot-mapper": "^0.4", "dotkernel/dot-navigation": "^0.2", "dotkernel/dot-paginator": "^1.1", "dotkernel/dot-rbac": "^0.2", @@ -59,7 +42,25 @@ "dotkernel/dot-session": "^2.0", "dotkernel/dot-twigrenderer": "^0.2", "dotkernel/dot-user": "^0.3", - "dotkernel/dot-validator": "^1.1" + "dotkernel/dot-validator": "^1.1", + "dotkernel/dot-console": "0.1.x-dev", + + "roave/security-advisories": "dev-master", + "zendframework/zend-captcha": "^2.6", + "zendframework/zend-component-installer": "^1.0 || ^0.7.0", + "zendframework/zend-config": "^3.1", + "zendframework/zend-config-aggregator": "^0.2.0", + "zendframework/zend-db": "^2.8", + "zendframework/zend-expressive": "^2.0.2", + "zendframework/zend-expressive-fastroute": "^2.0", + "zendframework/zend-expressive-twigrenderer": "^1.4", + "zendframework/zend-i18n": "^2.7", + "zendframework/zend-i18n-resources": "^2.5", + "zendframework/zend-psr7bridge": "^0.2.2", + "zendframework/zend-servicemanager": "^3.3.0", + "zendframework/zend-stdlib": "^3.0", + "zendframework/zend-text": "^2.6", + "zendframework/zendservice-recaptcha": "^3.0" }, "require-dev": { "phpunit/phpunit": "^6.0.8 || ^5.7.15", @@ -71,7 +72,8 @@ "autoload": { "psr-4": { "Frontend\\App\\": "src/App/src", - "Frontend\\User\\": "src/User/src" + "Frontend\\User\\": "src/User/src", + "Frontend\\Console\\": "src/Console/src" } }, "autoload-dev": { @@ -79,6 +81,12 @@ "FrontendTest\\App\\": "test/App/" } }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/dotkernel/dot-console" + } + ], "scripts": { "post-create-project-cmd": [ "@development-enable" diff --git a/config/autoload/console.global.php b/config/autoload/console.global.php new file mode 100644 index 00000000..98a0cc8e --- /dev/null +++ b/config/autoload/console.global.php @@ -0,0 +1,18 @@ + [ + //'name' => 'DotKernel Console', + //'version' => '1.0.0', + + 'commands' => [ + [ + 'name' => 'hello', + 'description' => 'Hello, World! command example', + 'handler' => HelloCommand::class, + ], + ] + ] +]; diff --git a/config/config.php b/config/config.php index 2031c692..161db010 100644 --- a/config/config.php +++ b/config/config.php @@ -51,10 +51,12 @@ \Dot\Twig\ConfigProvider::class, \Dot\User\ConfigProvider::class, \Dot\Validator\ConfigProvider::class, + \Dot\Console\ConfigProvider::class, //application \Frontend\User\ConfigProvider::class, \Frontend\App\ConfigProvider::class, + \Frontend\Console\ConfigProvider::class, // Load application config in a pre-defined order in such a way that local settings // overwrite global settings. (Loaded as first to last): diff --git a/src/Console/src/Command/HelloCommand.php b/src/Console/src/Command/HelloCommand.php new file mode 100644 index 00000000..dcea8593 --- /dev/null +++ b/src/Console/src/Command/HelloCommand.php @@ -0,0 +1,45 @@ +writeLine( + << $this->getDependencies(), + ]; + } + + public function getDependencies() + { + return []; + } +} From c62371c240f4d194ed678786940f231e58d980aa Mon Sep 17 00:00:00 2001 From: n3vrax Date: Fri, 26 May 2017 20:21:16 +0300 Subject: [PATCH 2/2] preparing for release --- CHANGELOG.md | 2 +- composer.json | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 045ef71a..188cb6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.5.0 - unreleased +## 0.5.0 - 2017-05-26 ### Changed * Nothing diff --git a/composer.json b/composer.json index 16a7b392..65756294 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "dotkernel/dot-twigrenderer": "^0.2", "dotkernel/dot-user": "^0.3", "dotkernel/dot-validator": "^1.1", - "dotkernel/dot-console": "0.1.x-dev", + "dotkernel/dot-console": "^0.1", "roave/security-advisories": "dev-master", "zendframework/zend-captcha": "^2.6", @@ -81,12 +81,6 @@ "FrontendTest\\App\\": "test/App/" } }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/dotkernel/dot-console" - } - ], "scripts": { "post-create-project-cmd": [ "@development-enable" @@ -108,8 +102,8 @@ }, "extra": { "branch-alias": { - "dev-master": "0.4-dev", - "dev-develop": "0.5-dev" + "dev-master": "0.5-dev", + "dev-develop": "0.6-dev" } } }