devel:symfony
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
devel:symfony [2023/03/23 10:48] – angelegt jodoc | devel:symfony [2023/04/04 15:55] (aktuell) – jodoc | ||
---|---|---|---|
Zeile 2: | Zeile 2: | ||
+ | ===== Initialization ===== | ||
+ | < | ||
+ | symfony new projectname [--webapp] | ||
+ | cd projectname | ||
+ | composer req templates | ||
+ | composer req debug # install debug tools | ||
+ | composer req symfony/ | ||
+ | composer req symfony/ | ||
+ | composer req --dev symfony/ | ||
+ | </ | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | Create '' | ||
+ | |||
+ | < | ||
+ | # start docker db | ||
+ | docker compose up -d | ||
+ | # ensure db exists | ||
+ | ./ | ||
+ | </ | ||
+ | |||
+ | ===== Code Generation ===== | ||
+ | |||
+ | < | ||
+ | # create entity | ||
+ | ./ | ||
+ | # ... | ||
+ | # crea db stuff | ||
+ | ./ | ||
+ | ./ | ||
+ | |||
+ | # now the crud part | ||
+ | |||
+ | # add a couple of make:crud dependencies | ||
+ | composer req form validator security-csrf annotations | ||
+ | # get rid of deprecated stuff (does not work...) | ||
+ | # composer remove sensio/ | ||
+ | # now create controller etc. | ||
+ | ./ | ||
+ | |||
+ | # start up server | ||
+ | symfony server: | ||
+ | |||
+ | # and go to /user/ in browser | ||
+ | </ | ||
+ | |||
+ | |||
+ | later... | ||
+ | |||
+ | < | ||
+ | composer recipes | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | docker-compose.yml | ||
+ | < | ||
+ | version: ' | ||
+ | |||
+ | services: | ||
+ | db: | ||
+ | image: mariadb: | ||
+ | volumes: | ||
+ | - ./ | ||
+ | ports: | ||
+ | - 3306:3306 | ||
+ | restart: unless-stopped | ||
+ | environment: | ||
+ | MARIADB_ROOT_PASSWORD: | ||
+ | MARIADB_DATABASE: | ||
+ | MARIADB_USER: | ||
+ | MARIADB_PASSWORD: | ||
+ | adminer: | ||
+ | image: adminer | ||
+ | restart: always | ||
+ | ports: | ||
+ | - 8080:8080 | ||
+ | </ | ||
+ | |||
+ | .env: | ||
+ | < | ||
+ | DATABASE_URL=" | ||
+ | </ | ||
+ | --- // |
devel/symfony.1679564898.txt.gz · Zuletzt geändert: 2023/03/23 10:48 von jodoc