Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • F foodsharing
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 299
    • Issues 299
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 25
    • Merge requests 25
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • foodsharing-devfoodsharing-dev
  • foodsharing
  • Merge requests
  • !157

Enable composer autoloader

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Tilmann Becker requested to merge tiltec-add-composer-autoloader into master Sep 21, 2017
  • Overview 1
  • Commits 5
  • Pipelines 3
  • Changes 14

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 Sep 22, 2017 by Nick Sellen
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: tiltec-add-composer-autoloader