Skip to content

Commit

Permalink
Support dbal 3
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jul 5, 2024
1 parent aab5af2 commit 5599f67
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ phpunit.xml
vendor/
composer.lock
.idea/
.phpunit.cache/
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
],
"require": {
"php": ">=8.0",
"doctrine/orm": ">=2.6, <3.0",
"doctrine/dbal": ">=2.6, <3.0",
"doctrine/orm": "^2.6",
"doctrine/dbal": "^2.6|^3",
"doctrine/lexer": "^2|^3"
},
"require-dev": {
Expand Down
20 changes: 11 additions & 9 deletions tests/Oro/Entities/Foo.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,48 @@

namespace Oro\Entities;

use Doctrine\ORM\Mapping as ORM;

/**
* @Entity
* @Table(name="test_foo")
* @ORM\Entity
* @ORM\Table(name="test_foo")
*/
class Foo
{
/**
* @var int
*
* @Id
* @Column(type="integer", name="id")
* @GeneratedValue(strategy="AUTO")
* @ORM\Id
* @ORM\Column(type="integer", name="id")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;

/**
* @var string
*
* @Column(name="name", type="string", length=255)
* @ORM\Column(name="name", type="string", length=255)
*/
protected $name;

/**
* @var \DateTime $createdAt
*
* @Column(name="created_at", type="datetime", nullable=true)
* @ORM\Column(name="created_at", type="datetime", nullable=true)
*/
protected $createdAt;

/**
* @var float
*
* @Column(name="budget", type="float", nullable=true)
* @ORM\Column(name="budget", type="float", nullable=true)
*/
protected $budget;

/**
* @var string
*
* @Column(name="code", type="string", length=255)
* @ORM\Column(name="code", type="string", length=255)
*/
protected $code;

Expand Down
2 changes: 1 addition & 1 deletion tests/Oro/Tests/Connection/TestUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static function getEntityManager(): EntityManager
$dbParams = self::getConnectionParams();
$entitiesPath = \realpath(__DIR__ . '/../../Entities');

$config = Setup::createAnnotationMetadataConfiguration([$entitiesPath], true);
$config = Setup::createAnnotationMetadataConfiguration([$entitiesPath], true, null, null, false);
self::$entityManager = EntityManager::create($dbParams, $config);
}

Expand Down

0 comments on commit 5599f67

Please sign in to comment.