PHP 8.4 / Symfony 6.4 upgrade #20
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Clients/neveling!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/php84-symfony64"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Upgrades adressermittlung.de from PHP 7.4 / Symfony 3.4 to PHP 8.4 / Symfony 6.4 LTS.
Repository restructure
wf10501/www/to the repo root (matches server layout + standard Symfony); stop tracking the server home dir andvendor_old/.Framework migration (3.4 -> 6.4 LTS)
>=8.1@Route/@IsGrantedannotations -> PHP 8 attributesgetDoctrine()-> injected ManagerRegistry;$this->get(session)-> RequestStacktype: pool; server_version -> mariadb-10.11.17Database
user.roleslegacyjson_array-> nativejsonTesting (dev = https://dev.adressermittlung.de)
Planned follow-ups (NOT in this PR)
Prod promotion checklist (wfweb012)
Code review findings
Reviewed via a multi-angle pass and verified against the running dev site. Note: two finder claims of "breaks all routing" were verified false —
Symfony\Component\Routing\Annotation\Routestill exists as a deprecated alias in routing 7.4, and the missing-TestControllerroute only 500s if that URL is hit (Symfony resolves controllers lazily).Real bugs — fixed in this PR
Mailer::sendResultEmail()no longer returns a recipient count (Swiftmailer did; symfony/mailer returns void), butGetResultsCommandstill didif ($nrMailsSent === 0)to detect failure → always false → a failed result email was logged as "successful". Fixed: send wrapped in try/catch on the thrownTransportException(and no longer aborts the batch).GetResultsCommandTypeError risk on PHP 8.4 —setHost(getenv(WEBSITE_HOST))had no fallback (sibling commands got?:);getenvreturnsfalsewhen unset →setHost(false)TypeError. Fixed: added?: localhost/?: https.create_test_customerpointed at a non-existentApp\Controller\TestController(also a test-data endpoint that should not ship). Fixed: removed.Security / behaviour — fixed in this PR
App\Security\UserChecker::checkPostAuth(), which runs only after the password is verified.Deprecations — deferred to Phase 3 (Symfony 7.4)
EntityManager::merge()used ~12x inInquiryController— works on ORM 2.x, removed in ORM 3.use Symfony\Component\Routing\Annotation\Routein 6 controllers — deprecated alias (works on 7.4, removed in 8.0); inconsistent with Portal/Security which useAttribute\Route.Cleanup
getDoctrine()shim duplicated across 6 controllers (PortalController injects the EM directly) — a trait/base controller would be cleaner. [deferred]CustomerController@paramdocblocks referenced a non-existent FQCN. Fixed.services.yamlleftoverstatic_route_loaderalias +# FIXbanners. [deferred]\Twig_Error_*docblocks;security.yaml^/login$rule does not match the/login/route. [deferred]