From cd04fa521239ce609e8ef33430daaa11f9097bf3 Mon Sep 17 00:00:00 2001 From: boris Date: Thu, 20 Nov 2025 19:53:45 +0000 Subject: [PATCH] CRUD Albums + Spotify API requests into DB. --- .DS_Store | Bin 8196 -> 10244 bytes .../Symfony_10_11_2025__13_00.xml | 5313 +++++++++++++++++ .../frameworkDescriptionVersion1.1.4.xsd | 47 + .idea/musicratings.iml | 4 - .idea/php.xml | 4 - docker-compose.yml | 4 +- migrations/Version20251114111853.php | 39 + migrations/Version20251114112016.php | 40 + migrations/Version20251114113000.php | 62 + migrations/Version20251114114000.php | 45 + migrations/Version20251114120500.php | 41 + migrations/Version20251120174722.php | 34 + migrations/Version20251120175034.php | 31 + src/Controller/AlbumController.php | 167 +- src/Entity/Album.php | 151 + src/Entity/Review.php | 23 +- src/Form/AlbumType.php | 51 + src/Repository/AlbumRepository.php | 107 + src/Repository/ReviewRepository.php | 14 +- templates/album/new.html.twig | 16 + templates/album/search.html.twig | 13 + templates/album/show.html.twig | 15 + templates/review/edit.html.twig | 2 +- templates/review/index.html.twig | 2 +- templates/review/new.html.twig | 16 +- templates/review/show.html.twig | 5 +- 26 files changed, 6180 insertions(+), 66 deletions(-) create mode 100644 .idea/commandlinetools/Symfony_10_11_2025__13_00.xml create mode 100644 .idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd create mode 100644 migrations/Version20251114111853.php create mode 100644 migrations/Version20251114112016.php create mode 100644 migrations/Version20251114113000.php create mode 100644 migrations/Version20251114114000.php create mode 100644 migrations/Version20251114120500.php create mode 100644 migrations/Version20251120174722.php create mode 100644 migrations/Version20251120175034.php create mode 100644 src/Entity/Album.php create mode 100644 src/Form/AlbumType.php create mode 100644 src/Repository/AlbumRepository.php create mode 100644 templates/album/new.html.twig diff --git a/.DS_Store b/.DS_Store index 2e6d3ac3fc9398d6fce31591c6ed7d3d2c9d9a8a..6d4ad6f71cfb1d3f3fef110f675ee97e486263da 100644 GIT binary patch literal 10244 zcmeHMOKclO82-me8oRG-UeFd5EzPA;OK{Tkfe@O^7^Uu!w z&u?b_ov{Icq-Tml044y$@nO_hi&c}t#@W+QVzTEcqy*)`DGy}|v{G&0j5;C&A_O7? zA_O7?A_V>|2;euHmG~M#qdGz$LLfq583C3bOnewkNxCE`PaRnCD*)1V?B)gA25TTS zB~3}XBq)wxAwm?X5GC@8L4-K=o02aj>5`yA9EiMp5NVmn8w%mpQNPLAfusbD>Ii`d zfkp(_-Mt+Kp$s+z+Wo!v_G{``g^rEo9h%3!_-twN;)ln-7}dv%cO9>uR(=~uy^EsI ziFT_n19@=JdO@?!#v3?PAHM(T{Kof$4Vpp!K0Z{Cx)8v_kOmKZwxERVQ9foPhOWXfgtEh2*G}XStzFnRi#Ax?MJSCsv>-8M zX)BG-;Gev3hYUm}2L(8b7*$cSf^RNbEpcxG@I&&~?p3}C;w#!z=ip6a^ZDyy4*rH* zeOB&8uE{*LAucw!dh}#VD0<12pYy8{;}7yx$M%C{@;ef1YwuXq8IQ-;#7|{T)45EL z3ugRu&O5>04pZvnYwcYAh;7YfjlO-<4RW??d0fCQTF7$psO=W%T$;|fMW4%N#6Uce zNMwx-3ky4khPRtL_UvBVZZ14JoZN1X>>62IOvL*K9(imkd)BGA^hG|~K;)+l)`|D! z`Xy}1XzaqQjD~z&i{=NzsKt|5y=LvY^<74HPj7c$cYlBXefMwJxaomSS)(_fE1WHR z%+Gz)p#t@QjUCzrRJ2{%oHfL5mM0(FJwU0f}`PI?woIk5Lv0pdXFK&`P=Gz=IJ4NPZ! zwU(r0;IlI(Zy$E4Yb6F!lVT)+hm>u&-4DSL+?40wBD@Y);bZs`ZowV+gLD#uY$4mo z2zi|BB~OxZa-0;%X<`#kD2Uajc(Zt~)x^h^oML@bb}ZIM)UEg1`)^&iA-0~BQ`27K zsJ@L%W?0J2W<1xSZW()+ck3|WP)s#dtXbOgFj<|!7H!yYuOhdau9`_YD2EA5->NZo zc2gx+ahonCHcX-+UWQytULC8EZ;)5hr6M-A^=b{V5KlcZwc^pxBbU((+9`_I7)H9! zJdwYlByx>c_qlH>tV{Lz(r(3P#hyCXt#~w_A;o;|QGLdbl0MUeFpu-@gkrgda%wE? zQb*|H!_%+I*9iw<9QMI}cp5UWU)M_5+EKYzqhmUTVQxUm+{;>Zm8tJgyYwkfY-eW2;+@N#oUHA;qvRHHOOvm6f8{ zQ&&nW9^GdX%|HUCaOOtw0CWiHAkI!v_nfV9vR+x^ZI~lGD1^9h^)%zsBg@@Fi&9>V z>C&Btew4?|<+zm)VaJnr;fxcY(_go6j+BMVf#vpMB&sUU}{u7 zs^>T7r(*92&lP#qJg@8pjaT)st>ex@SeNSO&o{4pD>IR%L&dQbkLq*# z1wQA@@2Erwv_POu^qcJW|NX81|8F53bw>z92>cfiAnjwBF+9)l`(Lww@Pq&+KF{LA z3cDvR3Cb_DSTPpX&wq}`7xr^JziMM&l8v!~?UbZTf?^Mrf8fu6=>8ww|HbbO>e=dl HbpQVg9PuR0 delta 176 zcmZn(XmOBWU|?W$DortDU;r^WfEYvza8FDWo2aMAXtFV2H$S7vW*z}<#>vt`ijy^E zgn{(x$#X?BC+`uPI=NQ7dh#R*(aE + + + + _complete +
Options:
--shell(-s)The shell type ("bash", "fish", "zsh")
--input(-i)An array of input tokens (e.g. COMP_WORDS or argv)
--current(-c)The index of the "input" array that the cursor is in (e.g. COMP_CWORD)
--api-version(-a)The API version of the completion script
--symfony(-S)deprecated
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + + +
+ + about + about command displays information about the current Symfony project.

The PHP section displays important configuration that could affect your application. The values might
be different between web and CLI.

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + completion + completion command dumps the shell completion script required
to use shell autocompletion (currently, bash, fish, zsh completion are supported).

Static installation
-------------------

Dump the script to a global completion file and restart your shell:

/Users/boris/dev/musicratings/bin/console completion zsh | sudo tee $fpath[1]/_console

Or dump the script to a local file and source it:

/Users/boris/dev/musicratings/bin/console completion zsh > completion.sh

# source the file whenever you use the project
source completion.sh

# or add this line at the end of your "~/.zshrc" file:
source /path/to/completion.sh

Dynamic installation
--------------------

Add this to the end of your shell configuration file (e.g. "~/.zshrc"):

eval "$(/Users/boris/dev/musicratings/bin/console completion zsh)"

Options:
--debugTail the completion debug log
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ shell[=null] + + + command]]> + + + + + + + + + + + + +
+ + help + help command displays help for a given command:

/Users/boris/dev/musicratings/bin/console help list

You can also output the help in other formats by using the --format option:

/Users/boris/dev/musicratings/bin/console help --format=xml list

To display the list of available commands, please use the list command.

Options:
--formatThe output format (txt, xml, json, or md)
--rawTo output raw command help
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]> + command_name[=null] + + + +
command]]> + + + + + + + + + + + + + + + list + list command lists all commands:

/Users/boris/dev/musicratings/bin/console list

You can also display the commands for a specific namespace:

/Users/boris/dev/musicratings/bin/console list test

You can also output the information in other formats by using the --format option:

/Users/boris/dev/musicratings/bin/console list --format=xml

It's also possible to get raw list of commands (useful for embedding command runner):

/Users/boris/dev/musicratings/bin/console list --raw

Options:
--rawTo output raw command list
--formatThe output format (txt, xml, json, or md)
--shortTo skip describing commands' arguments
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ namespace[=null] + + + + + + + + + + + + + + + + +
+ + app:promote-admin +
Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ email + + + + + + + + + + + + + +
+ + asset-map:compile + asset-map:compile command compiles and dumps all the assets in
the asset mapper into the final public directory (usually public/assets).

This command is meant to be run during deployment.

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + assets:compress + assets:compress command compresses the given file in Brotli, Zstandard and gzip formats.
This is especially useful to serve pre-compressed files through a web server.

The existing file will be kept. The compressed files will be created in the same directory.
The extension of the compression format will be appended to the original file name.

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ paths + + + + + + + + + + + + + +
+ + assets:install + assets:install command installs bundle assets into a given
directory (e.g. the public directory).

php /Users/boris/dev/musicratings/bin/console assets:install public

A "bundles" directory will be created inside the target directory and the
"Resources/public" directory of each bundle will be copied into it.

To create a symlink to each bundle instead of copying its assets, use the
--symlink option (will fall back to hard copies when symbolic links aren't possible:

php /Users/boris/dev/musicratings/bin/console assets:install public --symlink

To make symlink relative, add the --relative option:

php /Users/boris/dev/musicratings/bin/console assets:install public --symlink --relative


Options:
--symlinkSymlink the assets instead of copying them
--relativeMake relative symlinks
--no-cleanupDo not remove the assets of the bundles that no longer exist
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ target[=null] + + + + + + + + + + + + + + + + +
+ + cache:clear + cache:clear command clears and warms up the application cache for a given environment
and debug mode:

php /Users/boris/dev/musicratings/bin/console cache:clear --env=dev
php /Users/boris/dev/musicratings/bin/console cache:clear --env=prod --no-debug

Options:
--no-warmupDo not warm up the cache
--no-optional-warmersSkip optional cache warmers (faster)
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + +
+ + cache:pool:clear + cache:pool:clear command clears the given cache pools or cache pool clearers.

/Users/boris/dev/musicratings/bin/console cache:pool:clear [...]

Options:
--allClear all cache pools
--excludeA list of cache pools or cache pool clearers to exclude
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ pools[=null] + + + + + + + + + + + + + + + +
+ + cache:pool:delete + cache:pool:delete deletes an item from a given cache pool.

/Users/boris/dev/musicratings/bin/console cache:pool:delete

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ pool key + + + + + + + + + + + + + +
+ + cache:pool:invalidate-tags + cache:pool:invalidate-tags command invalidates tags from taggable pools. By default, all pools
have the passed tags invalidated. Pass --pool=my_pool to invalidate tags on a specific pool.

php /Users/boris/dev/musicratings/bin/console cache:pool:invalidate-tags tag1 tag2
php /Users/boris/dev/musicratings/bin/console cache:pool:invalidate-tags tag1 tag2 --pool=cache2 --pool=cache1

Options:
--pool(-p)The pools to invalidate on
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ tags + + + + + + + + + + + + + + +
+ + cache:pool:list + cache:pool:list command lists all available cache pools.

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + cache:pool:prune + cache:pool:prune command deletes all expired items from all pruneable pools.

/Users/boris/dev/musicratings/bin/console cache:pool:prune

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + cache:warmup + cache:warmup command warms up the cache.

Before running this command, the cache must be empty.


Options:
--no-optional-warmersSkip optional cache warmers (faster)
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + config:dump-reference + config:dump-reference command dumps the default configuration for an
extension/bundle.

Either the extension alias or bundle name can be used:

php /Users/boris/dev/musicratings/bin/console config:dump-reference framework
php /Users/boris/dev/musicratings/bin/console config:dump-reference FrameworkBundle

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console config:dump-reference FrameworkBundle --format=json

For dumping a specific option, add its path as second argument (only available for the yaml format):

php /Users/boris/dev/musicratings/bin/console config:dump-reference framework http_client.default_options


Options:
--formatThe output format ("yaml", "xml")
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] path[=null] + + + + + + + + + + + + + + +
+ + dbal:run-sql + dbal:run-sql command executes the given SQL query and
outputs the results:

