Heim  >  Artikel  >  Entwicklungswerkzeuge  >  Einführung in erweiterte Composer-Befehle

Einführung in erweiterte Composer-Befehle

藏色散人
藏色散人nach vorne
2021-03-30 17:27:141713Durchsuche

Die folgende Tutorial-Kolumne von Composer stellt Ihnen die erweiterten Composer-Befehle vor. Ich hoffe, dass sie Freunden, die sie benötigen, hilfreich sein wird!

Einführung in erweiterte Composer-Befehle

Erweiterte Composer-Befehle

Composer DumpAutoload

Nach der Aktualisierung des Project Composer Autoloaders. Verwenden Sie nicht Composer Update, um den Index zu laden (Update aktualisiert das gesamte Projekt), sondern verwenden Sie dumpautoload, um es abzuschließen.

Unterstützt zwei Parameter

--optimize (-o)
--no-dev

Composer hängt ab

Abhängigkeitsreferenz erkennen https://docs.phpcomposer.com/03-cli.html#depends

composer show

Alle verfügbaren Softwarepakete auflisten

$ composer show

doctrine/inflector                 2.0.3   PHP Doctrine Inflector is a small library that can perform string manip...
doctrine/instantiator              1.4.0   A small, lightweight utility to instantiate objects in PHP without invo...
elasticsearch/elasticsearch        v7.10.0 PHP Client for Elasticsearch
ezimuel/guzzlestreams              3.0.1   Fork of guzzle/streams (abandoned) to be used with elasticsearch-php
ezimuel/ringphp                    1.1.2   Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php
filp/whoops                        2.9.1   php error handling for cool kids
graham-campbell/result-type        v1.0.1  An Implementation Of The Result Type
illuminate/container               v7.30.1 The Illuminate Container package.
illuminate/contracts               v7.30.1 The Illuminate Contracts package.
illuminate/database                v7.30.1 The Illuminate Database package.
illuminate/support                 v7.30.1 The Illuminate Support package.

Details zu bestimmten anzeigen package

$ composer show illuminate/database

name     : illuminate/database
descrip. : The Illuminate Database package.
keywords : database, laravel, orm, sql
versions : * v7.30.1
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/illuminate/database.git 13ae12f444c9d071c6867cf86afd2fdedfd081ec
dist     : [zip] https://api.github.com/repos/illuminate/database/zipball/13ae12f444c9d071c6867cf86afd2fdedfd081ec 13ae12f444c9d071c6867cf86afd2fdedfd081ec
path     : E:\wamp\www\git\test\php\phptest\vendor\illuminate\database
names    : illuminate/database

autoload
psr-4
Illuminate\Database\ => .

requires
ext-json *
illuminate/container ^7.0
illuminate/contracts ^7.0
illuminate/support ^7.0
php ^7.2.5|^8.0
symfony/console ^5.0

suggests
doctrine/dbal Required to rename columns and drop SQLite columns (^2.6).
fakerphp/faker Required to use the eloquent factory builder (^1.9.1).
illuminate/console Required to use the database commands (^7.0).
illuminate/events Required to use the observers with Eloquent (^7.0).
illuminate/filesystem Required to use the migrations (^7.0).
illuminate/pagination Required to paginate the result set (^7.0).
symfony/finder Required to use Eloquent model factories (^5.0).

composer package version

Instance Description
1.0.2 Geben Sie die genaue Version des Pakets an (weniger verwendet)
> ; = 1,0 oder >= 1.0,<2.0Der Bereich stellt Komma dar, was die logische Beziehung mit && Pipe-Symbol| darstellt. stellt die Beziehung zwischen oder dar
1.0.*>=1.0 && < 1.1
~1.2.3>=1.2.3,<1.3 (nützlich für Projekte, die der semantischen Versionierung folgen)
^1.2.3>=1.2.3,<2.0 0

Das obige ist der detaillierte Inhalt vonEinführung in erweiterte Composer-Befehle. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Dieser Artikel ist reproduziert unter:segmentfault.com. Bei Verstößen wenden Sie sich bitte an admin@php.cn löschen