Download the PHP package wenderds/curso-composer-buscador-cursos-alura without Composer
On this page you can find all versions of the php package wenderds/curso-composer-buscador-cursos-alura. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download wenderds/curso-composer-buscador-cursos-alura
More information about wenderds/curso-composer-buscador-cursos-alura
Files in wenderds/curso-composer-buscador-cursos-alura
Download wenderds/curso-composer-buscador-cursos-alura
More information about wenderds/curso-composer-buscador-cursos-alura
Files in wenderds/curso-composer-buscador-cursos-alura
Vendor wenderds
Package curso-composer-buscador-cursos-alura
Short Description Projeto busca de cursos no site da Alura
License proprietary
Package curso-composer-buscador-cursos-alura
Short Description Projeto busca de cursos no site da Alura
License proprietary
Please rate this library. Is it a good library?
Informations about the package curso-composer-buscador-cursos-alura
Alura: Curso COMPOSER🚀️
Aula-01:
- Composer é um gerenciador de dependências PHP.
- Ele guarda as dependências dentro do projeto.
- Se quisermos uma dependência global, devemos usar o global command .
- Um pacote sempre segue a nomenclatura:
<vendor>/<name>
. "vendor == (dominio || empresa)" responsável pelo pacote - As meta-informações de uma dependência ficam salvas no arquivo
composer.json
. - O comando
composer init
inicializa ocomposer.json
.
Aula-02:
- O composer possui um repositório central de pacotes: https://packagist.org/
- É possível configurar repositórios de outras fontes (do github, zip etc)
- O pacotes
guzzlehttp/guzzle
serve para executar requisições HTTP de alto nível - Para instalar uma dependência (pacote) basta executar:
composer require <nome do pacote>
- Composer guarda as dependências e dependências transitivas na pasta
vendor
do projeto - O nome e versão da dependências fica salvo no arquivo
composer.json
- O comando
require
adiciona automaticamente a dependência nocomposer.json
- O comando
composer install
automaticamente baixa todas as dependências docomposer.lock
(ou docomposer.json
, caso o.lock
não exista ainda) - O arquivo
composer.lock
define todas as versões exatas instaladas - O composer já gera um arquivo
autoload.php
para facilitar o carregamento das dependências - Basta usar
require vendor/autoload.php
Aula-03:
- Conhecemos a
PSR-4
( Autoloader ) - A
PSR-4
define um padrão para o carregamento automático de classes - O namespace da classe tem partes:
- O vendor namespace (ou namespace padrão ou namespace prefixo )
- O vendor namespace fica mapeado para uma pasta do projeto dentro do arquivo
composer.json
- Podemos ter um sub-namespace que precisa ser representado através de pastas
- Para atualizar o arquivo
autoload.php
baseado nocomposer.json
, podemos rodar o comandocomposer dump-autoload
oucomposer dumpautoload
- Para classes que não seguem o
PSR-4
, podemos definir umclassmap
dentro docomposer.json
- Para carregar um biblioteca de funções automaticamente, podemos adicionar uma entrada
files
nocomposer.json
Aula-04:
Nessa aula foi falado sobre dependências e ferramentas que não são utilizadas em produção e sim no ambiente de desenvolvimento:
- Através do flag
--dev
definimos que uma dependência não faz parte do ambiente de produção - Caso desejarmos baixar as dependências de "produção" apenas podemos usar o flag
no-dev
- Arquivos executáveis fornecidos por componentes instalados pelo composer ficam na pasta
vendor/bin
- Conhecemos três ferramentas do mundo PHP:
phpunit
para rodar testes;phpcs
para verificar padrões de código;phan
para executar uma análise estática da sintaxe do nosso código.
Aula-05:
- scripts são definidos dentro do
composer.json
; - scripts podem definir comandos que chamam ferramentas instaladas pelo Composer;
- scripts podem chamar comandos do sistema operacional;
- scripts podem chamar códigos PHP;
- scripts podem ser associados ao evento.
Aula-06:
- O composer entende as tags de versão de um repositório Git
- O composer segue o conceito do versionamento semântico ( MAJOR . MINOR . PATCH )
- No
composer.json
podemos definir constraints (mais detalhes em https://getcomposer.org/doc/articles/versions.md) - Para distribuir e disponibilizar o seu projeto devemos:
- Criar um repositório no Github;
- Usar o packgist e associar com o repositório no Github.
🎉️ 🚀️
All versions of curso-composer-buscador-cursos-alura with dependencies
PHP Build Version
Package Version
Requires
guzzlehttp/guzzle Version
^7.5
symfony/dom-crawler Version ^v6.2.0
symfony/css-selector Version ^6.2
symfony/dom-crawler Version ^v6.2.0
symfony/css-selector Version ^6.2
The package wenderds/curso-composer-buscador-cursos-alura contains the following files
Loading the files please wait ....