php /Users/boris/dev/musicratings/bin/console dbal:run-sql "SELECT * FROM users"

Options:
--connectionThe named database connection
--depthDumping depth of result set (deprecated).
--force-fetchForces fetching the result.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ sql + + + + + + + + + + + + + + + + +
+ + debug:asset-map + debug:asset-map command displays information about the Asset
Mapper for debugging purposes.

To list all configured paths (with local paths and their namespace prefixes) and
all mapped assets (with their logical path and filesystem path), run:

php /Users/boris/dev/musicratings/bin/console debug:asset-map

You can filter the results by providing a name to search for in the asset name
or path:

php /Users/boris/dev/musicratings/bin/console debug:asset-map bootstrap.js
php /Users/boris/dev/musicratings/bin/console debug:asset-map style/

To filter the assets by extension, use the --ext option:

php /Users/boris/dev/musicratings/bin/console debug:asset-map --ext=css

To show only assets from vendor packages, use the --vendor option:

php /Users/boris/dev/musicratings/bin/console debug:asset-map --vendor

To exclude assets from vendor packages, use the --no-vendor option:

php /Users/boris/dev/musicratings/bin/console debug:asset-map --no-vendor

To see the full paths, use the --full option:

php /Users/boris/dev/musicratings/bin/console debug:asset-map --full


Options:
--extFilter assets by extension (e.g. "css")
--fullWhether to show the full paths
--vendorOnly show assets from vendor packages
--no-vendorNegate the "--vendor" option
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + + + + + +
+ + debug:autowiring + debug:autowiring command displays the classes and interfaces that
you can use as type-hints for autowiring:

php /Users/boris/dev/musicratings/bin/console debug:autowiring

You can also pass a search term to filter the list:

php /Users/boris/dev/musicratings/bin/console debug:autowiring log


Options:
--allShow also services that are not aliased
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ search[=null] + + + + + + + + + + + + + + +
+ + debug:config + debug:config command dumps the current configuration for an
extension/bundle.

Either the extension alias or bundle name can be used:

php /Users/boris/dev/musicratings/bin/console debug:config framework
php /Users/boris/dev/musicratings/bin/console debug:config FrameworkBundle

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console debug:config framework --format=json

For dumping a specific option, add its path as second argument:

php /Users/boris/dev/musicratings/bin/console debug:config framework serializer.enabled


Options:
--resolve-envDisplay resolved environment variable values instead of placeholders
--formatThe output format ("txt", "yaml", "json")
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] path[=null] + + + + + + + + + + + + + + + +
+ + debug:container + debug:container command displays all configured public services:

php /Users/boris/dev/musicratings/bin/console debug:container

To see deprecations generated during container compilation and cache warmup, use the --deprecations option:

php /Users/boris/dev/musicratings/bin/console debug:container --deprecations

To get specific information about a service, specify its name:

php /Users/boris/dev/musicratings/bin/console debug:container validator

To get specific information about a service including all its arguments, use the --show-arguments flag:

php /Users/boris/dev/musicratings/bin/console debug:container validator --show-arguments

To see available types that can be used for autowiring, use the --types flag:

php /Users/boris/dev/musicratings/bin/console debug:container --types

To see environment variables used by the container, use the --env-vars flag:

php /Users/boris/dev/musicratings/bin/console debug:container --env-vars

Display a specific environment variable by specifying its name with the --env-var option:

php /Users/boris/dev/musicratings/bin/console debug:container --env-var=APP_ENV

Use the --tags option to display tagged public services grouped by tag:

php /Users/boris/dev/musicratings/bin/console debug:container --tags

Find all services with a specific tag by specifying the tag name with the --tag option:

php /Users/boris/dev/musicratings/bin/console debug:container --tag=form.type

Use the --parameters option to display all parameters:

php /Users/boris/dev/musicratings/bin/console debug:container --parameters

Display a specific parameter by specifying its name with the --parameter option:

php /Users/boris/dev/musicratings/bin/console debug:container --parameter=kernel.debug

By default, internal services are hidden. You can display them
using the --show-hidden flag:

php /Users/boris/dev/musicratings/bin/console debug:container --show-hidden

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console debug:container --format=json

Options:
--show-argumentsShow arguments in services
--show-hiddenShow hidden (internal) services
--tagShow all services with a specific tag
--tagsDisplay tagged services for an application
--parameterDisplay a specific parameter for an application
--parametersDisplay parameters for an application
--typesDisplay types (classes/interfaces) available in the container
--env-varDisplay a specific environment variable used in the container
--env-varsDisplay environment variables used in the container
--formatThe output format ("txt", "xml", "json", "md")
--rawTo output raw description
--deprecationsDisplay deprecations generated when compiling and warming up the container
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + debug:dotenv + /Users/boris/dev/musicratings/bin/console debug:dotenv command displays all the environment variables configured by dotenv:

php /Users/boris/dev/musicratings/bin/console debug:dotenv

To get specific variables, specify its full or partial name:

php /Users/boris/dev/musicratings/bin/console debug:dotenv FOO_BAR


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ filter[=null] + + + + + + + + + + + + + +
+ + debug:event-dispatcher + debug:event-dispatcher command displays all configured listeners:

php /Users/boris/dev/musicratings/bin/console debug:event-dispatcher

To get specific listeners for an event, specify its name:

php /Users/boris/dev/musicratings/bin/console debug:event-dispatcher kernel.request

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console debug:event-dispatcher --format=json

Options:
--dispatcherTo view events of a specific event dispatcher
--formatThe output format ("txt", "xml", "json", "md")
--rawTo output raw description
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ event[=null] + + + + + + + + + + + + + + + + +
+ + debug:firewall + debug:firewall command displays the firewalls that are configured
in your application:

php /Users/boris/dev/musicratings/bin/console debug:firewall

You can pass a firewall name to display more detailed information about
a specific firewall:

php /Users/boris/dev/musicratings/bin/console debug:firewall main

To include all events and event listeners for a specific firewall, use the
events option:

php /Users/boris/dev/musicratings/bin/console debug:firewall --events main


Options:
--eventsInclude a list of event listeners (only available in combination with the "name" argument)
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + + +
+ + debug:form + debug:form command displays information about form types.

php /Users/boris/dev/musicratings/bin/console debug:form

The command lists all built-in types, services types, type extensions and
guessers currently available.

php /Users/boris/dev/musicratings/bin/console debug:form Symfony\Component\Form\Extension\Core\Type\ChoiceType
php /Users/boris/dev/musicratings/bin/console debug:form ChoiceType

The command lists all defined options that contains the given form type,
as well as their parents and type extensions.

php /Users/boris/dev/musicratings/bin/console debug:form ChoiceType choice_value

Use the --show-deprecated option to display form types with
deprecated options or the deprecated options of the given form type:

php /Users/boris/dev/musicratings/bin/console debug:form --show-deprecated
php /Users/boris/dev/musicratings/bin/console debug:form ChoiceType --show-deprecated

The command displays the definition of the given option name.

php /Users/boris/dev/musicratings/bin/console debug:form --format=json

The command lists everything in a machine readable json format.

Options:
--show-deprecatedDisplay deprecated options in form types
--formatThe output format ("txt", "json")
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ class[=null] option[=null] + + + + + + + + + + + + + + + +
+ + debug:messenger + debug:messenger command displays all messages that can be
dispatched using the message buses:

php /Users/boris/dev/musicratings/bin/console debug:messenger

Or for a specific bus only:

php /Users/boris/dev/musicratings/bin/console debug:messenger command_bus


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ bus[=null] + + + + + + + + + + + + + +
+ + debug:router + debug:router displays the configured routes:

php /Users/boris/dev/musicratings/bin/console debug:router

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console debug:router --format=json

Options:
--show-controllersShow assigned controllers in overview
--show-aliasesShow aliases in overview
--formatThe output format ("txt", "xml", "json", "md")
--rawTo output raw route(s)
--methodFilter by HTTP method
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + + + + + + +
+ + debug:serializer + debug:serializer 'App\Entity\Dummy' command dumps the serializer groups for the dummy class.

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ class + + + + + + + + + + + + + +
+ + debug:twig + debug:twig command outputs a list of twig functions,
filters, globals and tests.

php /Users/boris/dev/musicratings/bin/console debug:twig

The command lists all functions, filters, etc.

php /Users/boris/dev/musicratings/bin/console debug:twig @Twig/Exception/error.html.twig

The command lists all paths that match the given template name.

php /Users/boris/dev/musicratings/bin/console debug:twig --filter=date

The command lists everything that contains the word date.

php /Users/boris/dev/musicratings/bin/console debug:twig --format=json

The command lists everything in a machine readable json format.

Options:
--filterShow details for all entries matching this filter
--formatThe output format ("txt", "json")
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + + + +
+ + debug:validator + debug:validator 'App\Entity\Dummy' command dumps the validators for the dummy class.

The debug:validator src/ command dumps the validators for the `src` directory.

Options:
--show-allShow all classes even if they have no validation constraints
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ class + + + + + + + + + + + + + + +
+ + doctrine:cache:clear-collection-region + doctrine:cache:clear-collection-region command is meant to clear a second-level cache collection regions for an associated Entity Manager.
It is possible to delete/invalidate all collection region, a specific collection region or flushes the cache provider.

The execution type differ on how you execute the command.
If you want to invalidate all entries for an collection region this command would do the work:

doctrine:cache:clear-collection-region 'Entities\MyEntity' 'collectionName'

To invalidate a specific entry you should use :

doctrine:cache:clear-collection-region 'Entities\MyEntity' 'collectionName' 1

If you want to invalidate all entries for the all collection regions:

doctrine:cache:clear-collection-region --all

Alternatively, if you want to flush the configured cache provider for an collection region use this command:

doctrine:cache:clear-collection-region 'Entities\MyEntity' 'collectionName' --flush

Finally, be aware that if --flush option is passed,
not all cache providers are able to flush entries, because of a limitation of its execution nature.

Options:
--emName of the entity manager to operate on
--allIf defined, all entity regions will be deleted/invalidated.
--flushIf defined, all cache entries will be flushed.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ owner-class[=null] association[=null] owner-id[=null] + + + + + + + + + + + + + + + + +
+ + doctrine:cache:clear-entity-region + doctrine:cache:clear-entity-region command is meant to clear a second-level cache entity region for an associated Entity Manager.
It is possible to delete/invalidate all entity region, a specific entity region or flushes the cache provider.

The execution type differ on how you execute the command.
If you want to invalidate all entries for an entity region this command would do the work:

doctrine:cache:clear-entity-region 'Entities\MyEntity'

To invalidate a specific entry you should use :

doctrine:cache:clear-entity-region 'Entities\MyEntity' 1

If you want to invalidate all entries for the all entity regions:

doctrine:cache:clear-entity-region --all

Alternatively, if you want to flush the configured cache provider for an entity region use this command:

doctrine:cache:clear-entity-region 'Entities\MyEntity' --flush

Finally, be aware that if --flush option is passed,
not all cache providers are able to flush entries, because of a limitation of its execution nature.

Options:
--emName of the entity manager to operate on
--allIf defined, all entity regions will be deleted/invalidated.
--flushIf defined, all cache entries will be flushed.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ entity-class[=null] entity-id[=null] + + + + + + + + + + + + + + + + +
+ + doctrine:cache:clear-metadata + doctrine:cache:clear-metadata command is meant to clear the metadata cache of associated Entity Manager.

Options:
--emName of the entity manager to operate on
--flushIf defined, cache entries will be flushed instead of deleted/invalidated.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + +
+ + doctrine:cache:clear-query + doctrine:cache:clear-query command is meant to clear the query cache of associated Entity Manager.

Options:
--emName of the entity manager to operate on
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + doctrine:cache:clear-query-region + doctrine:cache:clear-query-region command is meant to clear a second-level cache query region for an associated Entity Manager.
It is possible to delete/invalidate all query region, a specific query region or flushes the cache provider.

The execution type differ on how you execute the command.
If you want to invalidate all entries for the default query region this command would do the work:

doctrine:cache:clear-query-region

To invalidate entries for a specific query region you should use :

doctrine:cache:clear-query-region my_region_name

If you want to invalidate all entries for the all query region:

doctrine:cache:clear-query-region --all

Alternatively, if you want to flush the configured cache provider use this command:

doctrine:cache:clear-query-region my_region_name --flush

Finally, be aware that if --flush option is passed,
not all cache providers are able to flush entries, because of a limitation of its execution nature.

Options:
--emName of the entity manager to operate on
--allIf defined, all query regions will be deleted/invalidated.
--flushIf defined, all cache entries will be flushed.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ region-name[=null] + + + + + + + + + + + + + + + + +
+ + doctrine:cache:clear-result + doctrine:cache:clear-result command is meant to clear the result cache of associated Entity Manager.
It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
instance completely.

