Symfony 5.4
Last reviewed Oct 16, 2026
Prompt Details
Prompt Composition
2prompts
- PHP 8.4128 lines · 4.4K tokens
- Symfony 5.496 lines · 5.9K tokens
Total224 lines · 10.3K tokens
CWE Coverage
- 20
- 22
- 59
- 78
- 79
- 88
- 89
- 93
- 95
- 98
- 117
- 187
- 201
- 203
- 208
- 209
- 214
- 256
- 287
- 294
- 295
- 307
- 321
- 323
- 338
- 340
- 352
- 354
- 362
- 367
- 384
- 390
- 409
- 434
- 470
- 488
- 502
- 522
- 524
- 532
- 552
- 601
- 611
- 613
- 614
- 639
- 674
- 732
- 770
- 776
- 798
- 807
- 829
- 862
- 863
- 915
- 916
- 918
- 940
- 942
- 1004
- 1275
- 1333
- 1336
- 1395
Prompt Preview
Apply these rules when writing or reviewing Symfony 5.4 applications on PHP 8.4, after the included PHP baseline. Apply component-specific rules wherever those components are installed.
Version scope and deployment
- Plan migration before this line's security support ends in February 2029; its regular bug-fix support has already ended.
- Audit the resolved Composer packages, including Twig and optional bundles, with
symfony check:security. Symfony doesn't tag every component in every patch release, so split packages such assymfony/http-client,symfony/security-http, andsymfony/runtimecarry their own patch numbers; update every installedsymfony/*package together withcomposer update "symfony/*"and check each one against Symfony's advisories by its own version, not the framework's. - Set
APP_ENV=prodandAPP_DEBUG=0for the web runtime, console deployment commands, cache warmup, and workers. Disableregister_argc_argvin the web SAPI and keep the Runtime component patched; production flags must come from deployment configuration. - Serve only
public/as the document root, route application requests throughpublic/index.php, and exclude development bundles from production. Limit runtime write access to required storage such asvar/cache/,var/log/, and the upload store.
Requests, forms, and deserialization
- Read input from the intended
Requestbag, such asquery,request, orfiles; useRequest::toArray()for JSON and handle decoding failures. Apply Validator constraints to the resulting values or DTOs before use; bag