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
go
microsoftgraph
awk
time-complexity
codenvy
apache-flink
fpga
character-encoding
yahoo-finance
components
gradient
vscode-extensions
pdfbox
edge
database-normalization
carousel
emscripten
web-hosting
square
nstableheaderview
rcloud
fosrestbundle
categorical-data
minecraft-forge
startup
dynatrace
3nf
package-managers
searchview
fileserver
selinux
sar
google-maps-autocomplete
symbols
dpdk
imageresizer
zxing
beta
game-theory
motion-detection
asymptotic-complexity
tizen-tv
scrollview
livelink
anki
database-comparison
keras-layer
dynamic-jasper
pop3
lubridate
engine.io
xdocreport
flatmap
protein-database
metaprogramming
spring-mvc-test
news
setup.py
laravel-elixir
clang++
apache-directory
httr
getchar
gitlist
bluez
page-replacement
dt
mathcad
pocketsphinx-android
vcloud-director-rest-api
rocks
stripe-connect
flex-monkey
resourcemanager
neon
cifilter
google-query-language
fuzzywuzzy
exim4
crouton-os
state-restoration
vhosts
toran-proxy
gocql
mod-proxy
sql-server-data-tools
mirror
bufferedinputstream
j-security-check
exceldatareader
human-computer-interface
parallel-testing
rcaller
renderer
windows-embedded-standard
gwt-openlayers
artemis
gtm-oauth2
beaker-testing
sqlclr
pdfviewer
frameworkelementfactory
mkv
jquery-blockui
oracle-enterprise-linux
httponly
promotion-code
android-holo-everywhere
cgbitmapcontextcreate
xui
appledoc
commerceserver2007
echo3
leader

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