https://symfony.com/doc/6.2/the-fast-track/en
- is using mysql instead of postgresql
- symfony CLI is not installed
- code is not deployed on platform.sh
docker-compose exec app symfony-guestbook/bin/console security:hash-password
docker-compose exec app symfony-guestbook/bin/console make:test TestCase SpamCheckerTest
docker-compose exec app symfony-guestbook/bin/console doctrine:database:create --env=test
docker-compose exec app symfony-guestbook/bin/console doctrine:fixtures:load --env=test
docker-compose exec app symfony-guestbook/bin/console messenger:consume async -vv
docker-compose exec app composer -d symfony-guestbook/ require symfony/workflow
docker-compose exec app symfony-guestbook/bin/console workflow:dump comment | dot -Tpng -o ./symfony-guestbook/workflow.png
docker-compose exec app symfony-guestbook/bin/console debug:container workflow
docker-compose exec app symfony-guestbook/bin/console debug:autowiring workflow
curl -s -I -X GET http://localhost
# First request is a 'miss'
HTTP/1.1 200 OK
Server: nginx/1.23.4
Content-Type: text/html; charset=UTF-8
Content-Length: 68418
Connection: keep-alive
X-Powered-By: PHP/8.2.12
Cache-Control: public, s-maxage=3600
Date: Mon, 27 Nov 2023 12:01:37 GMT
X-Debug-Token: cea4e1
X-Debug-Token-Link: http://localhost/_profiler/cea4e1
X-Robots-Tag: noindex
X-Content-Digest: end88bc5ef519a8c5515eb16831d43377c
Age: 0
X-Symfony-Cache: GET /: miss, store
# Second request is a 'fresh' and Age is also changed
HTTP/1.1 200 OK
Server: nginx/1.23.4
Content-Type: text/html; charset=UTF-8
Content-Length: 68418
Connection: keep-alive
X-Powered-By: PHP/8.2.12
Cache-Control: public, s-maxage=3600
date: Mon, 27 Nov 2023 12:01:37 GMT
x-debug-token: cea4e1
x-debug-token-link: http://localhost/_profiler/cea4e1
x-robots-tag: noindex
x-content-digest: end88bc5ef519a8c5515eb16831d43377c
Age: 106
X-Symfony-Cache: GET /: fresh
curl -s -I -X PURGE -u admin:password http://localhost/admin/http-cache/
curl -s -I -X PURGE -u admin:password http://localhost/admin/http-cache/conference_header
docker-compose exec -e API_ENDPOINT="http://symfony-guestbook.loc/" app npm run dev --prefix symfony-guestbook/spa/
docker-compose exec app npm run cordova create app --prefix symfony-guestbook/spa/
docker-compose exec app npm run cordova platform add android --prefix symfony-guestbook/spa/app
# then run npm run dev to build and copy content of public to app/www
rm -rf spa/app/www/
mkdir -p spa/app/www
cp -r spa/public/ spa/app/www/
docker-compose exec app symfony-guestbook/bin/console translation:extract fr --force --domain=messages
docker-compose exec -e APP_ENV=test -e KERNEL_CLASS="App\Kernel" -e CORS_ALLOW_ORIGIN="^http?://(localhost|127\.0\.0\.1|spa\.symfony-guestbook\.loc)(:[0-9]+)?" app symfony-guestbook/vendor/bin/phpunit symfony-guestbook/tests/
- workflows should be probably used with some additional checks.
- DO NOT forget to clean your cached views for the env you're working on when make changes on templates
rm -rf var/cache/dev