symfony-console


Can I use Symfony new to create a console-only project?


Instead of starting a project via symfony new <prj_name>, I used composer require symfony/console. I am unable to access any of the generate commands.
Am I going about this incorrectly? If I use composer require how do I automate the creation of the initial bin/console?
So in the existing project that I started using only composer require symfony/console and had to manually create the console.php file, I did the following:
Require the Sensio Bundle:
$ composer require sensio/generator-bundle
Then, in console.php, require the Sensio Bundle
.
.
.
use Sensio\Bundle\GeneratorBundle\Command\GenerateCommandCommand;
.
.
.
$console->add(new GenerateCommandCommand());
Now when I run the console.php file, the help text shows a link to that command.
$ php console.php
Console Tool
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
generate
generate:command Generates a console command

Related Links

Getting symfony console arguments after double dash
Can I use Symfony new to create a console-only project?

Categories

HOME
android
apache-flink
telegram
fpga
toolbox
jwplayer
android-json
jax-ws
trac
flume
discrete-mathematics
octave
vimdiff
android-securityexception
cmdb
tput
frequency-distribution
renjin
cumulocity
bitnami
altera
modbus-tcp
easyphp
jersey-1.0
oledb
squashfs
jquery-ias
appirater
has-and-belongs-to-many
bringtofront
jaws
python-2.6
card.io
nested-lists
flatmap
ods
linqpad
signal-strength
uiimage
puredata
httrack
jboss-4.2.x
automapper-5
user-defined-fields
bluez
openblas
subnet
boo
cpu-cache
universal-analytics
renaming
gets
ziparchive
vulcanize
delta
deep
spreadjs
gcloud-ruby
contentcontrol
maybe
intel-c++
pax-exam
toolkit
sapscript
doctype
batik
eoferror
branch-and-bound
sql-server-data-tools
rdflib
airbrake
apache-commons-daemon
cwrsync
alloy-ui
shopizer
broadband
phpldapadmin
contrast
teaspoon
with-statement
live555
matrix-inverse
square-bracket
sbcl
eclipse-kepler
hibernate-entitymanager
facebook-timeline
octal
swfobject
resource-management
window-decoration
qglwidget
addchild
application-verifier
echo3
complex-event-processing
cldc
blind

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App