Skip to content

Various Symfony cleanups after foodsharing-ansible!17

Fridtjof requested to merge symfony-cleanup into master

What does this MR do?

Now that the nginx configuration is cleaned up, we can clean up our Symfony setup a bit and remove some workarounds.

The main thing this MR does is get rid of the xhr/xhrapp.php front controllers, so we're only left with Symfony's standard index.php!

I did this by renaming both paths to just /xhr and /xhrapp, respectively. That makes them routable by Symfony without any workarounds. Then, I combed through the entire repository to remove the .php from all URLs these are called from.

Further, I searched through the entire Gitlab organisation to see if we would need to keep either of the old endpoints for e.g. the Android app. Luckily, nothing seems to rely on those endpoints, so I just went forward and deleted them in one go.

Beyond that, I took the liberty of cleaning up random things here and there related to Symfony.

How confident are you it won't break things if deployed?

If anything external relies on xhr/xhrapp (for whatever reason), it would need to fix its paths with a simple search/replace. That's not our problem, though :)

Links to related issues

foodsharing-ansible#4

How to test

Exercise parts of the website that still rely on xhr/xhrapp. Otherwise, I think CI passing should be enough

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • added to the next milestone (see https://gitlab.com/foodsharing-dev/foodsharing/-/milestones, unless it has a "for:Dev" label)
  • added an entry to CHANGELOG.md
  • added a short text that can be used in the release notes
  • Once your MR has been merged, you are responsible to create a testing issue in the Beta Testing forum: https://foodsharing.de/?page=bezirk&bid=734&sub=forum. Please change the MRs label to "state:Beta testing".
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...) how this change can be tested.
    • Be aware, that also non technical people should understand.
Edited by Fridtjof

Merge request reports