contributte / doctrine-orm

:fire: Well-integrated Doctrine ORM for Nette Framework
https://contributte.org/packages/nettrine/orm.html
MIT License
56 stars 29 forks source link

Class 'Nettrine\Dbal\DI\DbalExtension' not found #29

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello, it was long time ago I was using nette, so I installed sandbox and nettrine according to https://github.com/nettrine/orm/blob/master/.docs/README.md#minimal-configuration, and it still throws error that class was not found (Class 'Nettrine\Dbal\DI\DbalExtension' not found). Could you please help me out?

My config.neon, composer.json and exception are in the zip archive. error.zip

ghost commented 6 years ago

I have included vendor autoloader and robotloader in my bootstrap PHP, it was clean nette/sandbox installed via composer.

f3l1x commented 6 years ago

Could you please send composer.json here?

ghost commented 6 years ago

Yes, minimum stability is dev, but it didn't work with stable too.

{
    "name": "nette/sandbox",
    "description": "The sandbox is a pre-packaged Nette Framework project, basic configured structure for your application.",
    "homepage": "https://nette.org",
    "type": "project",
    "license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
    "authors": [
        {
            "name": "David Grudl",
            "homepage": "https://davidgrudl.com"
        },
        {
            "name": "Nette Community",
            "homepage": "https://nette.org/contributors"
        }
    ],
    "require": {
        "php": ">=7.1.0",
        "nette/application": "^2.4.4",
        "nette/bootstrap": "^2.4.3",
        "nette/caching": "^2.5",
        "nette/database": "^2.4",
        "nette/di": "^2.4",
        "nette/finder": "^2.4",
        "nette/forms": "^2.4",
        "nette/http": "^2.4",
        "nette/mail": "^2.4",
        "nette/robot-loader": "^2.4 || ^3.0",
        "nette/safe-stream": "^2.3",
        "nette/security": "^2.4",
        "nette/utils": "^2.4",
        "latte/latte": "^2.4",
        "tracy/tracy": "^2.4",
        "dg/adminer-custom": "^1.9",
        "nettrine/orm": "dev-master",
        "kdyby/console": "^2.7",
        "nettrine/dbal": "dev-master",
        "contributte/console": "^0.5.0"
    },
    "require-dev": {
        "nette/tester": "^2.0"
    },
    "minimum-stability": "dev",
    "config": {
        "platform": {
            "php": "7.1.17"
        }
    }
}
ghost commented 6 years ago

Okay, problem solved, please edit

extensions:
    dbal: Nettrine\Dbal\DI\DbalExtension

to

extensions:
    dbal: Nettrine\DBAL\DI\DbalExtension

in https://github.com/nettrine/dbal/tree/master/.docs#installation

and also

composer install nettrine/dbal

to

composer require nettrine/dbal

in https://github.com/nettrine/orm/blob/master/.docs/README.md#minimal-configuration

f3l1x commented 6 years ago

Thanks.