Ao executar php ./src/buscar-cursos.php, tenho este erro de retorno:
PS ~\devlopment\alura\php\buscador_cursos_alura> php .\src\buscar-cursos.php
PHP Fatal error: Uncaught Error: Class "GuzzleHttp\Client" not found in ~\devlopment\alura\php\buscador_cursos_alura\src\buscar-cursos.php:7
Stack trace:
#0 {main}
thrown in ~\devlopment\alura\php\buscador_cursos_alura\src\buscar-cursos.php on line 7
Fatal error: Uncaught Error: Class "GuzzleHttp\Client" not found in ~\devlopment\alura\php\buscador_cursos_alura\src\buscar-cursos.php:7
Stack trace:
#0 {main}
thrown in ~\devlopment\alura\php\buscador_cursos_alura\src\buscar-cursos.php on line 7
Composer.json
{
"name": "teste/buscador-cursos",
"description": "Projeto que buscas os cursos no site da Alura",
"type": "library",
"autoload": {
"psr-4": {
"Teste\\BuscadorCursos\\": "src/"
}
},
"require": {
"guzzlehttp/guzzle": "^7.4",
"symfony/dom-crawler": "^6.1",
"symfony/css-selector": "^6.1"
}
}
Já executei: composer update composer dump && composer update
O que pode ser?
Versões:
PHP 8.1.8 (cli) (built: Jul 5 2022 23:10:34) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.8, Copyright (c) Zend Technologies
Composer version 2.3.10 2022-07-13 15:48:23