0
votes

I'm thick in the middle of a Zend Framework 2 project using Doctrine.

My understanding of composer functionality at present is pretty limited, I know I need to read up and want to properly understand what is happing, but I just don't have the time to do this right now, so really could do with some help with the following. As I say, I know I should read the manual, and I usually do, but I'm just really struggling for time at present.

I have installed Doctrine in my ZF2 application by adding the following in the 'require' section of my composer.json file located in the project route:

"doctrine/doctrine-orm-module": "0.*"

A few days back I had to run composer update on my project to install the latest version of ZF2 in order to obtain a bug fix.

Looking at doctrine-orm-module/src/DoctrineORMModule/version.php I believe I have 0.4.0 installed.

I've now hit a bug in Doctrine\DBAL v2.3.4 (specifically this bug http://www.doctrine-project.org/jira/browse/DBAL-522) and I believe I need to upgrade to DBAL 2.3.5 to get the fix.

This is my problem. I can't get to v2.3.5 of DBAL using composer.

I tried editing doctrine-orm-module/composer.json and updating

"doctrine/dbal": ">=2.3.4",

to

"doctrine/dbal": ">=2.3.5",

and then from within the doctrine-orm-module directory I ran composer update, but just get the following output:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

Any help in upgrade my DBAL version would be very much appreciate.

Many thanks, familymangreg.

2

2 Answers

0
votes

This worked for me to upgrade doctrine to 2.4 - I am assuming that if you find the right 2.3.5 version names the following should work for you.

I updated the composer.json file in the root of my application folder as follows;

    {
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
    "framework",
    "zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
    "php": ">=5.3.3",
    "zendframework/zendframework": "2.*",
    "zendframework/zend-developer-tools": "dev-master",
    "doctrine/orm": "2.4.0-beta2",
    "doctrine/dbal": "2.4.0-beta2",
    "doctrine/common": "2.4.0-rc2",
    "doctrine/doctrine-orm-module": "0.7.*",

}

}

then run php composer.phar update

Hope this helps

0
votes

You can visit my Github ZendApplication repository, where you can find a working copy of Zend Skeleton Application, with Doctrine configured and working along with example entity and repository as well.