Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run autoloading separately from composer install #25

Merged
merged 4 commits into from
Aug 2, 2022

Conversation

sophiewigmore
Copy link
Member

@sophiewigmore sophiewigmore commented Jul 8, 2022

Summary

#5
Resolves failures to autoload classes outside of the vendor directory, caused by the composer install looking for classes inside of the layer, instead of the working directory.

The solution is:

  • run composer install with the --no-autoload flag in ALL cases
  • perform typical symlinking from the layer to the working directory,
  • and then run composer dump-autoload from the working directory to do the autoloading, where composer can find classes outside of vendor.
  • added a test case/app like the sample given by OP to demonstrate that this bug has been resolved

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@sophiewigmore sophiewigmore linked an issue Jul 22, 2022 that may be closed by this pull request
@sophiewigmore sophiewigmore self-assigned this Jul 22, 2022
@sophiewigmore sophiewigmore marked this pull request as ready for review July 22, 2022 15:10
@sophiewigmore sophiewigmore requested a review from a team as a code owner July 22, 2022 15:10
@sophiewigmore sophiewigmore added the semver:patch A change requiring a patch version bump label Jul 22, 2022
@sophiewigmore
Copy link
Member Author

bump @thitch97 @joshuatcasey - can I get a review on this please?

joshuatcasey
joshuatcasey previously approved these changes Aug 1, 2022
integration/outside_autoloading_test.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Composer autoloading not working
3 participants