Answer the question
In order to leave comments, you need to log in
Symfony2 - why is the service not loaded from bundl-a subdirectories?
Trying to define a service in Symfony2:
services.yml
parameters:
h.user_provider.class: Harlov\DelivBundle\HUserProvider
h.rest.class: Harlov\DelivBundle\Services\HRest
h.rest.backend_ip: 192.168.0.102
services:
h_rest:
class: %h.rest.class%
arguments: [%h.rest.backend_ip%,@serializer,@buzz]
<?php
namespace Harlov\DelivBundle\Services;
class HRest { ... }
ClassNotFoundException: Attempted to load class "HRest" from namespace "Harlov\DelivBundle\Services" in /var/www/deliv/app/cache/dev/appDevDebugProjectContainer.php line 3176. Do you need to "use" it from another namespace?
Answer the question
In order to leave comments, you need to log in
Problem solved. There were no write permissions for directories created by nfs from outside. Because of this, symphony cannot load these classes.
I suspect that you may have problems with file paths.
Does it work ls src/Harlov/DelivBundle/Services/HRest.php
?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question