Install dependency (doctrine/dbal) on composer laravel

97,210

Solution 1

To add this dependency open the composer.json at the root of your project (in the same level as app, public etc.) and in the require section add the doctrine/dbal package like:

"require": {
    "laravel/framework": "4.1.*",
    "doctrine/dbal": "v2.4.2"
},

Save the file and run composer update

Edit

You probably installed git with the default settings and it's not in your PATH env.

Open Git Bash (it was installed with git - you will find it in your programs) and do composer update. By the way it's far better that windows command prompt.

Solution 2

1) To install dependency , run this command

composer require doctrine/dbal

2) For 'git' is not recognized error, either you don't have git installed or the PATH is not added in the environment variables.

Install git for windows.

Solution 3

If you are getting error while running migration try this

composer require doctrine/dbal:2.*
Share:
97,210
elvainch
Author by

elvainch

BI consultant with wide knowledge of different technologies. Among them are: birt, ssis, talend. Developing datawarehouses, doing olap analysis and meeting with clients are among the tasks I do on my daily routine. Currently learning big data and data mining. Enjoy going out, reading, watching tv series(prison break is the best ever!!!)

Updated on July 08, 2022

Comments

  • elvainch
    elvainch almost 2 years

    I am trying to execute a migration to rename some columns and I got an exception.

    As I read on the documentation I have to add the doctrine/dbal dependency to my composer.json file. How do I do that? Which is the correct composer.json file. I have many in my application. Is the one that is on the same level as the folders app,bootstrap, public and vendor.

    If so how do I add that dependency. Do I have to download anything?

    By the way im using easyphp, not wamp!

    Edit 1

    After doing that the console throws this error

    cmd