Skip to content

Recommend caching COMPOSER_CACHE_DIR over vendor/ #5

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

Merged
merged 1 commit into from
May 9, 2020
Merged

Recommend caching COMPOSER_CACHE_DIR over vendor/ #5

merged 1 commit into from
May 9, 2020

Conversation

hkdobrev
Copy link
Contributor

@hkdobrev hkdobrev commented May 6, 2020

Caching the vendor directory as-is could produce various unwanted and hard to debug problems.

For example:

  • vendor/autoload* would not be dumped again based on new changes to code and composer.json configuration
  • vendor/installed.json would not be updated with changes to Composer version

See this thread which caused github.com/actions/cache to recommend not caching vendor, but instead cache the Composer cache dir: actions/cache#32 (comment) which is based on travis-ci/travis-ci#4579 (comment)

Caching the vendor directory as-is could produce various unwanted and hard to debug problems.
For example:
- vendor/autoload* would not be dumped again based on new changes to code and composer.json configuration
- vendor/installed.json would not be updated with changes to Composer version

See this thread which caused github.com/actions/cache to recommend not caching vendor, but instead cache
the Composer cache dir:
actions/cache#32 (comment)
which is based on travis-ci/travis-ci#4579 (comment)
@g105b
Copy link
Member

g105b commented May 6, 2020

Hi @hkdobrev , thanks so much for your PR. This is a very valid point you raise, and I will give it some proper attention. One thing that I would like to think about in the future is whether this repository can/should provide a simpler way to cache the dependencies, maybe as a custom command?

Anyway, for now I will check and accept this PR as it contains some very important updates.

@g105b g105b merged commit bae9827 into php-actions:master May 9, 2020
g105b pushed a commit to php-actions/php-build that referenced this pull request Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants