X Tutup
Skip to content

Do not rely on include path#36054

Merged
PVince81 merged 1 commit intomasterfrom
load-correct-app.php
Aug 20, 2019
Merged

Do not rely on include path#36054
PVince81 merged 1 commit intomasterfrom
load-correct-app.php

Conversation

@VicDeo
Copy link
Member

@VicDeo VicDeo commented Aug 16, 2019

Description

Always use an absolute path to app.php

Motivation and Context

outdated appname/appinfo/app.php could be loaded if there are two versions of the same app in app directories

How Has This Been Tested?

  1. install OC 10.2.1 with the default app directories:
    apps is non-writable, apps-external is writable
  2. Copy any app from apps into apps-external, increase version in apps-external/appname/appinfo/app.php
  3. set breakpoints on apps/appname/appinfo/app.php and apps-external/appname/appinfo/app.php or add logging to both files

Expected

breakpoint or logging is triggered in apps-external/appname/appinfo/app.php as it has more recent version

Actual

breakpoint or logging is triggered in apps/appname/appinfo/app.php

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@VicDeo
Copy link
Member Author

VicDeo commented Aug 19, 2019

Note: lib/private/legacy/app.php most likely won't pass codecov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup