contributte / di

:sparkles: Extra contrib to nette/di (@nette)
https://contributte.org/packages/contributte/di.html
MIT License
46 stars 9 forks source link

Call to undefined method Nette\Loaders\RobotLoader::setCacheStorage() #6

Closed suplere closed 6 years ago

suplere commented 6 years ago

Hello,

I testing apitte but when I use this in config.neon: resource: resources: App\Controllers\: paths: [%appDir%/controllers]

I get this error: Nette\MemberAccessException Call to undefined method Nette\Loaders\RobotLoader::setCacheStorage().

Last muted error Warning: file_get_contents(/var/www/api_nette/app/../temp/cache/Nette.Configurator/Container_5efa733610.php.meta): failed to open stream: No such file or directory

.../vendor/nette/di/src/DI/ContainerLoader.php:108

If I define controller in service all works fine.

f3l1x commented 6 years ago

Hi, thanks for reporting. Could you provide more info? Composer.jsonat first?

f3l1x commented 6 years ago

Well, I think I got it.

You're running robot-loader >= 3.0.0 (https://github.com/nette/robot-loader/releases/tag/v3.0.0). There's no setCacheStorage method.

I will fix it.

f3l1x commented 6 years ago

Fixed.