Buenas Noches a los integrantes de este grupo:
Reciba un cordial saludo, de antemano les agradezco la ayuda que me puedan brindar soy nuevo con Symfony me lo recomendó un ingeniero para desarrollar, ya programado con php normal, pero nunca he trabajado con Frameworks, ya tengo instalado xampp, symfony 2.8, composer.
Me da la pantalla de que instale correctamente el Symfony, pero cuando creo un Bundle me sale este error "Fatal error: Class 'AppBundle\AppBundle' not found in C:\xampp\htdocs\prueba1\app\AppKernel.php on line 18", he googleado pero la verda no he podido solucionarlo.
Este es mi AppKernel.php
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new AppBundle\AppBundle(),
new ingresoBundle\ingresoBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}
Este es parte del composer.json
{
"name": "ts1/prueba1",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"AppBundle\\AppBundle\\": "src/AppBundle",
"ingresoBundle\\ingresoBundle\\": "src/ingresoBundle"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"files": [
"vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
},
Lo actualice con el comando composer update y sale este otro error:
c:\xampp\htdocs\prueba1>composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing sensio/generator-bundle (v3.1.6): Loading from cache
- Installing symfony/phpunit-bridge (v2.8.26): Loading from cache
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParametersUpdating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
Fatal error: Class 'AppBundle\AppBundle' not found in C:\xampp\htdocs\prueba1\app\AppKernel.php on line 18
PHP Fatal error: Class 'AppBundle\AppBundle' not found in C:\xampp\htdocs\prueba1\app\AppKernel.php on line 18
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
[RuntimeException]
An error occurred when executing the ""cache:clear --no-warmup"" command:Fatal error: Class 'AppBundle\AppBundle' not found in C:\xampp\htdocs\prueb
a1\app\AppKernel.php on line 18
PHP Fatal error: Class 'AppBundle\AppBundle' not found in C:\xampp\htdocs\prueba1\app\AppKernel.php on line 18
.
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
[--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no
-suggest] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
[-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--p
refer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages
>]...
Les agradezco su ayuda de como puedo solucionarlo, gracias.
Atentamente;
OSWALDO GAITAN
Bendiciones!!