Rewrite docs#236
Conversation
Remove deployment, fixtures, migrations, autocomplete, pdf, and components.html — these document default Symfony or third-party behaviour, not this bundle. Merge docs/frontend/mails.md into docs/mails.md and move all remaining docs to docs/ root. Delete docs/deployment/, docs/development/, and docs/frontend/ subdirectories. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Includes subsystem table, request lifecycle diagram, key injectable services, PHP attributes reference, and pointers to external packages that were previously documented in removed stub files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All four were 6-15 lines with no actionable detail. Now each follows the standard format: purpose, prerequisites, usage, options, examples, troubleshooting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- using-date-pickers: fix cut-off code block, add full options table and troubleshooting - forms: document ImageType, FileType, BelgiumPostCodeType + all type extensions (CollectionType, PasswordType, date/time pickers) with full option tables - menu: fix typo in example (extra quote), add icon usage, active-state patterns, dropdown example, troubleshooting - pagination: fix session key inconsistency (vegetation_filter -> user_filter), add full Paginator API reference table, sorting example, troubleshooting - mails: already merged from frontend/mails.md in commit 1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each doc now has: one-line purpose, prerequisites, options/reference table, usage examples, and troubleshooting section. - audit-trail: add log format key table (C/U/D), options table, troubleshooting; fix typo AuditTrial -> AuditTrail - breadcrumb: add options table, Twig rendering section, troubleshooting - title: add options table, troubleshooting - uploading-files/images: modernize entity examples from annotations to PHP 8 attributes (#[ORM\*]); remove FOSUserBundle references; add troubleshooting - ajax-client: add prerequisites, multipart upload example, troubleshooting - button-locations: add purpose line, accessibility notes - language-switch: expand locales config, fix Twig snippet formatting, add troubleshooting - stimulus: add prerequisites, lifecycle hooks reference table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CLAUDE.md: update subsystem links from docs/development/* to docs/*, fix BreadcrumbListener event name (controller_arguments, not controller), update Documentation section to point to docs/index.md and describe the doc format standard - README.md: improve description to name specific subsystems, update Documentation section to point to docs/index.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reviewer's GuideRewrite and reorganize documentation for multiple bundle subsystems (audit trail, breadcrumbs, titles, forms, uploads, pagination, menus, frontend, etc.), moving docs out of File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
2ba5bcc to
b6d415c
Compare
| IndexController.php | ||
| CreateController.php | ||
| UpdateController.php | ||
| DeleteController.php |
There was a problem hiding this comment.
Hmm ik smijt dat eigenlijk zo goed als altijd in de UpdateController (en dan via modal in template)
There was a problem hiding this comment.
Mja, moeten we eens over hebben.
Ik vind dat op zich wel handig om aparte Delete Controller te hebben. Voordelen die ik zie:
- Heel expliciet
- Single responsibility
- Je kan met form werken
| create.html.twig | ||
| update.html.twig | ||
| translations/ | ||
| messages.en.yaml |
There was a problem hiding this comment.
Zou het "beter" zijn om de icu-versie te gebruiken? En mss ook direct NL? messages+intl-icu.nl.yaml
There was a problem hiding this comment.
Best keer bespreken, want mijne maat Claude zegt:
Het hangt af van wat je nodig hebt, maar voor nieuwe projecten is messages+intl-icu.nl.yaml meestal de betere keuze.
ICU (+intl-icu)
- Standaard ICU MessageFormat syntax, dus overdraagbaar naar andere tools en vertalers die ICU kennen (Crowdin, Lokalise, etc. ondersteunen dit native)
- Correcte pluralisatie en gender-regels per taal, niet Symfony's eigen ||-syntax
- Vereist de intl PHP-extensie (heb je vrijwel zeker al actief)
- Iets duurder in performance omdat het door de ICU-formatter gaat, maar in de praktijk negeerbaar
Plain (messages.nl.yaml)
- Simpeler, geen ICU-syntax nodig, direct leesbaar voor niet-technische mensen
- Eigen Symfony pluralisatie-syntax ({0} geen|{1} één|]1,Inf[ meerdere), minder standaard maar prima voor eenvoudige gevallen
- Geen externe dependency nodig
Voor projecten met vooral simpele labels en foutmeldingen zonder complexe pluralisatie of meertalige nuances: plain
messages.nl.yamlis voldoende en simpeler, sluit ook aan bij je principe van simplicity first.Zodra je content hebt met pluralisatie, datums, getallen of gender die door niet-developers vertaald wordt (bijvoorbeeld via een vertaalbureau of externe tool), is ICU de juiste keuze omdat het de standaard is en minder foutgevoelig bij vertaling.
Concreet voorbeeld, pluralisatie van "item":
Plain Symfony syntax (
messages.nl.yaml):cart.items: '{0} Geen items|{1} Één item|]1,Inf[ %count% items'ICU syntax (
messages+intl-icu.nl.yaml):cart.items: '{count, plural, =0 {Geen items} =1 {Één item} other {{count} items}}'Verschil zit vooral in de interval-syntax. Symfony's plain versie gebruikt wiskundige intervallen (
]1,Inf[betekent "van 1 tot oneindig, exclusief 1"), wat minder intuïtief is. ICU gebruikt explicieteplural-categorieën (zero,one,few,many,other) die per taal correct worden toegepast door de ICU-library zelf, dus voor talen met complexere pluralisatieregels dan Nederlands (zoals Pools of Arabisch) werkt dit correcter out of the box.Tweede verschil, placeholders in ICU zijn niet-prefixed (
{count}in plaats van%count%), en je kan er direct formatting aan toevoegen:# ICU, met getalformattering order.total: 'Totaal: {amount, number, currency}' # Plain, moet je zelf formatteren in PHP/Twig order.total: 'Totaal: %amount%'
|
|
||
| ## DataTransferObject | ||
|
|
||
| `ItemDataTransferObject` holds the form fields for both create and update. Use the constructor to set initial values. |
There was a problem hiding this comment.
Hmm, hier doet ik in DTO eigenlijk nooit constructor en doe ik het pas in UpdateMessage (dan wel met entity in constructor)
There was a problem hiding this comment.
Heb je ergens een voorbeeld?
There was a problem hiding this comment.
DTO: https://git.sumocoders.be/dyzo/app-dyzo-be/-/blob/master/src/DataTransferObject/ExportCity/ExportCityDataTransferObject.php?ref_type=heads
Create: https://git.sumocoders.be/dyzo/app-dyzo-be/-/blob/master/src/Message/ExportCity/Create.php?ref_type=heads
Update: https://git.sumocoders.be/dyzo/app-dyzo-be/-/blob/master/src/Message/ExportCity/Update.php?ref_type=heads
| ); | ||
| } | ||
|
|
||
| public function save(Item $item, bool $flush = true): void |
There was a problem hiding this comment.
Hmm ik doe meestal een add method en een save method, want bij update is persist van entity niet nodig
There was a problem hiding this comment.
Mja, ik snap het.
Maar heb al paar keer gezien dat er dan in add een save werd gedaan, en dan is dat zo verwarrend.
Keer bespreken.
There was a problem hiding this comment.
Summary by Sourcery
Rewrite and reorganize documentation for the FrameworkCoreBundle, consolidating developer and frontend docs into a clearer top-level docs structure without changing runtime code.
Documentation: