How does the composer work?

I do not know how the composer works and adds a directory to our folder structure.

Recently I want to add a repository to my laravel installation, so for this I used https://github.com/prettus/l5-repository , this is a repo and in accordance with my installation steps, the first step is to execute the following command:

composer require prettus/l5-repository

does this command create a prettus directory under the vendor, so how does it work and manage all things?

My questions:

  • What is the main goal of the composer?

  • What is the best structure for this?

  • how will it handle depencdency?

  • what is "autoload"both 'psr-4` and using both?

  • correct path and structure for namesapcing 'autoload' and 'psr-4'?

+4
source
1

Composer , Yum Apt. , "" , , (, ) . - . , .

, node npm ruby ​​bundler.

, :

a) , .

b) .

:

c) , .

d) , , ( , ).

Link: https://getcomposer.org/doc/00-intro.md#dependency-management

+5
source

Source: https://habr.com/ru/post/1599816/


All Articles