Composer validation always fails
asispts opened this issue · comments
Bug report
- Version: 0.5.2
- URL: No
- Repository: No
Description
When modify composer.json
(e.q: add/remove a package), build process always fail to detect the change. The build process always use the same cache.
Installing Composer dependencies [START]
[8.0MiB/0.13s] Installing dependencies from lock file
[8.2MiB/0.13s] Verifying lock file contents can be installed on current platform.
[8.4MiB/0.13s] Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
[9.8MiB/0.18s] Nothing to install, update or remove
[9.8MiB/0.18s] Generating optimized autoload files
Composer validation shows that composer.json
is valid.
$ composer validate
./composer.json is valid
Solution
Redeploy without using existing build cache manually.
Just want to share with anyone else. You can use ENV to skip using build cache.
See: https://vercel.com/docs/concepts/deployments/troubleshoot-a-build#managing-build-cache
Hi @asispts. Do you have composer.lock versioned in your project?
Hi @asispts. Do you have composer.lock versioned in your project?
Yes
So let me summarize this problem.
- Create project with composer.json + composer.lock + vercel.json +
/api/index.php
. - Deploy to vercel.
- Modify composer.json + composer.lock (after calling composer update for example).
- Deploy to vercel.
- See -> Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run
composer update
orcomposer update <package name>
.
Right?
Yes, that's the steps to reproduce the issue. However, on the step 3, it's better to add a new package and use it in /api/index.php
.