Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Class "League\Flysystem\Adapter\Local" not found #16

Open
flavio89 opened this issue Apr 4, 2022 · 5 comments
Open

Error: Class "League\Flysystem\Adapter\Local" not found #16

flavio89 opened this issue Apr 4, 2022 · 5 comments

Comments

@flavio89
Copy link

flavio89 commented Apr 4, 2022

PHP Fatal error: Uncaught Error: Class "League\Flysystem\Adapter\Local" not found in /nfephp-org/sped-nfse-ginfes/src/Common/Soap/SoapBase.php:253

Se adicionar a league/flysystem em seu projeto você terá problema problema pois não é compatível com a ultima versão.
Se fixar a versão 1.x, por exemplo "league/flysystem": "^1.1", terá problema de depreciação:

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /league/flysystem/src/Util.php on line 106

"nfephp-org/sped-nfse-ginfes" deverá ser atualizado para funcionar com a ultima versão estável do "league/flysystem"

@robmachado
Copy link
Collaborator

É só trocar as chamadas do League\Flysystem pela classe NFePHP\Common\Files e resolve esse problema

@jdson7
Copy link

jdson7 commented Apr 4, 2022

Tive o mesmo problema que o @flavio89, vc poderia me dar um exemplo de como/onde trocar essas chamadas?

@flavio89
Copy link
Author

flavio89 commented Apr 4, 2022

É só trocar as chamadas do League\Flysystem pela classe NFePHP\Common\Files e resolve esse problema

Alterar isso na classe SoapBase em Common/Soap/SoapBase.php?

@meeefiu
Copy link

meeefiu commented Jun 29, 2022

No arquivo src/Common/Soap/SoapBase.php, comenta a linha 253 e na 254 usa a classe NFePHP\Common\Files.
Dessa forma:

//$this->adapter = new Local($folder);
$this->filesystem = new \NFePHP\Common\Files($folder);

@danielwpsouza
Copy link

danielwpsouza commented Oct 14, 2022

Eu resolvi o problema da seguinte forma.
Substitui: use League\Flysystem\Adapter\Local;
Por: use League\Flysystem\Local\LocalFilesystemAdapter as Local;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants