ConsoleBundle icon indicating copy to clipboard operation
ConsoleBundle copied to clipboard

Fatal Error Class Not Found

Open ghost opened this issue 8 years ago • 13 comments

Hi !

I'm on a Symfony 2.8.8 Application and i don't understand why the bundle does not work... I got this error on running "php app/console assets:install web" and the same on running "php app/console server:run" : Fatal error: Class 'CoreSphere\ConsoleBundle\CoreSphereConsoleBundle' not found in C:\wamp64\www\Vanessa\Application\app\AppKernel.php on line 30

Composer.json "require": { "php": ">=5.3.9", "symfony/symfony": "2.8.*", "doctrine/orm": "^2.4.8", "doctrine/doctrine-bundle": "~1.4", "symfony/swiftmailer-bundle": "~2.3", "symfony/monolog-bundle": "~2.4", "sensio/distribution-bundle": "~5.0", "sensio/framework-extra-bundle": "^3.0.2", "incenteev/composer-parameter-handler": "~2.0", "egeloen/ckeditor-bundle": "^4.0", "friendsofsymfony/user-bundle": "~2.0@dev", "coresphere/console-bundle": "^0.2.0" },

AppKernel.php 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 Front\HomeBundle\HomeBundle(), new Admin\AdminBundle\AdminBundle(), new Ivory\CKEditorBundle\IvoryCKEditorBundle(), new User\UserBundle\UserBundle(), new FOS\UserBundle\FOSUserBundle(), );

    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();
        $bundles[] = new CoreSphere\ConsoleBundle\CoreSphereConsoleBundle();
    }

    return $bundles;
}

And routing_dev.php _console: resource: "@CoreSphereConsoleBundle/Resources/config/routing.yml" type: extra prefix: /_console

Thanks in advance !

ghost avatar Jul 30 '16 14:07 ghost

did you run composer require coresphere/console-bundle? does the CoreSphere folder exist in your vendor folder?

laszlokorte avatar Jul 30 '16 15:07 laszlokorte

Yes, i run it...

2016-07-30 17:26 GMT+02:00 Laszlo Korte [email protected]:

did you run composer require coresphere/console-bundle?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CoreSphere/ConsoleBundle/issues/70#issuecomment-236371141, or mute the thread https://github.com/notifications/unsubscribe-auth/AJQIKpWMKEtRm1902sQmQRRvO36tpNJ-ks5qa20OgaJpZM4JY0V4 .

ghost avatar Jul 31 '16 09:07 ghost

@Seymos76 does the CoreSphere folder exist in your vendor folder?

laszlokorte avatar Aug 01 '16 00:08 laszlokorte

Yes it does...

2016-08-01 2:09 GMT+02:00 Laszlo Korte [email protected]:

@Seymos76 https://github.com/Seymos76 does the CoreSphere folder exist in your vendor folder?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CoreSphere/ConsoleBundle/issues/70#issuecomment-236465615, or mute the thread https://github.com/notifications/unsubscribe-auth/AJQIKgOGvIBEaW4iDJ1JfUGKs_xLJIrbks5qbTkrgaJpZM4JY0V4 .

ghost avatar Aug 01 '16 12:08 ghost

From here I can not see why it would not be working. Could you reproduce the error in a repo you can publish?

laszlokorte avatar Aug 01 '16 21:08 laszlokorte

I have the same issue (V2.8.13) ???

Update: when I execute the command "composer require coresphere/console-bundle", is not the dev-master version who is installed ... that is the problem for symfony 2.8.13

benbet avatar Nov 03 '16 16:11 benbet

@benbet So if you change the version manually it works? Which version get's installed? The latest released one is 0.4.0 but I do not see any relevant changes since then.

laszlokorte avatar Nov 03 '16 22:11 laszlokorte

@laszlokorte I ve just installed on sf2.8.13 and had the same issue

i've noticed that the readme wasn't the same as on github

i've changed my composer.json from "coresphere/console-bundle": "^0.2.0" to "coresphere/console-bundle": "^0.4.0" manualy and do composer update, it solved the problem and all works fine now

why the 0.2.0 isn't recognised ? why the 0.4.0 isn't installed by default ?

K4M1coder avatar Nov 04 '16 00:11 K4M1coder

I've tested @K4M1coder's solution but it fails because the php requirements seams not good :

Problem 1 - Installation request for coresphere/console-bundle dev-master -> satisfiable by coresphere/console-bundle[dev-master]. - coresphere/console-bundle dev-master requires php ^5.5|^7.0 -> your PHP version (5.6.22-0+deb8u1) overriden by "config.platform.php" version (5.3.9) does not satisfy that requirement.

Could you add ^5.5|^5.6|^7.0 for php requirements ? (if there isn't any problems with php 5.6.x versions)

Thank you.

PapsOu avatar Nov 04 '16 09:11 PapsOu

Sounds like a local problem in your php setup. ^5.5 includes php 5.6

core23 avatar Nov 04 '16 11:11 core23

@PapsOu your PHP version (5.6.22-0+deb8u1) overriden by "config.platform.php" version (5.3.9) look at your composer.json and search "config" section your plateform php is set to 5.3.9, change it for 5.6.22 and you will be ok

K4M1coder avatar Dec 19 '16 12:12 K4M1coder

Thank you that was this config entry that was wrong.

PapsOu avatar Dec 19 '16 12:12 PapsOu

@PapsOu the entry was not wrong it was just default settings. the point for this setting is to avoid using dependancies that would require too much recent PHP version even if the php of dev env is upstream. usualy you want accord this setting with your production environement. with that you can be confident to have a well working app when deploying from dev platform to production one

K4M1coder avatar Dec 20 '16 14:12 K4M1coder