Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Class 'CoreSphere\ConsoleBundle\CoreSphereConsoleBundle' not found #74

Closed
emnoze opened this issue Jan 8, 2017 · 10 comments

Comments

@emnoze
Copy link

emnoze commented Jan 8, 2017

Hi,
I m on a Symfony 2.8.15 And when i m trying to install the bundle,
I follow the readme.
composer require coresphere/console-bundle ( add the 0.2.0 )

I register $bundles[] = new CoreSphere\ConsoleBundle\CoreSphereConsoleBundle();

put the route in dev_route
_console: resource: "@CoreSphereConsoleBundle/Resources/config/routing.yml" type: extra prefix: /_console

And when I try ./app/console assets:install web
it say to me

Fatal error: Class 'CoreSphere\ConsoleBundle\CoreSphereConsol
eBundle' not found in C:\wamp64\www\budget\app\AppKernel.php
on line 29

So i don't know How to fix this.

Here is my composer.json

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-4": { "": "src/" },
        "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
    },
    "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.11.3",
        "sensio/distribution-bundle": "~5.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "incenteev/composer-parameter-handler": "~2.0",
        "knplabs/knp-paginator-bundle": "^2.5",
        "friendsofsymfony/user-bundle": "~2.0@dev"
    },
    "require-dev": {
        "sensio/generator-bundle": "~3.0",
        "symfony/phpunit-bridge": "~2.7"
    },
    "scripts": {
        "symfony-scripts": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-install-cmd": [
            "@symfony-scripts"
        ],
        "post-update-cmd": [
            "@symfony-scripts"
        ]
    },
    "config": {
        "bin-dir": "bin",
        "platform": {
            "php": "5.3.9"
        }
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.8-dev"
        }
    }
}

In the vendor, i have to Console Bundle

Thx

@laszlokorte
Copy link
Member

laszlokorte commented Jan 8, 2017

@emnoze Your composer file seems to not contain the coresphere/console-bundle dependency so it looks like the composer require coresphere/console-bundle command did not work?

@emnoze
Copy link
Author

emnoze commented Jan 8, 2017

Sorry, it s my composer from the master branch xD

juste add
"coresphere/console-bundle": "^0.2.0" after "friendsofsymfony/user-bundle": "~2.0@dev",

@laszlokorte
Copy link
Member

Can you verify that the bundle exists in your vendor folder? (vendor/coresphere/console-bundle/CoreSphereConsoleBundle.php)

@laszlokorte
Copy link
Member

and why are you using version 0.2.0 instead of 0.4.0?

@emnoze
Copy link
Author

emnoze commented Jan 8, 2017

Got it with

<?php

/*
* This file is part of the CoreSphereConsoleBundle.
*
* (c) Laszlo Korte <me@laszlokorte.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace CoreSphere\ConsoleBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class CoreSphereConsoleBundle extends Bundle
{
}
####################################
With the Composer require, it s automatic to 0.2.0 but if I put 0.4.0 i got this

>  Problem 1
   - Installation request for coresphere/console-bundle ^0.4
.0 -> satisfiable by coresphere/console-bundle[0.4.0].
   - coresphere/console-bundle 0.4.0 requires php >=5.5 -> y
our PHP version (5.6.25) overridden by "config.platform.php"
version (5.3.9) does not satisfy that requirement.

@laszlokorte
Copy link
Member

That is the same as this issue: #70

Please try to increase the php version in your composer file (5.3.9) to your actual php version 5.6.25 and try to install coresphere/console-bundle 0.4.0 again.

@emnoze
Copy link
Author

emnoze commented Jan 8, 2017

I have modified the line =

 "config": {
     "bin-dir": "bin",
     "platform": {
-      "php": "5.3.9" // It was 5.3.9 ORIGIN BY SYMFONY INSTALL
+      "php": "5.6.25"
      }

And it works !

@emnoze emnoze closed this as completed Jan 8, 2017
@emnoze
Copy link
Author

emnoze commented Jan 8, 2017

Thx to you

@emnoze emnoze reopened this Jan 8, 2017
@emnoze emnoze closed this as completed Jan 8, 2017
laszlokorte added a commit that referenced this issue Jan 8, 2017
@laszlokorte
Copy link
Member

As this seems to be a common problem I have updated the readme file to address this issue.

@emnoze
Copy link
Author

emnoze commented Jan 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants