heroku / heroku/buildpacks-php
Warning about missing `composer.lock` on getting started guide
- Dominant language
- Rust
- Stars
- 8
- Forks
- 6
- Avg merge
- 6h 29m
- Merged PRs (30d)
- 7
Description
This warning:
```
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
```
Is odd because there's a `composer.lock` file checked in:
```
$ git ls-files | grep lock
composer.lock
```
## Reproduction
```
$ git clone https://github.com/heroku/php-getting-started
Cloning into 'php-getting-started'...
cd remote: Enumerating objects: 270, done.
remote: Counting objects: 100% (60/60), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 270 (delta 33), reused 16 (delta 14), pack-reused 210 (from 3)
Receiving objects: 100% (270/270), 92.79 KiB | 1.50 MiB/s, done.
Resolving deltas: 100% (114/114), done.
$ cd php-getting-started
$ pack build my-image-name-php --path . --clear-cache
Warning: Exporting to docker daemon (building without --publish) and daemon uses containerd storage; performance may be significantly degraded.
For more information, see https://github.com/buildpacks/pack/issues/2272.
24: Pulling from heroku/builder
Digest: sha256:e0b45ad375ed202922ae1b06f2b28eb63ceac948c8eb17bdb14900cfa1432ea8
Status: Image is up to date for heroku/builder:24
24: Pulling from heroku/heroku
Digest: sha256:e8c68846121d344ae394de15af7c0f4c00659d6125b5eda95a07fa0a27d1c6fd
Status: Image is up to date for heroku/heroku:24
===> ANALYZING
Image with name "my-image-name-php" not found
===> DETECTING
2 of 3 buildpacks participating
heroku/php 0.2.1
heroku/procfile 4.2.0
===> RESTORING
Skipping buildpack layer analysis
===> BUILDING
[Bootstrapping]
[Preparing platform packages installation]
[Installing platform packages]
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 26 installs, 0 updates, 0 removals
```
Contributor guide
Research direction
Reproduce the warning with the documented `pack build my-image-name-php --path . --clear-cache` command in the `heroku/php-getting-started` app. Trace the PHP buildpack's platform-package installation and its handling of the checked-in `composer.lock`; done means the lock file is detected and dependencies are installed from it without the misleading warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100