spiral / app

Spiral Framework Skeleton HTTP Application: Queue, Console, Cycle ORM
https://spiral.dev/
MIT License
191 stars 20 forks source link

Homepage requires Translator #143

Closed Ferikl closed 1 month ago

Ferikl commented 6 months ago

Hi, I am trying to install fresh spiral framework (v3.6.1) While installation survey about components I`ve choose to NOT install Translator. After up and run my app I have an error on my homepage:

Spiral\Views\Exception\RenderException
Can't resolve `Spiral\Translator\TranslatorInterface`: undefined class or binding `Spiral\Translator\TranslatorInterface`.
Container trace list:
- action: 'autowire'
alias: 'Spiral\Translator\TranslatorInterface'
context: null
↵
Caused by: Spiral\Core\Exception\Container\NotFoundException
Can't resolve `Spiral\Translator\TranslatorInterface`: undefined class or binding `Spiral\Translator\TranslatorInterface`.
Container trace list:
- action: 'autowire'
alias: 'Spiral\Translator\TranslatorInterface'
context: null
in /app/vendor/spiral/framework/src/Core/src/Internal/Factory.php at line 330

Its cause default app/views/home.php file has reference to Translator:


<?php $translator = $this->container->get(\Spiral\Translator\TranslatorInterface::class); ?>
and few more lines
``
roxblnfk commented 1 month ago

I suppose it was fixed