The execution type differ on how you execute the command.
If you want to invalidate the entries (and not delete from cache instance), this command would do the work:

doctrine:cache:clear-result

Alternatively, if you want to flush the cache provider using this command:

doctrine:cache:clear-result --flush

Finally, be aware that if --flush option is passed, not all cache providers are able to flush entries,
because of a limitation of its execution nature.

Options:
--emName of the entity manager to operate on
--flushIf defined, cache entries will be flushed instead of deleted/invalidated.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + +
+ + doctrine:database:create + doctrine:database:create command creates the default connections database:

php /Users/boris/dev/musicratings/bin/console doctrine:database:create

You can also optionally specify the name of a connection to create the database for:

php /Users/boris/dev/musicratings/bin/console doctrine:database:create --connection=default

Options:
--connection(-c)The connection to use for this command
--if-not-existsDon't trigger an error, when the database already exists
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + +
+ + doctrine:database:drop + doctrine:database:drop command drops the default connections database:

php /Users/boris/dev/musicratings/bin/console doctrine:database:drop

The --force parameter has to be used to actually drop the database.

You can also optionally specify the name of a connection to drop the database for:

php /Users/boris/dev/musicratings/bin/console doctrine:database:drop --connection=default

Be careful: All data in a given database will be lost when executing this command.

Options:
--connection(-c)The connection to use for this command
--if-existsDon't trigger an error, when the database doesn't exist
--force(-f)Set this parameter to execute this action
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + +
+ + doctrine:mapping:describe +
/Users/boris/dev/musicratings/bin/console doctrine:mapping:describe My\Namespace\Entity\MyEntity

Or:

/Users/boris/dev/musicratings/bin/console doctrine:mapping:describe MyEntity

Options:
--emName of the entity manager to operate on
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ entityName + + + + + + + + + + + + + + +
+ + doctrine:mapping:info + doctrine:mapping:info shows basic information about which
entities exist and possibly if their mapping information contains errors or
not.

Options:
--emName of the entity manager to operate on
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + doctrine:migrations:current +
Options:
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + +
+ + doctrine:migrations:diff + doctrine:migrations:diff command generates a migration by comparing your current database to your mapping information:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:diff


Options:
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--namespaceThe namespace to use for the migration (must be in the list of configured namespaces)
--filter-expressionTables which are filtered by Regular Expression.
--formattedFormat the generated SQL.
--nowdocOutput the generated SQL as a nowdoc string (enabled by default for formatted queries).
--no-nowdocNegate the "--nowdoc" option
--line-lengthMax line length of unformatted lines.
--check-database-platformCheck Database Platform to the generated code.
--allow-empty-diffDo not throw an exception when no changes are detected.
--from-empty-schemaGenerate a full migration as if the current database was empty.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + doctrine:migrations:dump-schema + doctrine:migrations:dump-schema command dumps the schema for your database to a migration:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:dump-schema

After dumping your schema to a migration, you can rollup your migrations using the migrations:rollup command.

Options:
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--formattedFormat the generated SQL.
--nowdocOutput the generated SQL as a nowdoc string (enabled by default for formatted queries).
--no-nowdocNegate the "--nowdoc" option
--namespaceNamespace to use for the generated migrations (defaults to the first namespace definition).
--filter-tablesFilter the tables to dump via Regex.
--line-lengthMax line length of unformatted lines.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + + + + + + +
+ + doctrine:migrations:execute + doctrine:migrations:execute command executes migration versions up or down manually:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:execute FQCN

You can show more information about the process by increasing the verbosity level. To see the
executed queries, set the level to debug with -vv:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:execute FQCN -vv

If no --up or --down option is specified it defaults to up:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:execute FQCN --down

You can also execute the migration as a --dry-run:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:execute FQCN --dry-run

You can output the prepared SQL statements to a file with --write-sql:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:execute FQCN --write-sql

Or you can also execute the migration without a warning message which you need to interact with:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:execute FQCN --no-interaction

All the previous commands accept multiple migration versions, allowing you run execute more than
one migration at once:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:execute FQCN-1 FQCN-2 ...FQCN-n


Options:
--write-sqlThe path to output the migration SQL file. Defaults to current working directory.
--dry-runExecute the migration as a dry run.
--upExecute the migration up.
--downExecute the migration down.
--query-timeTime all the queries individually.
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ versions + + + + + + + + + + + + + + + + + + + + + +
+ + doctrine:migrations:generate + doctrine:migrations:generate command generates a blank migration class:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:generate


Options:
--namespaceThe namespace to use for the migration (must be in the list of configured namespaces)
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + +
+ + doctrine:migrations:latest +
Options:
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + +
+ + doctrine:migrations:list + doctrine:migrations:list command outputs a list of all available migrations and their status:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:list

Options:
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + +
+ + doctrine:migrations:migrate + doctrine:migrations:migrate command executes a migration to a specified version or the latest available version:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate

You can show more information about the process by increasing the verbosity level. To see the
executed queries, set the level to debug with -vv:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate -vv

You can optionally manually specify the version you wish to migrate to:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate FQCN

You can specify the version you wish to migrate to using an alias:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate prev
These alias are defined: first, latest, prev, current and next

You can specify the version you wish to migrate to using a number against the current version:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate current+3

You can also execute the migration as a --dry-run:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate FQCN --dry-run

You can output the prepared SQL statements to a file with --write-sql:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate FQCN --write-sql

Or you can also execute the migration without a warning message which you need to interact with --no-interaction:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate --no-interaction

You can also time all the different queries if you want to know which one is taking so long with --query-time:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate --query-time

You can skip throwing an exception if no migration is available with --allow-no-migration:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate --allow-no-migration

You can wrap the entire migration in a transaction with --all-or-nothing:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:migrate --all-or-nothing


Options:
--write-sqlThe path to output the migration SQL file. Defaults to current working directory.
--dry-runExecute the migration as a dry run.
--query-timeTime all the queries individually.
--allow-no-migrationDo not throw an exception if no migration is available.
--all-or-nothingWrap the entire migration in a transaction.
--no-all-or-nothingDisable wrapping the entire migration in a transaction.
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ version[=null] + + + + + + + + + + + + + + + + + + + + + + +
+ + doctrine:migrations:rollup + doctrine:migrations:rollup command rolls up migrations by deleting all tracked versions and
inserts the one version that exists that was created with the migrations:dump-schema command.

/Users/boris/dev/musicratings/bin/console doctrine:migrations:rollup

To dump your schema to a migration version you can use the migrations:dump-schema command.

Options:
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + +
+ + doctrine:migrations:status + doctrine:migrations:status command outputs the status of a set of migrations:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:status

Options:
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + +
+ + doctrine:migrations:sync-metadata-storage + The doctrine:migrations:sync-metadata-storage command updates metadata storage to the latest version,
ensuring it is ready to receive migrations generated by the current version of Doctrine Migrations.


/Users/boris/dev/musicratings/bin/console doctrine:migrations:sync-metadata-storage

Options:
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + +
+ + doctrine:migrations:up-to-date + doctrine:migrations:up-to-date command tells you if your schema is up-to-date:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:up-to-date

Options:
--fail-on-unregistered(-u)Whether to fail when there are unregistered extra migrations found
--list-migrations(-l)Show a list of missing or not migrated versions.
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + + +
+ + doctrine:migrations:version + doctrine:migrations:version command allows you to manually add, delete or synchronize migration versions from the version table:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:version MIGRATION-FQCN --add

If you want to delete a version you can use the --delete option:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:version MIGRATION-FQCN --delete

If you want to synchronize by adding or deleting all migration versions available in the version table you can use the --all option:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:version --add --all
/Users/boris/dev/musicratings/bin/console doctrine:migrations:version --delete --all

If you want to synchronize by adding or deleting some range of migration versions available in the version table you can use the --range-from/--range-to option:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:version --add --range-from=MIGRATION-FQCN --range-to=MIGRATION-FQCN
/Users/boris/dev/musicratings/bin/console doctrine:migrations:version --delete --range-from=MIGRATION-FQCN --range-to=MIGRATION-FQCN

You can also execute this command without a warning message which you need to interact with:

/Users/boris/dev/musicratings/bin/console doctrine:migrations:version --no-interaction

Options:
--addAdd the specified version.
--deleteDelete the specified version.
--allApply to all the versions.
--range-fromApply from specified version.
--range-toApply to specified version.
--configurationThe path to a migrations configuration file. [default: any of migrations.{php,xml,json,yml,yaml}]
--emThe name of the entity manager to use.
--connThe name of the connection to use.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ version[=null] + + + + + + + + + + + + + + + + + + + + + +
+ + doctrine:query:dql + doctrine:query:dql command executes the given DQL query and
outputs the results:

php /Users/boris/dev/musicratings/bin/console doctrine:query:dql "SELECT u FROM App\Entity\User u"

You can also optionally specify some additional options like what type of
hydration to use when executing the query:

php /Users/boris/dev/musicratings/bin/console doctrine:query:dql "SELECT u FROM App\Entity\User u" --hydrate=array

Additionally you can specify the first result and maximum amount of results to
show:

php /Users/boris/dev/musicratings/bin/console doctrine:query:dql "SELECT u FROM App\Entity\User u" --first-result=0 --max-result=30

Options:
--emName of the entity manager to operate on
--hydrateHydration mode of result set. Should be either: object, array, scalar or single-scalar.
--first-resultThe first result in the result set.
--max-resultThe maximum number of results in the result set.
--depthDumping depth of Entity graph.
--show-sqlDump generated SQL instead of executing query
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ dql + + + + + + + + + + + + + + + + + + + +
+ + doctrine:query:sql + doctrine:query:sql command executes the given SQL query and
outputs the results:

php /Users/boris/dev/musicratings/bin/console doctrine:query:sql "SELECT * FROM users"

Options:
--connectionThe named database connection
--depthDumping depth of result set (deprecated).
--force-fetchForces fetching the result.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ sql + + + + + + + + + + + + + + + + +
+ + doctrine:schema:create +
Hint: If you have a database with tables that should not be managed
by the ORM, you can use a DBAL functionality to filter the tables and sequences down
on a global level:

$config->setSchemaAssetsFilter(function (string|AbstractAsset $assetName): bool {
if ($assetName instanceof AbstractAsset) {
$assetName = $assetName->getName();
}

return !str_starts_with($assetName, 'audit_');
});

Options:
--emName of the entity manager to operate on
--dump-sqlInstead of trying to apply generated SQLs into EntityManager Storage Connection, output them.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + +
+ + doctrine:schema:drop + Beware that the complete database is dropped by this command, even tables that are not relevant to your metadata model.

Hint: If you have a database with tables that should not be managed
by the ORM, you can use a DBAL functionality to filter the tables and sequences down
on a global level:

$config->setSchemaAssetsFilter(function (string|AbstractAsset $assetName): bool {
if ($assetName instanceof AbstractAsset) {
$assetName = $assetName->getName();
}

return !str_starts_with($assetName, 'audit_');
});

Options:
--emName of the entity manager to operate on
--dump-sqlInstead of trying to apply generated SQLs into EntityManager Storage Connection, output them.
--force(-f)Don't ask for the deletion of the database, but force the operation to run.
--full-databaseInstead of using the Class Metadata to detect the database table schema, drop ALL assets that the database contains.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + +
+ + doctrine:schema:update + doctrine:schema:update command generates the SQL needed to
synchronize the database schema with the current mapping metadata of the
default entity manager.

For example, if you add metadata for a new column to an entity, this command
would generate and output the SQL needed to add the new column to the database:

doctrine:schema:update --dump-sql

Alternatively, you can execute the generated queries:

doctrine:schema:update --force

If both options are specified, the queries are output and then executed:

doctrine:schema:update --dump-sql --force

Finally, be aware that this task will drop all database assets (e.g. tables,
etc) that are *not* described by the current metadata. In other words, without
this option, this task leaves untouched any "extra" tables that exist in the
database, but which aren't described by any metadata.

Hint: If you have a database with tables that should not be managed
by the ORM, you can use a DBAL functionality to filter the tables and sequences down
on a global level:

$config->setSchemaAssetsFilter(function (string|AbstractAsset $assetName): bool {
if ($assetName instanceof AbstractAsset) {
$assetName = $assetName->getName();
}

return !str_starts_with($assetName, 'audit_');
});

Options:
--emName of the entity manager to operate on
--completeThis option is a no-op, is deprecated and will be removed in 4.0
--dump-sqlDumps the generated SQL statements to the screen (does not execute them).
--force(-f)Causes the generated SQL statements to be physically executed against your database.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + +
+ + doctrine:schema:validate +
Options:
--emName of the entity manager to operate on
--skip-mappingSkip the mapping validation check
--skip-syncSkip checking if the mapping is in sync with the database
--skip-property-typesSkip checking if property types match the Doctrine types
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + +
+ + error:dump +
Options:
--force(-f)Force directory removal before dumping new error pages
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ path status-codes[=null] + + + + + + + + + + + + + + +
+ + importmap:audit + --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console importmap:audit --format=json

Options:
--formatThe output format ("txt, json")
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + importmap:install +
Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + importmap:outdated + importmap:outdated command will list the latest updates available for the 3rd party packages in importmap.php.
Versions showing in red are semver compatible versions and you should upgrading.
Versions showing in yellow are major updates that include backward compatibility breaks according to semver.

php /Users/boris/dev/musicratings/bin/console importmap:outdated

Or specific packages only:

php /Users/boris/dev/musicratings/bin/console importmap:outdated

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console importmap:outdated --format=json

Options:
--formatThe output format ("txt, json")
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ packages[=null] + + + + + + + + + + + + + + +
+ + importmap:remove + importmap:remove command removes packages from the importmap.php.
If a package was downloaded into your app, the downloaded file will also be removed.

For example:

php /Users/boris/dev/musicratings/bin/console importmap:remove lodash

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ packages + + + + + + + + + + + + + +
+ + importmap:require + importmap:require command adds packages to importmap.php usually
by finding a CDN URL for the given package and version.

For example:

php /Users/boris/dev/musicratings/bin/console importmap:require lodash
php /Users/boris/dev/musicratings/bin/console importmap:require "lodash@^4.15"

You can also require specific paths of a package:

php /Users/boris/dev/musicratings/bin/console importmap:require "chart.js/auto"

Or require one package/file, but alias its name in your import map:

php /Users/boris/dev/musicratings/bin/console importmap:require "vue/dist/vue.esm-bundler.js=vue"

Sometimes, a package may require other packages and multiple new items may be added
to the import map.

You can also require multiple packages at once:

php /Users/boris/dev/musicratings/bin/console importmap:require "lodash@^4.15" "@hotwired/stimulus"

To add an importmap entry pointing to a local file, use the path option:

php /Users/boris/dev/musicratings/bin/console importmap:require "any_module_name" --path=./assets/some_file.js

To simulate the installation, use the --dry-run option:

php /Users/boris/dev/musicratings/bin/console importmap:require "any_module_name" --dry-run -v

When this option is enabled, this command does not perform any write operations to the filesystem.

Options:
--entrypointMake the packages an entrypoint?
--pathThe local path where the package lives relative to the project root
--dry-runSimulate the installation of the packages
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ packages + + + + + + + + + + + + + + + + +
+ + importmap:update + importmap:update command will update all from the 3rd part packages
in importmap.php to their latest version, including downloaded packages.

php /Users/boris/dev/musicratings/bin/console importmap:update

Or specific packages only:

php /Users/boris/dev/musicratings/bin/console importmap:update

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ packages[=null] + + + + + + + + + + + + + +
+ + lint:container +
Options:
--resolve-env-varsResolve environment variables and fail if one is missing.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + lint:twig + lint:twig command lints a template and outputs to STDOUT
the first encountered syntax error.

You can validate the syntax of contents passed from STDIN:

cat filename | php /Users/boris/dev/musicratings/bin/console lint:twig -

Or the syntax of a file:

php /Users/boris/dev/musicratings/bin/console lint:twig filename

Or of a whole directory:

php /Users/boris/dev/musicratings/bin/console lint:twig dirname

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console lint:twig dirname --format=json
Or all template files in a bundle:

php /Users/boris/dev/musicratings/bin/console lint:twig @AcmeDemoBundle


Options:
--formatThe output format ("txt", "json", "github")
--show-deprecationsShow deprecations as errors
--excludesExcluded directories
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ filename[=null] + + + + + + + + + + + + + + + + +
+ + lint:yaml + lint:yaml command lints a YAML file and outputs to STDOUT
the first encountered syntax error.

You can validates YAML contents passed from STDIN:

cat filename | php /Users/boris/dev/musicratings/bin/console lint:yaml -

You can also validate the syntax of a file:

php /Users/boris/dev/musicratings/bin/console lint:yaml filename

Or of a whole directory:

php /Users/boris/dev/musicratings/bin/console lint:yaml dirname

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console lint:yaml dirname --format=json

You can also exclude one or more specific files:

php /Users/boris/dev/musicratings/bin/console lint:yaml dirname --exclude="dirname/foo.yaml" --exclude="dirname/bar.yaml"

Or find all files in a bundle:

php /Users/boris/dev/musicratings/bin/console lint:yaml @AcmeDemoBundle


Options:
--formatThe output format ("txt", "json", "github")
--excludePath(s) to exclude
--parse-tagsParse custom tags
--no-parse-tagsNegate the "--parse-tags" option
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ filename[=null] + + + + + + + + + + + + + + + + + +
+ + make:auth + make:auth command generates various authentication systems,
by asking questions.

It can provide an empty authenticator, or a full login form authentication process.
In both cases it also updates your security.yaml.
For the login form, it also generates a controller and the Twig template.

php /Users/boris/dev/musicratings/bin/console make:auth


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + make:command + make:command command generates a new command:

php /Users/boris/dev/musicratings/bin/console make:command app:do-something

If the argument is missing, the command will ask for the command name interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + +
+ + make:controller + make:controller command generates a new controller class.

php /Users/boris/dev/musicratings/bin/console make:controller CoolStuffController

If the argument is missing, the command will ask for the controller class name interactively.

If you have the symfony/twig-bundle installed, a Twig template will also be
generated for the controller.

composer require symfony/twig-bundle

You can also generate the controller alone, without template with this option:

php /Users/boris/dev/musicratings/bin/console make:controller --no-template

To generate tailored PHPUnit tests, simply call:

php /Users/boris/dev/musicratings/bin/console make:controller --with-tests

This will generate a unit test in tests/ for you to review then use
to test the new functionality of your app.


Options:
--no-templateUse this option to disable template generation
--invokable(-i)Use this option to create an invokable controller
--with-testsGenerate PHPUnit Tests
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ controller-class[=null] + + + + + + + + + + + + + + + + +
+ + make:crud + make:crud command generates crud controller with templates for selected entity.

php /Users/boris/dev/musicratings/bin/console make:crud BlogPost

If the argument is missing, the command will ask for the entity class name interactively.
To generate tailored PHPUnit tests, simply call:

php /Users/boris/dev/musicratings/bin/console make:crud --with-tests

This will generate a unit test in tests/ for you to review then use
to test the new functionality of your app.


Options:
--with-testsGenerate PHPUnit Tests
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ entity-class[=null] + + + + + + + + + + + + + + +
+ + make:docker:database + make:docker:database command generates or updates databases services in compose.yaml

php /Users/boris/dev/musicratings/bin/console make:docker:database

Supports MySQL, MariaDB and PostgreSQL


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + make:entity + make:entity command creates or updates an entity and repository class.

php /Users/boris/dev/musicratings/bin/console make:entity BlogPost

If the argument is missing, the command will ask for the entity class name interactively.

You can also mark this class as an API Platform resource. A hypermedia CRUD API will
automatically be available for this entity class:

php /Users/boris/dev/musicratings/bin/console make:entity --api-resource

Symfony can also broadcast all changes made to the entity to the client using Symfony
UX Turbo.

php /Users/boris/dev/musicratings/bin/console make:entity --broadcast

You can also generate all the getter/setter/adder/remover methods
for the properties of existing entities:

php /Users/boris/dev/musicratings/bin/console make:entity --regenerate

You can also *overwrite* any existing methods:

php /Users/boris/dev/musicratings/bin/console make:entity --regenerate --overwrite

Instead of using the default "int" type for the entity's "id", you can use the
UUID type from Symfony's Uid component.
https://symfony.com/doc/current/components/uid.html#storing-uuids-in-databases

php /Users/boris/dev/musicratings/bin/console make:entity --with-uuid

Or you can use the ULID type from Symfony's Uid component.
https://symfony.com/doc/current/components/uid.html#storing-ulids-in-databases

php /Users/boris/dev/musicratings/bin/console make:entity --with-ulid


Options:
--api-resource(-a)Mark this class as an API Platform resource (expose a CRUD API for it)
--broadcast(-b)Add the ability to broadcast entity updates using Symfony UX Turbo?
--regenerateInstead of adding new fields, simply generate the methods (e.g. getter/setter) for existing fields
--overwriteOverwrite any existing getter/setter methods
--with-uuidUse UUID for entity "id"
--with-ulidUse ULID for entity "id"
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + + + + + + + +
+ + make:fixtures + make:fixtures command generates a new Doctrine fixtures class.

php /Users/boris/dev/musicratings/bin/console make:fixtures AppFixtures

If the argument is missing, the command will ask for a class interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ fixtures-class[=null] + + + + + + + + + + + + + +
+ + make:form + make:form command generates a new form class.

php /Users/boris/dev/musicratings/bin/console make:form UserType

If the argument is missing, the command will ask for the form class interactively.

You can optionally specify the bound class in a second argument.
This can be the name of an entity like User

php /Users/boris/dev/musicratings/bin/console make:form UserType User

You can also specify a fully qualified name to another class like \App\Dto\UserData.
Slashes must be escaped in the argument.

php /Users/boris/dev/musicratings/bin/console make:form UserType \\App\\Dto\\UserData



Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] bound-class[=null] + + + + + + + + + + + + + +
+ + make:listener + make:listener command generates a new event subscriber class or a new event listener class.

php /Users/boris/dev/musicratings/bin/console make:listener ExceptionListener

If the argument is missing, the command will ask for the class name interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] event[=null] + + + + + + + + + + + + + +
+ + make:message + make:message command generates a new message class & handler.

php /Users/boris/dev/musicratings/bin/console make:message EmailMessage

If the argument is missing, the command will ask for the message class interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + +
+ + make:messenger-middleware + make:messenger-middleware command generates a new message class & handler.

php /Users/boris/dev/musicratings/bin/console make:messenger-middleware EmailMessage

If the argument is missing, the command will ask for the message class interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + +
+ + make:migration + make:migration command generates a new migration:

php /Users/boris/dev/musicratings/bin/console make:migration

You can also generate a formatted migration with this option:

php /Users/boris/dev/musicratings/bin/console make:migration --formatted


Options:
--formattedFormat the generated SQL
--configurationThe path of doctrine configuration file
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + +
+ + make:registration-form + make:registration-form command generates a complete registration form, controller & template.

php /Users/boris/dev/musicratings/bin/console make:registration-form

The command will ask for several pieces of information to build your form.

To generate tailored PHPUnit tests, simply call:

php /Users/boris/dev/musicratings/bin/console make:registration-form --with-tests

This will generate a unit test in tests/ for you to review then use
to test the new functionality of your app.


Options:
--with-testsGenerate PHPUnit Tests
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + make:reset-password + make:reset-password command generates all the files needed to implement
a fully-functional & secure password reset system.

The SymfonycastsResetPasswordBundle is required and can be added using composer:
composer require symfonycasts/reset-password-bundle

For more information on the reset-password-bundle check out:
https://github.com/symfonycasts/reset-password-bundle

make:reset-password requires a user entity with an email property,
email getter method, and a password setter method. Maker will ask for these
interactively if they cannot be guessed.

Maker will also update your reset-password.yaml configuration file
if one exists. If you have customized the configuration file, maker will attempt
to modify it accordingly but preserve your customizations.

php /Users/boris/dev/musicratings/bin/console make:reset-password

Instead of using the default "int" type for the entity's "id", you can use the
UUID type from Symfony's Uid component.
https://symfony.com/doc/current/components/uid.html#storing-uuids-in-databases

php /Users/boris/dev/musicratings/bin/console make:reset-password --with-uuid

Or you can use the ULID type from Symfony's Uid component.
https://symfony.com/doc/current/components/uid.html#storing-ulids-in-databases

php /Users/boris/dev/musicratings/bin/console make:reset-password --with-ulid

To generate tailored PHPUnit tests, simply call:

php /Users/boris/dev/musicratings/bin/console make:reset-password --with-tests

This will generate a unit test in tests/ for you to review then use
to test the new functionality of your app.


Options:
--with-uuidUse UUID for entity "id"
--with-ulidUse ULID for entity "id"
--with-testsGenerate PHPUnit Tests
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + +
+ + make:schedule + make:schedule command generates a schedule to automate repeated
tasks using Symfony's Scheduler Component.

