-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f1751a
commit 4606099
Showing
8 changed files
with
181 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: 23e2d505107219b10945c677c9b14ab0237d1886 Maintainer: leonardolara Status: ready --> | ||
|
||
<chapter xml:id="install.composer" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="chunk:false"> | ||
<title>Instalação do Composer e pacotes de terceiros</title> | ||
|
||
<sect1 xml:id="install.composer.intro"> | ||
<title>Introdução ao Composer</title> | ||
<simpara> | ||
&link.composer; é um gerenciador de dependências para o PHP que torna possível | ||
definir pacotes de códigos de terceiros usados por um projeto que pode | ||
então ser facilmente instalado e atualizado. Ele aproveita os | ||
<link linkend="language.oop5.autoload">recursos de carregamento automático de classe</link> | ||
do PHP, repositórios de pacotes PHP como | ||
<link xlink:href="&url.packagist;">Packagist</link> e convenções comuns | ||
de layout e codificação de projetos. | ||
</simpara> | ||
<simpara> | ||
Por exemplo, se uma aplicação ou página em PHP precisa | ||
trabalhar com valores <abbrev>UUID</abbrev>, | ||
<link xlink:href="&url.packagist.package;ramsey/uuid">o pacote | ||
<literal>ramsey/uuid</literal> de Ben Ramsey</link>, que implementa os | ||
tipos de UUID amplamente conhecidos que são definidos pela | ||
<link xlink:href="&url.rfc;4122">RFC 4122</link>, poderia ser usado. | ||
</simpara> | ||
<simpara> | ||
Resumidamente, isto é feito criando um arquivo <literal>composer.json</literal> | ||
no projeto, usando o Composer para instalar a última versão do | ||
pacote, e incluindo o script de autocarregamento do Composer para torná-lo disponível | ||
ao código. A <link xlink:href="&url.composer;/doc/01-basic-usage.md">documentação de | ||
"Uso Básico" do Composer</link> entra em mais detalhes sobre isso. | ||
</simpara> | ||
<example> | ||
<title> | ||
<literal>composer.json</literal> que requer um único pacote | ||
</title> | ||
<programlisting role="javascript"> | ||
<![CDATA[ | ||
{ | ||
"require": { | ||
"ramsey/uuid": "^4.7" | ||
} | ||
} | ||
]]> | ||
</programlisting> | ||
</example> | ||
|
||
</sect1> | ||
</chapter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.