0
Должен быть слепой. Я не могу понять, почему, но я получаю исключение:Класс не найден, хотя он правильно указан
FatalErrorException: Error: Class 'BConway\WebsiteBundle\Form\Type\BusinessType' not found
Вот мои файлы:
<?php
namespace BConway\WebsiteBundle\Controller;
use BConway\WebsiteBundle\Document\Business;
use BConway\WebsiteBundle\Form\Type\BusinessType;
use Doctrine\Common\Util\Debug;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class BusinessController extends Controller
{
public function newAction(Request $request)
{
$formBusiness = $this->createForm(new BusinessType(), new Business());
$formBusiness->handleRequest($request);
return $this->render('BConwayWebsiteBundle:Business:new.html.twig', array(
'formBusiness' => $formBusiness->createView(),
'action' => 'create',
));
}
}
<?php
// src/BConway/WebsiteBundle/Form/Type/BusinessType.php
namespace BConway\WebsiteBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use BConway\WebsiteBundle\Form\Type\AddressType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class BusinessType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('ad', 'string')
->add('address', new AddressType())
->add('claimed', 'boolean')
->add('coupons', 'string')
->add('dateCreated', 'date')
->add('dateModified', 'date')
// ->add('hours', 'collection', array('type' => new HoursType()))
->add('name', 'string')
->add('organization', 'string')
->add('permanentlyClosed', 'string')
->add('phone', 'string')
// ->add('services', 'collection', array('type', new ServiceType()))
->add('tags', 'collection')
->add('website', 'string');
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'BConway\WebsiteBundle\Document\Business',
));
}
public function getName()
{
return 'business';
}
}
Что я не вижу? Я смотрел на эти файлы в течение часа, и я не могу найти проблему.
Приносим извинения за этот раздел, но SO не разрешит мне представить мой вопрос, потому что слишком много это код и текст .... поэтому я просто заполняю пространство.
В вашей файловой системе с учетом регистратора? –
Вы пытались вручную удалить кеш? – dmnptr
@LarsStrojny: Да, Ubuntu ... что вы видите, что было бы проблемой для чувствительности к регистру? – Brandon