If the Scheduler Component is not installed, make:schedule will
install it automatically using composer. You can of course do this manually by
running composer require symfony/scheduler.

php /Users/boris/dev/musicratings/bin/console make:schedule


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + make:security:custom + make:security:custom command generates a simple custom authenticator
class based off the example provided in:

https://symfony.com/doc/current/security/custom_authenticator.html

This will also update your security.yaml for the new custom authenticator.

php /Users/boris/dev/musicratings/bin/console make:security:custom


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + make:security:form-login + make:security:form-login command generates a controller and Twig template
to allow users to login using the form_login authenticator.

The controller name, and logout ability can be customized by answering the
questions asked when running make:security:form-login.

This will also update your security.yaml for the new authenticator.

php /Users/boris/dev/musicratings/bin/console make:security:form-login

To generate tailored PHPUnit tests, simply call:

php /Users/boris/dev/musicratings/bin/console make:security:form-login --with-tests

This will generate a unit test in tests/ for you to review then use
to test the new functionality of your app.


Options:
--with-testsGenerate PHPUnit Tests
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + make:serializer:encoder + make:serializer:encoder command generates a new serializer encoder class.

php /Users/boris/dev/musicratings/bin/console make:serializer:encoder YamlEncoder

If the argument is missing, the command will ask for the class name interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] format[=null] + + + + + + + + + + + + + +
+ + make:serializer:normalizer + make:serializer:normalizer command generates a new serializer normalizer class.

php /Users/boris/dev/musicratings/bin/console make:serializer:normalizer UserNormalizer

If the argument is missing, the command will ask for the class name interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + +
+ + make:stimulus-controller + make:stimulus-controller command generates a new Stimulus controller.

php /Users/boris/dev/musicratings/bin/console make:stimulus-controller hello

If the argument is missing, the command will ask for the controller name interactively.

To generate a TypeScript file (instead of a JavaScript file) use the --typescript
(or --ts) option:

php /Users/boris/dev/musicratings/bin/console make:stimulus-controller hello --typescript

It will also interactively ask for values, targets, classes to add to the Stimulus
controller (optional).

php /Users/boris/dev/musicratings/bin/console make:stimulus-controller


Options:
--typescript(-ts)Create a TypeScript controller (default is JavaScript)
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name + + + + + + + + + + + + + + +
+ + make:test + make:test command generates a new test class.

php /Users/boris/dev/musicratings/bin/console make:test TestCase BlogPostTest

If the first argument is missing, the command will ask for the test type interactively.

If the second argument is missing, the command will ask for the class name interactively.
* TestCase: basic PHPUnit tests
* KernelTestCase: basic tests that have access to Symfony services
* WebTestCase: to run browser-like scenarios, but that don't execute JavaScript code
* ApiTestCase: to run API-oriented scenarios
* PantherTestCase: to run e2e scenarios, using a real-browser or HTTP client and a real web server

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ type[=null] name[=null] + + + + + + + + + + + + + +
+ + make:twig-component +
Options:
--liveWhether to create a Live component (requires symfony/ux-live-component)
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + + +
+ + make:twig-extension + make:twig-extension command generates a new Twig extension with its runtime class.

php /Users/boris/dev/musicratings/bin/console make:twig-extension AppExtension

If the argument is missing, the command will ask for the class name interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + +
+ + make:user + make:user command generates a new user class for security
and updates your security.yaml file for it. It will also generate a user provider
class if your situation needs a custom class.

php /Users/boris/dev/musicratings/bin/console make:user User

If the argument is missing, the command will ask for the class name interactively.

Instead of using the default "int" type for the entity's "id", you can use the
UUID type from Symfony's Uid component.
https://symfony.com/doc/current/components/uid.html#storing-uuids-in-databases

php /Users/boris/dev/musicratings/bin/console make:user --with-uuid

Or you can use the ULID type from Symfony's Uid component.
https://symfony.com/doc/current/components/uid.html#storing-ulids-in-databases

php /Users/boris/dev/musicratings/bin/console make:user --with-ulid


Options:
--is-entityDo you want to store user data in the database (via Doctrine)?
--identity-property-nameEnter a property name that will be the unique "display" name for the user (e.g. email, username, uuid)
--with-passwordWill this app be responsible for checking the password? Choose No if the password is actually checked by some other system (e.g. a single sign-on server)
--with-uuidUse UUID for entity "id"
--with-ulidUse ULID for entity "id"
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + + + + + + +
+ + make:validator + make:validator command generates a new validation constraint.

php /Users/boris/dev/musicratings/bin/console make:validator EnabledValidator

If the argument is missing, the command will ask for the constraint class name interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + +
+ + make:voter + make:voter command generates a new security voter.

php /Users/boris/dev/musicratings/bin/console make:voter BlogPostVoter

If the argument is missing, the command will ask for the class name interactively.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + +
+ + make:webhook + make:webhook command creates a RequestParser, a WebhookHandler and adds the necessary configuration
for a new Webhook.

php /Users/boris/dev/musicratings/bin/console make:webhook stripe

If the argument is missing, the command will ask for the webhook name interactively.

It will also interactively ask for the RequestMatchers to use for the RequestParser's getRequestMatcher function.


Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name[=null] + + + + + + + + + + + + + +
+ + messenger:consume + messenger:consume command consumes messages and dispatches them to the message bus.

php /Users/boris/dev/musicratings/bin/console messenger:consume

To receive from multiple transports, pass each name:

php /Users/boris/dev/musicratings/bin/console messenger:consume receiver1 receiver2

Use the --limit option to limit the number of messages received:

php /Users/boris/dev/musicratings/bin/console messenger:consume --limit=10

Use the --failure-limit option to stop the worker when the given number of failed messages is reached:

php /Users/boris/dev/musicratings/bin/console messenger:consume --failure-limit=2

Use the --memory-limit option to stop the worker if it exceeds a given memory usage limit. You can use shorthand byte values [K, M or G]:

php /Users/boris/dev/musicratings/bin/console messenger:consume --memory-limit=128M

Use the --time-limit option to stop the worker when the given time limit (in seconds) is reached.
If a message is being handled, the worker will stop after the processing is finished:

php /Users/boris/dev/musicratings/bin/console messenger:consume --time-limit=3600

Use the --bus option to specify the message bus to dispatch received messages
to instead of trying to determine it automatically. This is required if the
messages didn't originate from Messenger:

php /Users/boris/dev/musicratings/bin/console messenger:consume --bus=event_bus

Use the --queues option to limit a receiver to only certain queues (only supported by some receivers):

php /Users/boris/dev/musicratings/bin/console messenger:consume --queues=fasttrack

