zfcampus / zf-console Goto Github PK
View Code? Open in Web Editor NEWCreate console applications in PHP
License: BSD 3-Clause "New" or "Revised" License
Create console applications in PHP
License: BSD 3-Clause "New" or "Revised" License
Hello.
In multiple applications, every time I use a console route I get the following warning:
HP Warning: cli_set_process_title(): cli_set_process_title had an error: Not initialized correctly in /Users/geeh/www/modules.zendframework.com/vendor/zfcampus/zf-console/src/Application.php on line 534
This happens both inside and outside of ZF2 app.
Thank you.
Hello,
What is the best way to remove/disable the default "autocomplete" route?
Thank you.
Per @slaff:
--directives=session.save_handler=cluster&something=else
, which would be parsed to the array ["session.save_handler" => "cluster", "something" => "else"]
. PHP's parse_str()
could be used for an initial implementation; however, it munges keys to valid PHP variable names, and thus a custom implementation should likely be used.--directives='{"session.save_handler": "cluster", "something": "else"}'
, which would parse to the same value as in the QueryString example above.--modules=foo,bar,baz
would be come ['foo', 'bar', 'baz']
. The delimiter would be a comma by default, but could be specified during instantiation (or, if using the FilterPluginManager, when requesting the filter).How to create this console router?
myscript.php zone <command> <args>
Command can be: import
and export
.
<args>
can be path or id
Some problems:
zone
must print list of available commands (like 'Available commands: import, export')
zone import (without any other args)
must print help for zone import
command (like 'usage zone import /path/to/file.json`)
zone export
must print help for zone export
command (like 'usage zone export ')
and now
zone import file.json
or
zone export 100
must launch any one or two functions from \Foo\Bar
class
How can i do this?
The last commits merged since 1.0.3 are not tagged with a version number. If I install this via composer I cannot use:
"require": {
"zfcampus/zf-console": "1.*"
},
I must use:
"require": {
"zfcampus/zf-console": "dev-master*"
},
Could you gave example how to do dependency injection from service manager ( container interop ) that define in the configuration to the handler ?
I've read your HUGE and SOFISTICATED instruction on how to install the app...
and I did not found how to RUN it.
Can you please add this in the 1st paragraph?
Is there a way or a suggested solution to disable banner and footer from a command-line argument?
I would like to be able to use an argument like --disable_banner to disable the banner. This would be useful when piping the output but I would like to have control it from the command line.
I figure that I could preparse the arguments before $app->run() is called to look for the --quiet argument.
Any suggestions?
Thanks
Make it easy for every PHP developer to start creating a ZF-CLI application.
List of projects that use zf-console:
(to complete)
Now is little bit tricky to eg. log errors in zf-console.
I like the idea of new error handler in stratigility. Especially error response (message) generation, triggering listeners (useful for logging) etc.
Do you have any idea how this implement in zf-console? Your opinions?
Add default autocomplete command based on the code from here: zend-patterns/ZendServerSDK@7a663f1 .
I thought of adding the ZF2 ServiceManager
to handle the commands. I think it would make it much easier to create factories to create command instances. Or we could even add all objects to the ServiceManager
, especially the Application
instance. That would make it much easier to inject the Application
instance to the HelpCommand
as well. We could even refactor the Application
class and pull out the standard commands to external classes (like the HelpCommand
). An extra interface could standardize the __invoke()
methods for all commands.
Would the effort be worth it or would it introduce an unwanted complexity or overhead?
as DefaultRouteMatcher
and RouteMatcherInterface
was introduced in Zend 2.3.0 release the composer.json
requirement specified as
"zendframework/zend-console": "~2.0"
could not met the proper version of ZendConsole which cause the errors when importing
use Zend\Console\RouteMatcher\DefaultRouteMatcher;
use Zend\Console\RouteMatcher\RouteMatcherInterface;
minimal version requirements should be reviewed to prevent that issue
Hi,
I started using this microframework about a week ago. Works great especially when integrating with a ZF3 framework or resuing existing ZF3 modules.
I wrote a lot of route handlers and got a little lazy at figuring out what the __invoke function should have as arguments. So I wrote a Route Interface definition to ensure compliance with how handlers are invoked.
If you are interested, I forked the project and added RouteInterface.php under the src folder.
I am quite new to GitHub as a contributor and I am not sure about how to do pull requests and such.
Thanks
Eric
What I am missing is good default error handler that prints information based on a template set in the configuration. Something similar to:
======================================================================
The application has thrown an exception!
======================================================================
:className
:message
when not in debug mode and the full exception stack trace when in debug mode.
Hi,
I would like to provide the parameter name with positional value parameter.
Currently, if I pass the name it appends that name to the value.
Example:
php script.php build project=1 name=Test
[
'project' => 1,
'name' => 'Test',
]
[
'project' => 'project=1',
'name' => 'name=Test',
]
I know, I can add an optional parameter like [--project=1] and then add a check on code level. But I don't want to do this.
Is there any possibility we can achieve this?
Any help would be much appreciated.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.