How can I install a custom package through composer. json in coding to deploy the PHP environment?

Source: Internet
Author: User
Tags autoloader
Reference: docs. coding. iolanguagesphp officially uses composer. json to configure the PHP environment, for example, {code...} OK. This is no problem and I have deployed it successfully. Now I want to use a third-party development kit: packagist. orgpackageslev... Reference document: http://docs.coding.io/languages/php

Officially configure the PHP environment through composer. json, for example:

{    "require": {"php": "5.5.16"}}

OK. I have deployed the service successfully. Now I want to use a third-party development kit: https://packagist.org/packages/levi/lv. modify composer.jsonas follows:

{    "require" : {        "php": "5.6.3",        "levi/lv" : "dev-master",        "ext-redis" : "*"    }}

The deployment fails. The error message is as follows:

2015-02-08T18:20:55.67+0800 [API]     OUT Updated app with guid d645cb8f-2ec6-404f-89e7-0795b8ede261 ({"state"=>"STOPPED"})2015-02-08T18:22:23.10+0800 [DEA]     OUT Got staging request for app with id d645cb8f-2ec6-404f-89e7-0795b8ede2612015-02-08T18:20:57.88+0800 [API]     OUT Updated app with guid d645cb8f-2ec6-404f-89e7-0795b8ede261 ({"state"=>"STARTED"})2015-02-08T18:22:25.12+0800 [STG]     OUT -----> Downloaded app package (8.0K)2015-02-08T18:22:25.31+0800 [STG]     OUT -------> Buildpack version 1.0.22015-02-08T18:22:25.48+0800 [STG]     OUT  !     ERROR:        Your composer.json specifies dependencies, but no composer.lock2015-02-08T18:22:25.48+0800 [STG]     OUT        was found, please check it into your repository along with composer.json!2015-02-08T18:22:25.48+0800 [STG]     OUT Staging failed: Buildpack compilation step failed2015-02-08T18:20:58.56+0800 [API]     ERR Encountered error: Staging error: failed to stage application:2015-02-08T18:20:58.56+0800 [API]     ERR Script exited with status 1

I see the following descriptions in the official document:

Build

The system runs the following command to solve the dependency:

install --no-dev --prefer-dist --optimize-autoloader --no-interaction

It seems that the installation of the Development Kit is not performed by default during deployment. How can I install a third-party development kit in coding?

Reply content:

Reference: http://docs.coding.io/languages/php

Officially configure the PHP environment through composer. json, for example:

{    "require": {"php": "5.5.16"}}

OK. I have deployed the service successfully. Now I want to use a third-party development kit: https://packagist.org/packages/levi/lv. modify composer.jsonas follows:

{    "require" : {        "php": "5.6.3",        "levi/lv" : "dev-master",        "ext-redis" : "*"    }}

The deployment fails. The error message is as follows:

2015-02-08T18:20:55.67+0800 [API]     OUT Updated app with guid d645cb8f-2ec6-404f-89e7-0795b8ede261 ({"state"=>"STOPPED"})2015-02-08T18:22:23.10+0800 [DEA]     OUT Got staging request for app with id d645cb8f-2ec6-404f-89e7-0795b8ede2612015-02-08T18:20:57.88+0800 [API]     OUT Updated app with guid d645cb8f-2ec6-404f-89e7-0795b8ede261 ({"state"=>"STARTED"})2015-02-08T18:22:25.12+0800 [STG]     OUT -----> Downloaded app package (8.0K)2015-02-08T18:22:25.31+0800 [STG]     OUT -------> Buildpack version 1.0.22015-02-08T18:22:25.48+0800 [STG]     OUT  !     ERROR:        Your composer.json specifies dependencies, but no composer.lock2015-02-08T18:22:25.48+0800 [STG]     OUT        was found, please check it into your repository along with composer.json!2015-02-08T18:22:25.48+0800 [STG]     OUT Staging failed: Buildpack compilation step failed2015-02-08T18:20:58.56+0800 [API]     ERR Encountered error: Staging error: failed to stage application:2015-02-08T18:20:58.56+0800 [API]     ERR Script exited with status 1

I see the following descriptions in the official document:

Build

The system runs the following command to solve the dependency:

install --no-dev --prefer-dist --optimize-autoloader --no-interaction

It seems that the installation of the Development Kit is not performed by default during deployment. How can I install a third-party development kit in coding?

Find the answer
Http://ryankent.ca/getting-started-with-laravel-and-php-on-heroku/
Http://mattstauffer.co/blog/installing-a-laravel-app-on-heroku

The original statement is as follows:

We might also run into some problems with composer because Laravel doesn't add composer. lock to git by default. if you get the following error when pushing to Heroku you need to make sure you remove composer. lock from your. gitignore so it can be pushed correctly.

!     ERROR:        Your composer.json specifies dependencies, but no composer.lock     was found, please check it into your repository along with composer.json!!     Push rejected, failed to compile PHP app

This means that no composer. lock exists in the project.

Modify. gitignore and upload composer. lock.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.