Use the --no-reset option to prevent services resetting after each message (may lead to leaking services' state between messages):

php /Users/boris/dev/musicratings/bin/console messenger:consume --no-reset

Use the --all option to consume from all receivers:

php /Users/boris/dev/musicratings/bin/console messenger:consume --all

Options:
--limit(-l)Limit the number of received messages
--failure-limit(-f)The number of failed messages the worker can consume
--memory-limit(-m)The memory limit the worker can consume
--time-limit(-t)The time limit in seconds the worker can handle new messages
--sleepSeconds to sleep before asking for new messages after no messages were found
--bus(-b)Name of the bus to which received messages should be dispatched (if not passed, bus is determined automatically)
--queuesLimit receivers to only consume from the specified queues
--no-resetDo not reset container services after each message
--allConsume messages from all receivers
--keepaliveWhether to use the transport's keepalive mechanism if implemented
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ receivers[=null] + + + + + + + + + + + + + + + + + + + + + + + +
+ + messenger:failed:remove + messenger:failed:remove removes given messages that are pending in the failure transport.

php /Users/boris/dev/musicratings/bin/console messenger:failed:remove {id1} [{id2} ...]

The specific ids can be found via the messenger:failed:show command.

You can remove all failed messages from the failure transport by using the "--all" option:

php /Users/boris/dev/musicratings/bin/console messenger:failed:remove --all

Options:
--allRemove all failed messages from the transport
--forceForce the operation without confirmation
--transportUse a specific failure transport
--show-messagesDisplay messages before removing it (if multiple ids are given)
--class-filterFilter by a specific class name
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ id[=null] + + + + + + + + + + + + + + + + + + +
+ + messenger:failed:retry + messenger:failed:retry retries message in the failure transport.

php /Users/boris/dev/musicratings/bin/console messenger:failed:retry

The command will interactively ask if each message should be retried,
discarded or skipped.

Some transports support retrying a specific message id, which comes
from the messenger:failed:show command.

php /Users/boris/dev/musicratings/bin/console messenger:failed:retry {id}

Or pass multiple ids at once to process multiple messages:

php /Users/boris/dev/musicratings/bin/console messenger:failed:retry {id1} {id2} {id3}


Options:
--forceForce action without confirmation
--transportUse a specific failure transport
--keepaliveWhether to use the transport's keepalive mechanism if implemented
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ id[=null] + + + + + + + + + + + + + + + + +
+ + messenger:failed:show + messenger:failed:show shows message that are pending in the failure transport.

php /Users/boris/dev/musicratings/bin/console messenger:failed:show

Or look at a specific message by its id:

php /Users/boris/dev/musicratings/bin/console messenger:failed:show {id}

Options:
--maxMaximum number of messages to list
--transportUse a specific failure transport
--statsDisplay the message count by class
--class-filterFilter by a specific class name
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ id[=null] + + + + + + + + + + + + + + + + + +
+ + messenger:setup-transports + messenger:setup-transports command setups the transports:

php /Users/boris/dev/musicratings/bin/console messenger:setup-transports

Or a specific transport only:

php /Users/boris/dev/musicratings/bin/console messenger:setup-transports

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ transport[=null] + + + + + + + + + + + + + +
+ + messenger:stats + messenger:stats command counts the messages for all the transports:

php /Users/boris/dev/musicratings/bin/console messenger:stats

Or specific transports only:

php /Users/boris/dev/musicratings/bin/console messenger:stats

The --format option specifies the format of the command output:

php /Users/boris/dev/musicratings/bin/console messenger:stats --format=json

Options:
--formatThe output format ("txt", "json")
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ transport_names[=null] + + + + + + + + + + + + + + +
+ + messenger:stop-workers + messenger:stop-workers command sends a signal to stop any messenger:consume processes that are running.

php /Users/boris/dev/musicratings/bin/console messenger:stop-workers

Each worker command will finish the message they are currently processing
and then exit. Worker commands are *not* automatically restarted: that
should be handled by a process control system.

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + router:match + router:match shows which routes match a given request and which don't and for what reason:

php /Users/boris/dev/musicratings/bin/console router:match /foo

or

php /Users/boris/dev/musicratings/bin/console router:match /foo --method POST --scheme https --host symfony.com --verbose


Options:
--methodSet the HTTP method
--schemeSet the URI scheme (usually http or https)
--hostSet the URI host
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ path_info + + + + + + + + + + + + + + + + +
+ + secrets:decrypt-to-local + secrets:decrypt-to-local command decrypts all secrets and copies them in the local vault.

/Users/boris/dev/musicratings/bin/console secrets:decrypt-to-local

When the --force option is provided, secrets that already exist in the local vault are overridden.

/Users/boris/dev/musicratings/bin/console secrets:decrypt-to-local --force

Options:
--force(-f)Force overriding of secrets that already exist in the local vault
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + secrets:encrypt-from-local + secrets:encrypt-from-local command encrypts all locally overridden secrets to the vault.

/Users/boris/dev/musicratings/bin/console secrets:encrypt-from-local

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + +
+ + secrets:generate-keys + secrets:generate-keys command generates a new encryption key.

/Users/boris/dev/musicratings/bin/console secrets:generate-keys

If encryption keys already exist, the command must be called with
the --rotate option in order to override those keys and re-encrypt
existing secrets.

/Users/boris/dev/musicratings/bin/console secrets:generate-keys --rotate

Options:
--local(-l)Update the local vault.
--rotate(-r)Re-encrypt existing secrets with the newly generated keys.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + +
+ + secrets:list + secrets:list command list all stored secrets.

/Users/boris/dev/musicratings/bin/console secrets:list

When the option --reveal is provided, the decrypted secrets are also displayed.

/Users/boris/dev/musicratings/bin/console secrets:list --reveal

Options:
--reveal(-r)Display decrypted values alongside names
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + secrets:remove + secrets:remove command removes a secret from the vault.

/Users/boris/dev/musicratings/bin/console secrets:remove

Options:
--local(-l)Update the local vault.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name + + + + + + + + + + + + + + +
+ + secrets:reveal + secrets:reveal command reveals a stored secret.

/Users/boris/dev/musicratings/bin/console secrets:reveal

Options:
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name + + + + + + + + + + + + + +
+ + secrets:set + secrets:set command stores a secret in the vault.

/Users/boris/dev/musicratings/bin/console secrets:set

To reference secrets in services.yaml or any other config
files, use "%env()%".

By default, the secret value should be entered interactively.
Alternatively, provide a file where to read the secret from:

php /Users/boris/dev/musicratings/bin/console secrets:set filename

Use "-" as a file name to read from STDIN:

cat filename | php /Users/boris/dev/musicratings/bin/console secrets:set -

Use --local to override secrets for local needs.

Options:
--local(-l)Update the local vault.
--random(-r)Generate a random value.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ name file[=null] + + + + + + + + + + + + + + + +
+ + security:hash-password + The security:hash-password command hashes passwords according to your
security configuration. This command is mainly used to generate passwords for
the in_memory user provider type and for changing passwords
in the database while developing the application.

Suppose that you have the following security configuration in your application:


# config/packages/security.yml
security:
password_hashers:
Symfony\Component\Security\Core\User\InMemoryUser: plaintext
App\Entity\User: auto


If you execute the command non-interactively, the first available configured
user class under the security.password_hashers key is used and a random salt is
generated to hash the password:

php /Users/boris/dev/musicratings/bin/console security:hash-password --no-interaction [password]

Pass the full user class path as the second argument to hash passwords for
your own entities:

php /Users/boris/dev/musicratings/bin/console security:hash-password --no-interaction [password] 'App\Entity\User'

Executing the command interactively allows you to generate a random salt for
hashing the password:

php /Users/boris/dev/musicratings/bin/console security:hash-password [password] 'App\Entity\User'

In case your hasher doesn't require a salt, add the empty-salt option:

php /Users/boris/dev/musicratings/bin/console security:hash-password --empty-salt [password] 'App\Entity\User'


Options:
--empty-saltDo not generate a salt or let the hasher generate one.
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ password[=null] user-class[=null] + + + + + + + + + + + + + + +
+ + server:dump + server:dump starts a dump server that collects and displays
dumps in a single place for debugging you application:

php /Users/boris/dev/musicratings/bin/console server:dump

You can consult dumped data in HTML format in your browser by providing the --format=html option
and redirecting the output to a file:

php /Users/boris/dev/musicratings/bin/console server:dump --format="html" > dump.html


Options:
--formatThe output format (cli, html)
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + +
+ + server:log + server:log starts a log server to display in real time the log
messages generated by your application:

php /Users/boris/dev/musicratings/bin/console server:log

To filter the log messages using any ExpressionLanguage compatible expression, use the --filter option:

php /Users/boris/dev/musicratings/bin/console server:log --filter="level > 200 or channel in ['app', 'doctrine']"

Options:
--hostThe server host
--formatThe line format
--date-formatThe date format
--filterAn expression to filter log. Example: "level > 200 or channel in ['app', 'doctrine']"
--help(-h)Display help for the given command. When no command is given display help for the list command
--silentDo not output any message
--quiet(-q)Only errors are displayed. All other output is suppressed
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce (or disable --no-ansi) ANSI output
--no-ansiNegate the "--ansi" option
--no-interaction(-n)Do not ask any interactive question
--env(-e)The Environment name.
--no-debugSwitch off debug mode.
--profileEnables profiling (requires debug).

]]>
+ + + + + + + + + + + + + + + + + +
+
+ diff --git a/.idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd b/.idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd new file mode 100644 index 0000000..f2efc6d --- /dev/null +++ b/.idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/musicratings.iml b/.idea/musicratings.iml index 9faa0f0..f17edce 100644 --- a/.idea/musicratings.iml +++ b/.idea/musicratings.iml @@ -91,7 +91,6 @@ - @@ -112,15 +111,12 @@ - - - diff --git a/.idea/php.xml b/.idea/php.xml index 636ecc4..299ff24 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -90,7 +90,6 @@ - @@ -137,9 +136,6 @@ - - - diff --git a/docker-compose.yml b/docker-compose.yml index 809d075..f872111 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,11 +12,9 @@ services: target: dev # change to "prod" for production build args: - APP_ENV=dev - container_name: app-php + container_name: php restart: unless-stopped environment: - # Symfony Messenger (dev-safe default so CLI commands don't fail) - MESSENGER_TRANSPORT_DSN: ${MESSENGER_TRANSPORT_DSN:-sync://} # Doctrine DATABASE_URL consumed by Symfony/Doctrine DATABASE_URL: ${DATABASE_URL:-postgresql://${POSTGRES_USER:-symfony}:${POSTGRES_PASSWORD:-symfony}@db:5432/${POSTGRES_DB:-symfony}?serverVersion=16&charset=utf8} volumes: diff --git a/migrations/Version20251114111853.php b/migrations/Version20251114111853.php new file mode 100644 index 0000000..c2cdbe4 --- /dev/null +++ b/migrations/Version20251114111853.php @@ -0,0 +1,39 @@ +hasTable('albums')) { + return; + } + $this->addSql('CREATE TABLE albums (id SERIAL NOT NULL, spotify_id VARCHAR(64) NOT NULL, name VARCHAR(255) NOT NULL, artists JSON NOT NULL, release_date VARCHAR(20) DEFAULT NULL, total_tracks INT NOT NULL, cover_url VARCHAR(1024) DEFAULT NULL, external_url VARCHAR(1024) DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_F4E2474FA905FC5C ON albums (spotify_id)'); + $this->addSql('COMMENT ON COLUMN albums.created_at IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN albums.updated_at IS \'(DC2Type:datetime_immutable)\''); + } + + public function down(Schema $schema): void + { + // Be defensive: only drop the table if it exists + if ($schema->hasTable('albums')) { + $this->addSql('DROP TABLE albums'); + } + } +} diff --git a/migrations/Version20251114112016.php b/migrations/Version20251114112016.php new file mode 100644 index 0000000..222bf35 --- /dev/null +++ b/migrations/Version20251114112016.php @@ -0,0 +1,40 @@ +addSql('ALTER TABLE albums ALTER created_at TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE albums ALTER updated_at TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('COMMENT ON COLUMN albums.created_at IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN albums.updated_at IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('ALTER INDEX uniq_album_spotify_id RENAME TO UNIQ_F4E2474FA905FC5C'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE albums ALTER created_at TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('ALTER TABLE albums ALTER updated_at TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); + $this->addSql('COMMENT ON COLUMN albums.created_at IS NULL'); + $this->addSql('COMMENT ON COLUMN albums.updated_at IS NULL'); + $this->addSql('ALTER INDEX uniq_f4e2474fa905fc5c RENAME TO uniq_album_spotify_id'); + } +} diff --git a/migrations/Version20251114113000.php b/migrations/Version20251114113000.php new file mode 100644 index 0000000..3181316 --- /dev/null +++ b/migrations/Version20251114113000.php @@ -0,0 +1,62 @@ +addSql('ALTER TABLE reviews ADD album_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE reviews ADD CONSTRAINT FK_6970EF78E0C31AF9 FOREIGN KEY (album_id) REFERENCES albums (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_6970EF78E0C31AF9 ON reviews (album_id)'); + + // Backfill using existing spotify_album_id if both columns exist + // Some environments may not have the legacy column; guard with DO blocks + $this->addSql(<<<'SQL' +DO $$ +BEGIN + IF EXISTS ( + SELECT 1 + FROM information_schema.columns + WHERE table_name='reviews' AND column_name='spotify_album_id' + ) THEN + UPDATE reviews r + SET album_id = a.id + FROM albums a + WHERE a.spotify_id = r.spotify_album_id + AND r.album_id IS NULL; + END IF; +END $$; +SQL); + + // Optionally set NOT NULL if all rows are linked + $this->addSql(<<<'SQL' +DO $$ +BEGIN + IF NOT EXISTS (SELECT 1 FROM reviews WHERE album_id IS NULL) THEN + ALTER TABLE reviews ALTER COLUMN album_id SET NOT NULL; + END IF; +END $$; +SQL); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE reviews DROP CONSTRAINT FK_6970EF78E0C31AF9'); + $this->addSql('DROP INDEX IF EXISTS IDX_6970EF78E0C31AF9'); + $this->addSql('ALTER TABLE reviews DROP COLUMN album_id'); + } +} + + diff --git a/migrations/Version20251114114000.php b/migrations/Version20251114114000.php new file mode 100644 index 0000000..0096ecd --- /dev/null +++ b/migrations/Version20251114114000.php @@ -0,0 +1,45 @@ +addSql(<<<'SQL' +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name='reviews' AND column_name='spotify_album_id') THEN + ALTER TABLE reviews DROP COLUMN spotify_album_id; + END IF; + IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name='reviews' AND column_name='album_name') THEN + ALTER TABLE reviews DROP COLUMN album_name; + END IF; + IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name='reviews' AND column_name='album_artist') THEN + ALTER TABLE reviews DROP COLUMN album_artist; + END IF; +END $$; +SQL); + } + + public function down(Schema $schema): void + { + // Recreate columns as nullable in down migration + $this->addSql('ALTER TABLE reviews ADD spotify_album_id VARCHAR(64) DEFAULT NULL'); + $this->addSql('ALTER TABLE reviews ADD album_name VARCHAR(255) DEFAULT NULL'); + $this->addSql('ALTER TABLE reviews ADD album_artist VARCHAR(255) DEFAULT NULL'); + } +} + + diff --git a/migrations/Version20251114120500.php b/migrations/Version20251114120500.php new file mode 100644 index 0000000..bd9cfd0 --- /dev/null +++ b/migrations/Version20251114120500.php @@ -0,0 +1,41 @@ +addSql("ALTER TABLE albums ADD local_id VARCHAR(64) DEFAULT NULL"); + $this->addSql("ALTER TABLE albums ADD source VARCHAR(16) NOT NULL DEFAULT 'spotify'"); + $this->addSql("ALTER TABLE albums ADD created_by_id INT DEFAULT NULL"); + $this->addSql("ALTER TABLE albums ALTER spotify_id DROP NOT NULL"); + $this->addSql("CREATE UNIQUE INDEX uniq_album_local_id ON albums (local_id)"); + $this->addSql("ALTER TABLE albums ADD CONSTRAINT FK_F4E2474FB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE"); + $this->addSql("CREATE INDEX IDX_F4E2474FB03A8386 ON albums (created_by_id)"); + $this->addSql("UPDATE albums SET source = 'spotify' WHERE source IS NULL"); + } + + public function down(Schema $schema): void + { + $this->addSql("ALTER TABLE albums DROP CONSTRAINT FK_F4E2474FB03A8386"); + $this->addSql("DROP INDEX IF EXISTS uniq_album_local_id"); + $this->addSql("DROP INDEX IF EXISTS IDX_F4E2474FB03A8386"); + $this->addSql("ALTER TABLE albums DROP COLUMN local_id"); + $this->addSql("ALTER TABLE albums DROP COLUMN source"); + $this->addSql("ALTER TABLE albums DROP COLUMN created_by_id"); + $this->addSql("ALTER TABLE albums ALTER spotify_id SET NOT NULL"); + } +} + + diff --git a/migrations/Version20251120174722.php b/migrations/Version20251120174722.php new file mode 100644 index 0000000..6b75a85 --- /dev/null +++ b/migrations/Version20251120174722.php @@ -0,0 +1,34 @@ +addSql('ALTER TABLE reviews ALTER album_id SET NOT NULL'); + $this->addSql('ALTER INDEX idx_6970ef78e0c31af9 RENAME TO IDX_6970EB0F1137ABCF'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE reviews ALTER album_id DROP NOT NULL'); + $this->addSql('ALTER INDEX idx_6970eb0f1137abcf RENAME TO idx_6970ef78e0c31af9'); + } +} diff --git a/migrations/Version20251120175034.php b/migrations/Version20251120175034.php new file mode 100644 index 0000000..53396cc --- /dev/null +++ b/migrations/Version20251120175034.php @@ -0,0 +1,31 @@ +addSql('CREATE SCHEMA public'); + } +} diff --git a/src/Controller/AlbumController.php b/src/Controller/AlbumController.php index 2aa0317..ff318cb 100644 --- a/src/Controller/AlbumController.php +++ b/src/Controller/AlbumController.php @@ -3,19 +3,23 @@ namespace App\Controller; use App\Service\SpotifyClient; +use App\Repository\AlbumRepository; use App\Entity\Review; use App\Form\ReviewType; +use App\Form\AlbumType; use App\Repository\ReviewRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; +use Symfony\Bundle\SecurityBundle\Attribute\IsGranted; +use Psr\Log\LoggerInterface; class AlbumController extends AbstractController { #[Route('/', name: 'album_search', methods: ['GET'])] - public function search(Request $request, SpotifyClient $spotifyClient, ReviewRepository $reviewRepository): Response + public function search(Request $request, SpotifyClient $spotifyClient, ReviewRepository $reviewRepository, AlbumRepository $albumsRepo, EntityManagerInterface $em, LoggerInterface $logger): Response { $query = trim((string) $request->query->get('q', '')); $albumName = trim($request->query->getString('album', '')); @@ -27,6 +31,7 @@ class AlbumController extends AbstractController $yearTo = (preg_match('/^\d{4}$/', $yearToRaw)) ? (int) $yearToRaw : 0; $albums = []; $stats = []; + $savedIds = []; // Build Spotify fielded search if advanced inputs are supplied $advancedUsed = ($albumName !== '' || $artist !== '' || $yearFrom > 0 || $yearTo > 0); @@ -50,12 +55,45 @@ class AlbumController extends AbstractController if ($q !== '') { $result = $spotifyClient->searchAlbums($q, 20); - $albums = $result['albums']['items'] ?? []; - if ($albums) { - $ids = array_values(array_map(static fn($a) => $a['id'] ?? null, $albums)); - $ids = array_filter($ids, static fn($v) => is_string($v) && $v !== ''); + $searchItems = $result['albums']['items'] ?? []; + $logger->info('Album search results received', ['query' => $q, 'items' => is_countable($searchItems) ? count($searchItems) : 0]); + if ($searchItems) { + // Build ordered list of IDs from search results + $ids = []; + foreach ($searchItems as $it) { + $id = isset($it['id']) ? (string) $it['id'] : ''; + if ($id !== '') { $ids[] = $id; } + } + $ids = array_values(array_unique($ids)); + $logger->info('Album IDs extracted from search', ['count' => count($ids)]); + + // Fetch full album objects to have consistent fields, then upsert + $full = $spotifyClient->getAlbums($ids); + $albumsPayload = is_array($full) ? ($full['albums'] ?? []) : []; + if ($albumsPayload === [] && $searchItems !== []) { + // Fallback to search items if getAlbums failed + $albumsPayload = $searchItems; + $logger->warning('Spotify getAlbums returned empty; falling back to search items', ['count' => count($albumsPayload)]); + } + $upserted = 0; + foreach ($albumsPayload as $sa) { + $albumsRepo->upsertFromSpotifyAlbum((array) $sa); + $upserted++; + } + $em->flush(); + $logger->info('Albums upserted to DB', ['upserted' => $upserted]); + if ($ids) { $stats = $reviewRepository->getAggregatesForAlbumIds($ids); + $existing = $albumsRepo->findBySpotifyIdsKeyed($ids); + $savedIds = array_keys($existing); + // Preserve Spotify order and render from DB + $albums = []; + foreach ($ids as $sid) { + if (isset($existing[$sid])) { + $albums[] = $existing[$sid]->toTemplateArray(); + } + } } } } @@ -68,18 +106,56 @@ class AlbumController extends AbstractController 'year_to' => $yearTo ?: '', 'albums' => $albums, 'stats' => $stats, + 'savedIds' => $savedIds, + ]); + } + + #[IsGranted('ROLE_USER')] + #[Route('/albums/new', name: 'album_new', methods: ['GET', 'POST'])] + public function new(Request $request, AlbumRepository $albumsRepo, EntityManagerInterface $em): Response + { + $album = new \App\Entity\Album(); + $album->setSource('user'); + $form = $this->createForm(AlbumType::class, $album); + $form->handleRequest($request); + if ($form->isSubmitted() && $form->isValid()) { + // Map artistsCsv -> artists[] + $artistsCsv = (string) $form->get('artistsCsv')->getData(); + $artists = array_values(array_filter(array_map(static fn($s) => trim((string) $s), explode(',', $artistsCsv)), static fn($s) => $s !== '')); + $album->setArtists($artists); + // Assign createdBy and generate unique localId + $u = $this->getUser(); + if ($u instanceof \App\Entity\User) { + $album->setCreatedBy($u); + } + $album->setLocalId($this->generateLocalId($albumsRepo)); + $em->persist($album); + $em->flush(); + $this->addFlash('success', 'Album created.'); + return $this->redirectToRoute('album_show', ['id' => $album->getLocalId()]); + } + return $this->render('album/new.html.twig', [ + 'form' => $form->createView(), ]); } #[Route('/albums/{id}', name: 'album_show', methods: ['GET', 'POST'])] - public function show(string $id, Request $request, SpotifyClient $spotifyClient, ReviewRepository $reviews, EntityManagerInterface $em): Response + public function show(string $id, Request $request, SpotifyClient $spotifyClient, ReviewRepository $reviews, AlbumRepository $albumsRepo, EntityManagerInterface $em): Response { - $album = $spotifyClient->getAlbum($id); - if ($album === null) { - throw $this->createNotFoundException('Album not found'); + // Prefer DB: only fetch from Spotify if not present + $albumEntity = str_starts_with($id, 'u_') ? $albumsRepo->findOneByLocalId($id) : $albumsRepo->findOneBySpotifyId($id); + if (!$albumEntity) { + $spotifyAlbum = $spotifyClient->getAlbum($id); + if ($spotifyAlbum === null) { + throw $this->createNotFoundException('Album not found'); + } + $albumEntity = $albumsRepo->upsertFromSpotifyAlbum($spotifyAlbum); + $em->flush(); } + $isSaved = $albumEntity !== null; + $album = $albumEntity->toTemplateArray(); - $existing = $reviews->findBy(['spotifyAlbumId' => $id], ['createdAt' => 'DESC']); + $existing = $reviews->findBy(['album' => $albumEntity], ['createdAt' => 'DESC']); $count = count($existing); $avg = 0.0; if ($count > 0) { @@ -90,9 +166,7 @@ class AlbumController extends AbstractController // Pre-populate required album metadata before validation so entity constraints pass $review = new Review(); - $review->setSpotifyAlbumId($id); - $review->setAlbumName($album['name'] ?? ''); - $review->setAlbumArtist(implode(', ', array_map(fn($a) => $a['name'], $album['artists'] ?? []))); + $review->setAlbum($albumEntity); $form = $this->createForm(ReviewType::class, $review); $form->handleRequest($request); @@ -108,12 +182,79 @@ class AlbumController extends AbstractController return $this->render('album/show.html.twig', [ 'album' => $album, 'albumId' => $id, + 'isSaved' => $isSaved, 'reviews' => $existing, 'avg' => $avg, 'count' => $count, 'form' => $form->createView(), ]); } + + #[IsGranted('ROLE_USER')] + #[Route('/albums/{id}/save', name: 'album_save', methods: ['POST'])] + public function save(string $id, Request $request, SpotifyClient $spotifyClient, AlbumRepository $albumsRepo, EntityManagerInterface $em): Response + { + $token = (string) $request->request->get('_token'); + if (!$this->isCsrfTokenValid('save-album-' . $id, $token)) { + throw $this->createAccessDeniedException('Invalid CSRF token.'); + } + $existing = $albumsRepo->findOneBySpotifyId($id); + if (!$existing) { + $spotifyAlbum = $spotifyClient->getAlbum($id); + if ($spotifyAlbum === null) { + throw $this->createNotFoundException('Album not found'); + } + $albumsRepo->upsertFromSpotifyAlbum($spotifyAlbum); + $em->flush(); + $this->addFlash('success', 'Album saved.'); + } else { + $this->addFlash('info', 'Album already saved.'); + } + return $this->redirectToRoute('album_show', ['id' => $id]); + } + + #[IsGranted('ROLE_USER')] + #[Route('/albums/{id}/delete', name: 'album_delete', methods: ['POST'])] + public function delete(string $id, Request $request, AlbumRepository $albumsRepo, EntityManagerInterface $em): Response + { + $token = (string) $request->request->get('_token'); + if (!$this->isCsrfTokenValid('delete-album-' . $id, $token)) { + throw $this->createAccessDeniedException('Invalid CSRF token.'); + } + $album = str_starts_with($id, 'u_') ? $albumsRepo->findOneByLocalId($id) : $albumsRepo->findOneBySpotifyId($id); + if ($album) { + // Only owner or admin can delete user albums; Spotify albums require admin + $isAdmin = $this->isGranted('ROLE_ADMIN'); + if ($album->getSource() === 'user') { + $current = $this->getUser(); + $isOwner = false; + if ($current instanceof \App\Entity\User) { + $isOwner = ($album->getCreatedBy()?->getId() === $current->getId()); + } + if (!$isAdmin && !$isOwner) { + throw $this->createAccessDeniedException(); + } + } else { + if (!$isAdmin) { + throw $this->createAccessDeniedException(); + } + } + $em->remove($album); + $em->flush(); + $this->addFlash('success', 'Album deleted.'); + } else { + $this->addFlash('info', 'Album not found.'); + } + return $this->redirectToRoute('album_search'); + } + + private function generateLocalId(AlbumRepository $albumsRepo): string + { + do { + $id = 'u_' . bin2hex(random_bytes(6)); + } while ($albumsRepo->findOneByLocalId($id) !== null); + return $id; + } } diff --git a/src/Entity/Album.php b/src/Entity/Album.php new file mode 100644 index 0000000..99967f8 --- /dev/null +++ b/src/Entity/Album.php @@ -0,0 +1,151 @@ + + */ + #[ORM\Column(type: 'json')] + private array $artists = []; + + // Stored as given by Spotify: YYYY or YYYY-MM or YYYY-MM-DD + #[ORM\Column(type: 'string', length: 20, nullable: true)] + private ?string $releaseDate = null; + + #[ORM\Column(type: 'integer')] + private int $totalTracks = 0; + + #[ORM\Column(type: 'string', length: 1024, nullable: true)] + private ?string $coverUrl = null; + + #[ORM\Column(type: 'string', length: 1024, nullable: true)] + private ?string $externalUrl = null; + + #[ORM\ManyToOne(targetEntity: User::class)] + #[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')] + private ?User $createdBy = null; + + #[ORM\Column(type: 'datetime_immutable')] + private ?\DateTimeImmutable $createdAt = null; + + #[ORM\Column(type: 'datetime_immutable')] + private ?\DateTimeImmutable $updatedAt = null; + + #[ORM\PrePersist] + public function onPrePersist(): void + { + $now = new \DateTimeImmutable(); + $this->createdAt = $now; + $this->updatedAt = $now; + } + + #[ORM\PreUpdate] + public function onPreUpdate(): void + { + $this->updatedAt = new \DateTimeImmutable(); + } + + public function getId(): ?int { return $this->id; } + + public function getSpotifyId(): ?string { return $this->spotifyId; } + public function setSpotifyId(?string $spotifyId): void { $this->spotifyId = $spotifyId; } + public function getLocalId(): ?string { return $this->localId; } + public function setLocalId(?string $localId): void { $this->localId = $localId; } + public function getSource(): string { return $this->source; } + public function setSource(string $source): void { $this->source = $source; } + + public function getName(): string { return $this->name; } + public function setName(string $name): void { $this->name = $name; } + + /** + * @return list + */ + public function getArtists(): array { return $this->artists; } + /** + * @param list $artists + */ + public function setArtists(array $artists): void { $this->artists = array_values($artists); } + + public function getReleaseDate(): ?string { return $this->releaseDate; } + public function setReleaseDate(?string $releaseDate): void { $this->releaseDate = $releaseDate; } + + public function getTotalTracks(): int { return $this->totalTracks; } + public function setTotalTracks(int $totalTracks): void { $this->totalTracks = $totalTracks; } + + public function getCoverUrl(): ?string { return $this->coverUrl; } + public function setCoverUrl(?string $coverUrl): void { $this->coverUrl = $coverUrl; } + + public function getExternalUrl(): ?string { return $this->externalUrl; } + public function setExternalUrl(?string $externalUrl): void { $this->externalUrl = $externalUrl; } + public function getCreatedBy(): ?User { return $this->createdBy; } + public function setCreatedBy(?User $user): void { $this->createdBy = $user; } + + public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } + public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } + + /** + * Shape the album like the Spotify payload expected by Twig templates. + * + * @return array + */ + public function toTemplateArray(): array + { + $images = []; + if ($this->coverUrl) { + $images = [ + ['url' => $this->coverUrl], + ['url' => $this->coverUrl], + ]; + } + $artists = array_map(static fn(string $n) => ['name' => $n], $this->artists); + $external = $this->externalUrl; + if ($external === null && $this->source === 'spotify' && $this->spotifyId) { + $external = 'https://open.spotify.com/album/' . $this->spotifyId; + } + $publicId = $this->source === 'user' ? (string) $this->localId : (string) $this->spotifyId; + + return [ + 'id' => $publicId, + 'name' => $this->name, + 'images' => $images, + 'artists' => $artists, + 'release_date' => $this->releaseDate, + 'total_tracks' => $this->totalTracks, + 'external_urls' => [ 'spotify' => $external ], + 'source' => $this->source, + ]; + } +} + + diff --git a/src/Entity/Review.php b/src/Entity/Review.php index 5935ca0..1ce7947 100644 --- a/src/Entity/Review.php +++ b/src/Entity/Review.php @@ -3,6 +3,7 @@ namespace App\Entity; use App\Repository\ReviewRepository; +use App\Entity\Album; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; @@ -20,17 +21,9 @@ class Review #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] private ?User $author = null; - #[ORM\Column(type: 'string', length: 64)] - #[Assert\NotBlank] - private string $spotifyAlbumId = ''; - - #[ORM\Column(type: 'string', length: 255)] - #[Assert\NotBlank] - private string $albumName = ''; - - #[ORM\Column(type: 'string', length: 255)] - #[Assert\NotBlank] - private string $albumArtist = ''; + #[ORM\ManyToOne(targetEntity: Album::class)] + #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] + private ?Album $album = null; #[ORM\Column(type: 'string', length: 160)] #[Assert\NotBlank] @@ -69,12 +62,8 @@ class Review public function getId(): ?int { return $this->id; } public function getAuthor(): ?User { return $this->author; } public function setAuthor(User $author): void { $this->author = $author; } - public function getSpotifyAlbumId(): string { return $this->spotifyAlbumId; } - public function setSpotifyAlbumId(string $spotifyAlbumId): void { $this->spotifyAlbumId = $spotifyAlbumId; } - public function getAlbumName(): string { return $this->albumName; } - public function setAlbumName(string $albumName): void { $this->albumName = $albumName; } - public function getAlbumArtist(): string { return $this->albumArtist; } - public function setAlbumArtist(string $albumArtist): void { $this->albumArtist = $albumArtist; } + public function getAlbum(): ?Album { return $this->album; } + public function setAlbum(Album $album): void { $this->album = $album; } public function getTitle(): string { return $this->title; } public function setTitle(string $title): void { $this->title = $title; } public function getContent(): string { return $this->content; } diff --git a/src/Form/AlbumType.php b/src/Form/AlbumType.php new file mode 100644 index 0000000..29fe34e --- /dev/null +++ b/src/Form/AlbumType.php @@ -0,0 +1,51 @@ +add('name', TextType::class, [ + 'constraints' => [new Assert\NotBlank(), new Assert\Length(max: 255)], + ]) + ->add('artistsCsv', TextType::class, [ + 'mapped' => false, + 'label' => 'Artists (comma-separated)', + 'constraints' => [new Assert\NotBlank()], + ]) + ->add('releaseDate', TextType::class, [ + 'required' => false, + 'help' => 'YYYY or YYYY-MM or YYYY-MM-DD', + ]) + ->add('totalTracks', IntegerType::class, [ + 'constraints' => [new Assert\Range(min: 0, max: 500)], + ]) + ->add('coverUrl', TextType::class, [ + 'required' => false, + ]) + ->add('externalUrl', TextType::class, [ + 'required' => false, + 'label' => 'External link', + ]); + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Album::class, + ]); + } +} + + diff --git a/src/Repository/AlbumRepository.php b/src/Repository/AlbumRepository.php new file mode 100644 index 0000000..4f97de2 --- /dev/null +++ b/src/Repository/AlbumRepository.php @@ -0,0 +1,107 @@ + + */ +class AlbumRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Album::class); + } + + public function findOneBySpotifyId(string $spotifyId): ?Album + { + return $this->findOneBy(['spotifyId' => $spotifyId]); + } + + public function findOneByLocalId(string $localId): ?Album + { + return $this->findOneBy(['localId' => $localId]); + } + + /** + * @param list $spotifyIds + * @return array keyed by spotifyId + */ + public function findBySpotifyIdsKeyed(array $spotifyIds): array + { + if ($spotifyIds === []) { + return []; + } + $rows = $this->createQueryBuilder('a') + ->where('a.spotifyId IN (:ids)') + ->setParameter('ids', $spotifyIds) + ->getQuery() + ->getResult(); + $out = []; + foreach ($rows as $row) { + if ($row instanceof Album) { + $out[$row->getSpotifyId()] = $row; + } + } + return $out; + } + + /** + * @return list + */ + public function searchUserAlbumsByNameLike(string $query, int $limit = 20): array + { + $qb = $this->createQueryBuilder('a') + ->where('a.source = :src') + ->andWhere('LOWER(a.name) LIKE :q') + ->setParameter('src', 'user') + ->setParameter('q', '%' . mb_strtolower($query) . '%') + ->setMaxResults($limit); + return $qb->getQuery()->getResult(); + } + + /** + * Upsert based on a Spotify album payload. + * + * @param array $spotifyAlbum + */ + public function upsertFromSpotifyAlbum(array $spotifyAlbum): Album + { + $spotifyId = (string) ($spotifyAlbum['id'] ?? ''); + $name = (string) ($spotifyAlbum['name'] ?? ''); + $artists = array_values(array_map(static fn($a) => (string) ($a['name'] ?? ''), (array) ($spotifyAlbum['artists'] ?? []))); + $releaseDate = isset($spotifyAlbum['release_date']) ? (string) $spotifyAlbum['release_date'] : null; + $totalTracks = (int) ($spotifyAlbum['total_tracks'] ?? 0); + + $images = (array) ($spotifyAlbum['images'] ?? []); + $coverUrl = null; + if (isset($images[1]['url'])) { + $coverUrl = (string) $images[1]['url']; + } elseif (isset($images[0]['url'])) { + $coverUrl = (string) $images[0]['url']; + } + $external = null; + if (isset($spotifyAlbum['external_urls']['spotify'])) { + $external = (string) $spotifyAlbum['external_urls']['spotify']; + } + + $em = $this->getEntityManager(); + $album = $this->findOneBy(['spotifyId' => $spotifyId]) ?? new Album(); + $album->setSource('spotify'); + $album->setSpotifyId($spotifyId); + $album->setName($name); + $album->setArtists($artists); + $album->setReleaseDate($releaseDate); + $album->setTotalTracks($totalTracks); + $album->setCoverUrl($coverUrl); + $album->setExternalUrl($external); + $em->persist($album); + // flush outside for batching + return $album; + } +} + + diff --git a/src/Repository/ReviewRepository.php b/src/Repository/ReviewRepository.php index 8341952..1e08e62 100644 --- a/src/Repository/ReviewRepository.php +++ b/src/Repository/ReviewRepository.php @@ -29,7 +29,7 @@ class ReviewRepository extends ServiceEntityRepository } /** - * Return aggregates for albums: [albumId => ['count' => int, 'avg' => float]]. + * Return aggregates for albums by Spotify IDs: [spotifyId => {count, avg}]. * * @param list $albumIds * @return array @@ -40,13 +40,13 @@ class ReviewRepository extends ServiceEntityRepository return []; } - $rows = $this->createQueryBuilder('r') - ->select('r.spotifyAlbumId AS albumId, COUNT(r.id) AS cnt, AVG(r.rating) AS avgRating') - ->where('r.spotifyAlbumId IN (:ids)') + $qb = $this->createQueryBuilder('r') + ->innerJoin('r.album', 'a') + ->select('a.spotifyId AS albumId, COUNT(r.id) AS cnt, AVG(r.rating) AS avgRating') + ->where('a.spotifyId IN (:ids)') ->setParameter('ids', $albumIds) - ->groupBy('r.spotifyAlbumId') - ->getQuery() - ->getArrayResult(); + ->groupBy('a.spotifyId'); + $rows = $qb->getQuery()->getArrayResult(); $out = []; foreach ($rows as $row) { diff --git a/templates/album/new.html.twig b/templates/album/new.html.twig new file mode 100644 index 0000000..62caac8 --- /dev/null +++ b/templates/album/new.html.twig @@ -0,0 +1,16 @@ +{% extends 'base.html.twig' %} +{% block title %}Create Album{% endblock %} +{% block body %} +

Create album

+ {{ form_start(form, {attr: {class: 'vstack gap-3', novalidate: 'novalidate'}}) }} +
{{ form_label(form.name) }}{{ form_widget(form.name, {attr: {class: 'form-control'}}) }}{{ form_errors(form.name) }}
+
{{ form_label(form.artistsCsv) }}{{ form_widget(form.artistsCsv, {attr: {class: 'form-control'}}) }}
+
{{ form_label(form.releaseDate) }}{{ form_widget(form.releaseDate, {attr: {class: 'form-control'}}) }}
+
{{ form_label(form.totalTracks) }}{{ form_widget(form.totalTracks, {attr: {class: 'form-control'}}) }}
+
{{ form_label(form.coverUrl) }}{{ form_widget(form.coverUrl, {attr: {class: 'form-control'}}) }}
+
{{ form_label(form.externalUrl) }}{{ form_widget(form.externalUrl, {attr: {class: 'form-control'}}) }}
+ + {{ form_end(form) }} +{% endblock %} + + diff --git a/templates/album/search.html.twig b/templates/album/search.html.twig index f6fdea0..ae77ddd 100644 --- a/templates/album/search.html.twig +++ b/templates/album/search.html.twig @@ -54,6 +54,19 @@
Open in Spotify Reviews + {% if album.source is defined and album.source == 'user' %} + User album + {% endif %} + {% if app.user %} + {% if savedIds is defined and (album.id in savedIds) %} + Saved + {% else %} +
+ + +
+ {% endif %} + {% endif %}
diff --git a/templates/album/show.html.twig b/templates/album/show.html.twig index 2683162..118787b 100644 --- a/templates/album/show.html.twig +++ b/templates/album/show.html.twig @@ -14,6 +14,21 @@

