Does Doctrine / DBAL have PHP5.6 compatibility?

Doctrine ORM seems to need PHP5.3 and following.

There is no information about Doctrine DBAL that I want to use. I think the ORM is DBAL based, so it should be PHP5.3+, but is there any breakdown to get it to work with the latest PHP (5.6).

+3


source to share


1 answer


You have two options:

  • Use the Doctrine ORM 2.5 codebase (currently master, not stable yet).

  • Apply this patch to the ClassMetadataInfo class:



--- ClassMetadataInfo.php 2014-07-07 08:46:51.658104373 -0400 +++ ClassMetadataInfo.patch.php 2014-07-07 08:38:05.442127032 -0400 @@ -827,7 +827,7 @@ public function newInstance() { if ($this->_prototype === null) { - if (PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513) { + if (PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513 || PHP_VERSION_ID === 50600) { $this->_prototype = $this->reflClass->newInstanceWithoutConstructor(); } else { $this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));

Source: http://www.snip2code.com/Snippet/87237/Doctrine--2-3-6-on-PHP----5-6-%28vendor-do/

+2


source







All Articles