I use the symfony 2.3 structure, and the autoloader claims to have found the file, but not the class:
RuntimeException: The autoloader expected class "Sensio\Bundle\ FrameworkExtraBundle\Request\ParamConverter\DateTimeParamConverter" to be defined in file "/home/na/auth/vendor/sensio/framework-extra-bundle/ Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/ DateTimeParamConverter.php". The file was found but the class was not in it, the class name or namespace probably has a typo.
The referenced file is shown below:
<?php namespace Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use DateTime; class DateTimeParamConverter implements ParamConverterInterface { public function apply(Request $request, ConfigurationInterface $configuration) { $param = $configuration->getName(); if (!$request->attributes->has($param)) { return false; } $options = $configuration->getOptions(); $value = $request->attributes->get($param); $date = isset($options['format']) ? DateTime::createFromFormat($options['format'], $value) : new DateTime($value); if (!$date) { throw new NotFoundHttpException('Invalid date given.'); } $request->attributes->set($param, $date); return true; } public function supports(ConfigurationInterface $configuration) { if (null === $configuration->getClass()) { return false; } return "DateTime" === $configuration->getClass(); } }
In any case, some of the details that may help is that I recently installed Doctrine and executed the commands ...
2028 php app/console doctrine:schema:create 2029 php app/console doctrine:generate:entities Auth
After these commands, Symfony stopped working. I don’t know if this is some kind of strange mistake or something like that. If you need more information, I can publish it. Thanks for any help.
Dr.Knowitall
source share