Released {{ album.release_date }} • {{ album.total_tracks }} tracks

User score: {{ avg }}/10 ({{ count }})

Open in Spotify + {% if album.source is defined and album.source == 'user' %} + User album + {% endif %} + {% if app.user and (isSaved is defined) and (not isSaved) %} +
+ + +
+ {% endif %} + {% if is_granted('ROLE_ADMIN') %} +
+ + +
+ {% endif %} diff --git a/templates/review/edit.html.twig b/templates/review/edit.html.twig index ef74d9f..5acd73e 100644 --- a/templates/review/edit.html.twig +++ b/templates/review/edit.html.twig @@ -2,7 +2,7 @@ {% block title %}Edit Review{% endblock %} {% block body %}

Edit review

-

{{ review.albumName }} — {{ review.albumArtist }} ({{ review.spotifyAlbumId }})

+

{{ review.album.name }} — {{ review.album.artists|join(', ') }}

{{ form_start(form, {attr: {class: 'vstack gap-3', novalidate: 'novalidate'}}) }}
{{ form_label(form.title) }}{{ form_widget(form.title, {attr: {class: 'form-control'}}) }}{{ form_errors(form.title) }}
diff --git a/templates/review/index.html.twig b/templates/review/index.html.twig index e65efb9..b8c5a89 100644 --- a/templates/review/index.html.twig +++ b/templates/review/index.html.twig @@ -14,7 +14,7 @@
{{ r.title }} (Rating {{ r.rating }}/10)
-
{{ r.albumName }} — {{ r.albumArtist }}
+
{{ r.album.name }} — {{ r.album.artists|join(', ') }}

{{ r.content|u.truncate(220, '…', false) }}

Read more
diff --git a/templates/review/new.html.twig b/templates/review/new.html.twig index 7c2aaee..fa0c217 100644 --- a/templates/review/new.html.twig +++ b/templates/review/new.html.twig @@ -2,21 +2,7 @@ {% block title %}New Review{% endblock %} {% block body %}

Write a review

- -
-
- - -
-
- - -
-
-
- - -
+
Pick an album first, then write your review on its page.
{{ form_start(form, {attr: {class: 'vstack gap-3', novalidate: 'novalidate'}}) }}
{{ form_label(form.title) }}{{ form_widget(form.title, {attr: {class: 'form-control'}}) }}{{ form_errors(form.title) }}
diff --git a/templates/review/show.html.twig b/templates/review/show.html.twig index 2955f8b..d7bf782 100644 --- a/templates/review/show.html.twig +++ b/templates/review/show.html.twig @@ -3,7 +3,10 @@ {% block body %}

← Back

{{ review.title }} (Rating {{ review.rating }}/10)

-

{{ review.albumName }} — {{ review.albumArtist }} ({{ review.spotifyAlbumId }})

+

+ {{ review.album.name }} — {{ review.album.artists|join(', ') }} + View album +

{{ review.content|nl2br }}