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

Composer validation always fails #352

Open
asispts opened this issue Nov 29, 2022 · 6 comments
Open

Composer validation always fails #352

asispts opened this issue Nov 29, 2022 · 6 comments

Comments

@asispts
Copy link

asispts commented Nov 29, 2022

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.

@zhanang19
Copy link

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

@f3l1x
Copy link
Collaborator

f3l1x commented Mar 27, 2023

Hi @asispts. Do you have composer.lock versioned in your project?

@asispts
Copy link
Author

asispts commented Mar 27, 2023

Hi @asispts. Do you have composer.lock versioned in your project?

Yes

@f3l1x
Copy link
Collaborator

f3l1x commented Mar 28, 2023

So let me summarize this problem.

  1. Create project with composer.json + composer.lock + vercel.json + /api/index.php.
  2. Deploy to vercel.
  3. Modify composer.json + composer.lock (after calling composer update for example).
  4. Deploy to vercel.
  5. 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 or composer update <package name>.

Right?

@asispts
Copy link
Author

asispts commented Mar 28, 2023

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.

@f3l1x
Copy link
Collaborator

f3l1x commented Oct 19, 2024

I am not facing that issue :-(

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

No branches or pull requests

3 participants