ZF2 command line tool?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

ZF2 command line tool?

Artur Bodera
Hello!

ZF1 had a tool for command line (Zend_Tool) with different functions,
including creating new application in target dir, add controller etc.


What functions do you want to see in new ZF2 Tool ?

Some ideas from me:

1) Create a skeleton application i.e.  > zf2 create app ./my/dir
2) Add or remove a module  > zf2 add module ZfcUser )
3) Add or remove controllers > zf2 add controller UserController
4) Check for updates > zf2 update  > zf2 update SomeModule
5) List available modules > zf2 list modules *User*
6) ...

What else?


--
      __
     /.)\   +48 695 600 936
     \(./   [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [zf-contributors] ZF2 command line tool?

Andreas Heigl
Am 23.11.12 18:44, schrieb Artur Bodera:

> Hello!
>
> ZF1 had a tool for command line (Zend_Tool) with different functions,
> including creating new application in target dir, add controller etc.
>
>
> What functions do you want to see in new ZF2 Tool ?
>
> Some ideas from me:
>
> 1) Create a skeleton application i.e.  > zf2 create app ./my/dir
> 2) Add or remove a module  > zf2 add module ZfcUser )
> 3) Add or remove controllers > zf2 add controller UserController
> 4) Check for updates > zf2 update  > zf2 update SomeModule
> 5) List available modules > zf2 list modules *User*
> 6) ...
>
Activate a module > zf2 activate module => would insert the module in
application.config and create symlinks for css, js etc of the module to
the public-folder

--
                                                              ,,,
                                                             (o o)
+---------------------------------------------------------ooO-(_)-Ooo-+
| Andreas Heigl                                                       |
| mailto:[hidden email]                  N 50°22'59.5" E 08°23'58" |
| http://andreas.heigl.org                       http://hei.gl/wiFKy7 |
+---------------------------------------------------------------------+
| http://hei.gl/root-ca                                               |
+---------------------------------------------------------------------+


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [zf-contributors] ZF2 command line tool?

Raphael de Almeida
An active module could add new functions on ZF2 Tool

On Fri, Nov 23, 2012 at 6:05 PM, Andreas Heigl <[hidden email]> wrote:

> Am 23.11.12 18:44, schrieb Artur Bodera:
> > Hello!
> >
> > ZF1 had a tool for command line (Zend_Tool) with different functions,
> > including creating new application in target dir, add controller etc.
> >
> >
> > What functions do you want to see in new ZF2 Tool ?
> >
> > Some ideas from me:
> >
> > 1) Create a skeleton application i.e.  > zf2 create app ./my/dir
> > 2) Add or remove a module  > zf2 add module ZfcUser )
> > 3) Add or remove controllers > zf2 add controller UserController
> > 4) Check for updates > zf2 update  > zf2 update SomeModule
> > 5) List available modules > zf2 list modules *User*
> > 6) ...
> >
>
> Activate a module > zf2 activate module => would insert the module in
> application.config and create symlinks for css, js etc of the module to
> the public-folder
>
> --
>                                                               ,,,
>                                                              (o o)
> +---------------------------------------------------------ooO-(_)-Ooo-+
> | Andreas Heigl                                                       |
> | mailto:[hidden email]                  N 50°22'59.5" E 08°23'58" |
> | http://andreas.heigl.org                       http://hei.gl/wiFKy7 |
> +---------------------------------------------------------------------+
> | http://hei.gl/root-ca                                               |
> +---------------------------------------------------------------------+
>
>


--
[]ão,

Raphael de Almeida

http://raphaeldealmeida.net
http://www.twitter.com/raph_almeida
http://rubyonrio.org | http://phprio.org |
http://androidinrio.com.br<http://www.androidinrio.com.br/blog/>
  http://www.arduinrio.cc | http://dojorio.org
Reply | Threaded
Open this post in threaded view
|

Re: [zf-contributors] ZF2 command line tool?

Tomáš Fejfar
ZF2 tool should be a module itself :)

On Fri, Nov 23, 2012 at 8:21 PM, Raphael de Almeida <[hidden email]>wrote:

> An active module could add new functions on ZF2 Tool
Reply | Threaded
Open this post in threaded view
|

Re: [zf-contributors] ZF2 command line tool?

Anthony Shireman
+1 for being a module itself

https://github.com/Inforbiro/ZF2-Code-Generator

Is a pretty good start. Only supports module creation at this point. But I
bet by Monday with a few PR it could do even more.



On Fri, Nov 23, 2012 at 11:35 AM, Tomáš Fejfar <[hidden email]>wrote:

> ZF2 tool should be a module itself :)
>
>
> On Fri, Nov 23, 2012 at 8:21 PM, Raphael de Almeida <[hidden email]>wrote:
>
>> An active module could add new functions on ZF2 Tool
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [zf-contributors] ZF2 command line tool?

Artur Bodera
In reply to this post by Tomáš Fejfar
On Fri, Nov 23, 2012 at 8:35 PM, Tomáš Fejfar <[hidden email]>wrote:

> ZF2 tool should be a module itself :)
>

It already is :-)
https://github.com/zendframework/ZFTool

Will also come as a standalone PHAR for composer-free, git-free
installation.

--
      __
     /.)\   +48 695 600 936
     \(./   [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [zf-contributors] ZF2 command line tool?

Artur Bodera
In reply to this post by Raphael de Almeida
On Fri, Nov 23, 2012 at 8:21 PM, Raphael de Almeida <[hidden email]>wrote:

> An active module could add new functions on ZF2 Tool
>

It already can!

Any module can add one or more command-line commands:

http://framework.zend.com/manual/2.0/en/modules/zend.console.introduction.html#writing-console-routes



--
      __
     /.)\   +48 695 600 936
     \(./   [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [zf-contributors] ZF2 command line tool?

Gregory
I haven't looked, but it makes me wonder if the tool can list all available
commands, i,e you don't have to target a specific module to see the list of
commands for that module?

That hints towards the thought which I'm not sure how feasible or
absolutely why/possible, but for example, listing/dumping the configuration
for the entire application. Service definitions? Autoloader configuration?
Registered Listeners? Anything that is configured during the bootstrap
process? Not sure if routes could be done? Available Events?


On Sat, Nov 24, 2012 at 8:42 AM, Artur Bodera <[hidden email]> wrote:

> On Fri, Nov 23, 2012 at 8:21 PM, Raphael de Almeida <[hidden email]>wrote:
>
>> An active module could add new functions on ZF2 Tool
>>
>
> It already can!
>
> Any module can add one or more command-line commands:
>
>
> http://framework.zend.com/manual/2.0/en/modules/zend.console.introduction.html#writing-console-routes
>
>
>
> --
>       __
>      /.)\   +48 695 600 936
>      \(./   [hidden email]
>
>
>
>



--
Greg
Reply | Threaded
Open this post in threaded view
|

Re: [zf-contributors] ZF2 command line tool?

Artur Bodera
On Sat, Nov 24, 2012 at 5:14 PM, Greg <[hidden email]> wrote:

> I haven't looked, but it makes me wonder if the tool can list all
> available commands, i,e you don't have to target a specific module to see
> the list of commands for that module?
>

It does list all commands.
And you can make your modules add-on to that and list their commands too.

You do NOT have to target specific "provider", as it was in ZF1. This means
that running your application from command line will display all available
commands from all enabled modules in your application.

More details here:
http://www.zendframework.com/manual/2.0/en/modules/zend.console.modules.html

--
      __
     /.)\   +48 695 600 936
     \(./   [hidden email]