julio
julio

Reputation: 2937

Just updated to symfony3.0 got php fatal error class not found

i was in php5.6 and symfony 2.7 and now upgraded to a php7 and symfony3 configuration nothing more.

I got this error it seems that the namespacing and autoloading system is buggy :

PHP Fatal error:  Uncaught Error: Class 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle' not found

Can't seem to find what is going on, since i did'nt change a thing more than composer.json to update.

Here is my composer :

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": {
            "": "src/"
        }
    },
    "require": {
        "php": ">=7.0",
        "symfony/symfony": "~3.0.1",
        "doctrine/orm": "~2.5",
        "doctrine/doctrine-bundle": "~1.6",
        "doctrine/doctrine-cache-bundle": "^1.2",
        "twig/extensions": "~1.3.0",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.8",
        "sensio/distribution-bundle": "~5.0",
        "sensio/framework-extra-bundle": "~3.0.2",
        "incenteev/composer-parameter-handler": "~2.0",
        "friendsofsymfony/rest-bundle": "1.7.*",
        "jms/serializer-bundle": "~1.1.0",
        "doctrine/doctrine-fixtures-bundle": "^2.3"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^2.7"
    },

    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "3.0-dev"
        }
    }
}

please tell what am i doing wrong, and if i did miss a thing, where could i find a documentation to migration

Upvotes: 0

Views: 1523

Answers (1)

xabbuh
xabbuh

Reputation: 5881

The upgrade of the SensioDistributionBundle version to 5.0 requires some additional changes to your autoloading configuration (see https://github.com/symfony/symfony-standard/blob/2.8/UPGRADE-2.8.md).

Take a look at the changes done in the Symfony Standard Edition in https://github.com/symfony/symfony-standard/pull/869 and https://github.com/symfony/symfony-standard/pull/897.

Upvotes: 2

Related Questions