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
httparty
adal
design-patterns
paraview
gdb
character-encoding
pascal
saml-2.0
apiblueprint
edge
rds
mips
jquery-ui
nuget-package
pkcs#11
rtf
frequency-distribution
magnetic-cards
qsqlquery
heat
bitnami
gruntfile
html5-appcache
sigma.js
topology
charles
asp.net-core-webapi
zxing
google-cloud-print
beautifier
exchangewebservices
gp
failover
complex-numbers
github3.py
classcastexception
python-import
sql-delete
connection-pool
password-protection
diacritics
p4merge
naming
ssrs-2014
contract
jide
yii2-api
vugen
boxing
cup
lsyncd
offline.js
donations
mapxtreme
winusb
qtplugin
windows-azure-queues
x-tag
shopping
freepbx
cda
phpwebsocket
opl
toolkit
iced-coffeescript
typemock
matlab-deployment
rrule
execve
iso-prolog
rmysql
raygun
template-deduction
live555
functional-java
spring-remoting
multitasking
gd-graph
ice-cube
mkv
extconf.rb
jdb
mapping-by-code
cruisecontrol.rb
non-clustered-index
aspmenu
message-passing
addchild
skype4java
lobo-cobra
int64
java1.4
commercial-application

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