Home Development Tools composer Composer experience sharing: summary of the use of install and update

Composer experience sharing: summary of the use of install and update

Sep 21, 2021 pm 05:32 PM

This article is provided by the tutorial column of composer to introduce you to the experience of using composer install and update. I hope it will be helpful to friends in need!

Composer experience sharing: summary of the use of install and update

#Installinstall

composer install reads third-party components and their versions from composer.lock and installs them into the vendor directory. If the
composer.lock file does not exist, read the composer.json third-party component and its version, and then install it in the vendor directory.

Updateupdate

update obtains third-party components and components directly from composer.json its version and then update the composer.lock file. If the dependent third-party component has a version update,
update will install the latest version into the vendor directory and update composer.lock.

Usage experience

In a production environment, it is risky to directly use the

composer update command because it may be used during the testing phase. version of the third-party component library, the composer update command was executed during online packaging, resulting in the problem of third-party component updates being released directly without testing.

The recommended approach is to add both

composer.json and composer.lock to the version management process, and pay attention during the development process# For changes in dependent versions in ##composer.lock, use composer install for each online package to obtain dependent third-party components and versions from composer.lock. If you need to update third-party components, when executing the

composer update

command, should be appended with the component library that needs to be updated.

Reference documentation: https://docs.phpcomposer.com/03-cli.html#install

The above is the detailed content of Composer experience sharing: summary of the use of install and update. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What does composer mean What does composer mean Mar 06, 2025 pm 01:54 PM

This article explains Composer, a PHP dependency manager. It details its features (dependency management, autoloading, version control), benefits (simplified development, improved consistency), and use cases (web apps, libraries, APIs). Composer us

How to add steps to composer centerline How to add steps to composer centerline Mar 06, 2025 pm 01:45 PM

This article details how to create a center line in QGIS Composer. It lacks a dedicated tool; users manually draw a line using the line tool, precisely positioning it using handles and composer tools. Styling options are then available to customize

What is catia composer software What is catia composer software Mar 06, 2025 pm 01:53 PM

CATIA Composer is 3D visualization software creating interactive documentation from CAD data. It improves communication, reduces time-to-market, and lowers costs by enabling interactive manuals, presentations, and training materials. Its key advant

How to start Composer in sw2016? Detailed tutorial on starting Composer in sw2016 How to start Composer in sw2016? Detailed tutorial on starting Composer in sw2016 Mar 06, 2025 pm 01:47 PM

This guide details how to launch SOLIDWORKS Composer 2016, primarily via the SOLIDWORKS Start menu or the Windows Start Menu. Troubleshooting steps for installation and launch issues are also provided.

What is the function of composer What is the function of composer Mar 06, 2025 pm 01:55 PM

This article explains Composer, PHP's dependency manager. It details how Composer uses composer.json to install, update, and manage project dependencies from Packagist, ensuring consistent library versions across environments. Composer's framework-

How to map sw composer on an assembly How to map sw composer on an assembly Mar 06, 2025 pm 01:49 PM

This guide details applying decals in SOLIDWORKS Composer assemblies. It covers applying decals to single parts and mapping a single image across multiple parts, addressing compatible file formats (JPG, PNG, BMP, TIFF) and transparency limitations.

How to specify the installation of a certain library tutorial How to specify the installation of a certain library tutorial Mar 06, 2025 pm 01:51 PM

This tutorial explains how to install individual PHP libraries using Composer. It details the composer require command, including version specification, and addresses the limitations of installing libraries without their dependencies, recommending a

How to make animation tutorial for sw plug-in composer How to make animation tutorial for sw plug-in composer Mar 06, 2025 pm 01:50 PM

This article provides a general guide to animation creation using the unspecified "SW Plugin Composer." It details key steps: project setup, asset import, timeline manipulation, keyframing, tweening, effects, and rendering. While software

See all articles