Skip to content

No lockfile is committed #43

Closed
Closed
@Vinnl

Description

@Vinnl

I tried to run php-solid-server on Heroku to give it a look-over, but my deployment is immediately rejected:

ERROR: No 'composer.lock' found!

A 'composer.lock' file was not found in your project, but there
is a 'composer.json' file with dependencies inside 'require'.

The lock file is required in order to guarantee reliable and
reproducible installation of dependencies across platforms and
deploys. You must follow the Composer best practice of having
your lock file under version control in order to deploy. The
lock file must not be in your '.gitignore'.

Please perform the following steps locally on your computer to
resolve this issue before attempting another deploy:

  1. remove 'composer.lock' from file '.gitignore', if present
  2. if no 'composer.lock' exists, run 'composer update'
  3. stage the lock file changes using 'git add composer.lock'
  4. if you edited '.gitignore', also run 'git add .gitignore'
  5. commit the change using 'git commit'

Please remember to always keep your 'composer.lock' updated in
lockstep with 'composer.json' to avoid common problems related
to dependencies during collaboration and deployment.

Please refer to the Composer documentation for further details:
https://getcomposer.org/doc/
https://getcomposer.org/doc/01-basic-usage.md

Aside from Heroku deployments, although I'm not too familiar with the PHP ecosystem, I assume it would be a good idea to commit a lockfile to prevent "works on my machine" issues as well.

(On a tangential note: there's no hosted instance of the server available somewhere that I can run automated tests against, is there?)

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions