Skip to content

Latest commit

 

History

History
85 lines (77 loc) · 3.48 KB

AFNOTES.md

File metadata and controls

85 lines (77 loc) · 3.48 KB

A list of tasks for this app

Session management and routing

  • Create a new controller to explore sessions

  • Create routes using xml and php instead of attributes

  • There is a missing piece to the jigsaw puzzle in Symfony documentation.

  • Xml routes in routes.xml do not work without further configuration.

  • The gap in the documentation is filled by a Symfony 6 youtube video

  • Add code to Kernel.php to enable xml and php routing

  • Create sessions routes to store and retrieve session data

  • Start a session in a controller using Request object

  • Start a session in a controller using $session = new Session();

  • Sessions are started as soon as any session data is accessed

  • By default, sessions cookies are created for anonymous users

  • This can impact performance

  • Store sessions in the database

  • Use debugging commands for session configuration

  • Symfony docs session configuration

  • store sessions in a database

  • Login to the site

  • Create a registration form using make command

  • Create a login form using make command

  • Register a new user account

  • Login using that account

  • Setup basic security firewalls.

  • Find out if the database runs in docker or is sqlite

  • Start the database

  • Add fixtures to load fake users

Advanced routing

  • Create a php route
  • Do

Theming with Tailwind

  • [x]] Install asset-mapper
  • Use php bin/console debug:asset-map to show mapped paths and their assets
  • Use php bin/console config:dump framework asset_mapper for config options
  • Run php bin/console importmap:audit to check security vulnerabilities
  • Install Tailwind
  • Use composer require symfonycasts/tailwind-bundle
  • Use php bin/console tailwind:init
  • Add the Tailwind input file to base.html.twig
  • Configure Tailwind
  • Symfony tailwind docs
  • Use php bin/console tailwind:build --watch [ ]

Doctrine database

  • Clean up the multiple migrations
  • https://symfonycasts.com/blog/clean-up-migrations
  • Change the postgres database user password
  • Run: docker compose ps to find the external port number
  • Then run: psql --user=app --port=32770 --host=127.0.0.1 --password app where 'app' is name of db
  • In psql client run: ALTER USER user_name WITH PASSWORD 'new_password';
  • Alternatively run: docker compose exec database psql --username app --password app then enter the password

HTTP Request and Response Objects

-[x] Create a new Controller nommé LaDemandeHttp

  • Utilisez les méthodes de la HTTPFoundation component
  • Utilise $request = Request::createFromGlobals();
  • les fondamentales de http

HTTP Kernel

Caching

  • Use bin/console debug:autowiring cache

code Link title bold text Unordered list

  • First item Fenced code block
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

Emoji That is so funny! 😂