php-cli icon indicating copy to clipboard operation
php-cli copied to clipboard

Group commands into categories

Open dimtrovich opened this issue 3 years ago • 4 comments

see https://github.com/adhocore/php-cli/issues/68

dimtrovich avatar Jul 08 '22 17:07 dimtrovich

thanks a lot, would you wait a little for me to review it sometimes next week :)

adhocore avatar Jul 09 '22 05:07 adhocore

btw what do you think about this? https://github.com/adhocore/php-cli/pull/new/68-command-group (i had hacked on this before seeing your PR)

image


<?php

$app = new Ahc\Cli\Application('console', '0.0.1');

$app
    ->command('db:create', 'db create', 'dc')->tap()
    ->command('app:init', 'app init', 'ai')->tap()
    ->command('routelist', 'route list', 'rl')->tap()
    ->command('db:seed', 'db seed', 'ds')->tap()
    ->command('routegen', 'route gen', 'rg')->tap()
    ->command('app:env', 'app env', 'ae')->tap()
;

$app->handle($_SERVER['argv'] ?? []);

adhocore avatar Jul 09 '22 06:07 adhocore

thanks a lot, would you wait a little for me to review it sometimes next week :)

Hi!!! I've been waiting for your response ever since!!! have you forgotten 😒😢

dimtrovich avatar Sep 12 '22 07:09 dimtrovich

helo, i was going thru rough times lately. would you pls try to align the approach and styling similar to https://github.com/adhocore/php-cli/pull/new/68-command-group (it would be nice to have as little code change as possible)

adhocore avatar Sep 12 '22 11:09 adhocore

hi, could you pls try to apply the feedback, add docs to readme and make the build pass? so i can accept the PR as hacktoberfest-accepted on your behalf. (or if you lost interest on it then we can close this PR as well)

adhocore avatar Oct 01 '22 14:10 adhocore

ok, I'll put the comments on all my edits. for code alignment, it would be interesting if you set up a coding style (with cs-fixer for example)

dimtrovich avatar Oct 01 '22 16:10 dimtrovich

i think you misunderstood. i meant this:

would you pls try to align the approach and styling similar to adhocore/php-cli/pull/new/68-command-group (it would be nice to have as little code change as possible)

adhocore avatar Oct 02 '22 11:10 adhocore

helo @dimtrovich , i have fixed it in #72, and released v1.2.0 with credits to you as well

adhocore avatar Oct 08 '22 15:10 adhocore