partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit a5889f4321d78de275a79ae6bec016cc751fe98d
parent cf925c42d706b646fac5607bd8c933c13925cb99
Author: Felicitus <felicitus@felicitus.org>
Date:   Tue, 13 Mar 2012 03:15:18 +0100

Added test for doctrine 2.3

Diffstat:
Msrc/setup/tests/check-doctrine.php | 13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/setup/tests/check-doctrine.php b/src/setup/tests/check-doctrine.php @@ -1,6 +1,8 @@ <?php @include_once 'Doctrine/Common/ClassLoader.php'; +$aWarnings = array(); + /** * Check if the Doctrine Common classloader can be loaded */ @@ -47,12 +49,19 @@ if (!$ormClassLoader->canLoadClass("Doctrine\\ORM\\Version")) { /** * Check for the correct DoctrineORM version. We only support Doctrine 2.1.0 or higher. */ -if (\Doctrine\ORM\Version::compare("2.2.0") == 1) { +if (\Doctrine\ORM\Version::compare("2.2.0") > 0) { $versionInvalidMessage = "DoctrineORM is installed, but needs to be at Version 2.2.0 or higher. "; $versionInvalidMessage .= "Please run pear upgrade-all to bring your packages up-to-date."; echo json_encode(array("error" => true, "message" => $versionInvalidMessage)); exit; + +} + +if (\Doctrine\ORM\Version::compare("2.3.0") <= 0) { + $aWarnings[] = sprintf( "You are using Doctrine %s, which PartKeepr isn't tested against. If you encounter any ". + "problems, please report them.", + \Doctrine\ORM\Version::VERSION); } /** @@ -74,5 +83,5 @@ if (!$doctrineClassLoader->canLoadClass("Doctrine\\Symfony\\Component\\Yaml\\Yam exit; } -echo json_encode(array("error" => false)); +echo json_encode(array("error" => false, "warnings" => $aWarnings)); exit;