Skip to content

Enable composer autoloader

Tilmann Becker requested to merge tiltec-add-composer-autoloader into master

Closes issues0#190

What does this MR do?

Add composer's autoloader, as described in https://getcomposer.org/doc/01-basic-usage.md

The idea is that includes/setup.php gets included at the top of every entry point. I identified those files as entry points, because they include config.inc.php already:

api.php index.php run.php xhr.php xhrapp.php

Raven and Mobile_Detect are now loaded with composers autoloader.

I prepared the src/ directory for our own classes, they should get the namespace Foodsharing. This MR should conclude the "Implement An Autoloader" step in the MLAPHP book.

Current test coverage should be enough to detect breakage of main page.

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

It should work, but I didn't verify all the entry points. Are cronjobs depending on them?

Links to related issues

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
Edited by Nick Sellen

Merge request reports