I've just installed psysh
. And I think this is a trivial issue, although I can't find nothing related in Google.
I am trying to instantiate a class that is already mapped in my composer.json
file with ps-4
standard.
My composer.json
:
{
"name": "andrebian/tdd-com-php",
"description": "Códigos-fonte apresentados no Livro Test-Driven Development, Teste e Design no Mundo Real com PHP",
"authors": [
{
"name": "Andre Cardoso aka andrebian",
"email": "andrecardosodev@gmail.com"
}
],
"require-dev": {
"phpunit/phpunit": "4.*"
},
"autoload": {
"psr-4": {
"CDC\\Loja\\": [
"src/CDC/Loja",
"tests/CDC/Loja"
],
"CDC\\Exemplos\\": [
"src/CDC/Exemplos",
"tests/CDC/Exemplos"
]
}
}
}
So, I am in project directory. I enter php shell with psysh and try to intantiate a class with
>>> $x = new CDC\Exemplos\ConversorDeNumeroRomano
But I'm getting error
HP Fatal error: Class 'CDC\Exemplos\ConversorDeNumeroRomano' not found in eval()'d code on line 1
Someone can tell me what I'm missing?