Skip to content

Commit

Permalink
fix column mapping issues + fix some deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher committed Feb 25, 2024
1 parent df9a158 commit 8a8458e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/App/Entity/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#[ORM\Entity]
class Item
{
#[ORM\Column(type: Types::DECIMAL)]
#[ORM\Column(type: Types::DECIMAL, precision: 2)]
private string $offeredPrice;

public function __construct(
Expand Down
2 changes: 1 addition & 1 deletion tests/App/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(
private int $id,
#[ORM\Column(type: Types::STRING)]
private string $name = '',
#[ORM\Column(type: Types::DECIMAL)]
#[ORM\Column(type: Types::DECIMAL, precision: 2)]
private string $currentPrice = '0.0'
) {
}
Expand Down
3 changes: 3 additions & 0 deletions tests/App/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ doctrine:
use_savepoints: true
orm:
auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
auto_mapping: true
report_fields_where_declared: true
validate_xml_mapping: true
mappings:
SonataORMTest:
type: attribute
Expand Down
1 change: 1 addition & 0 deletions tests/custom_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

$kernel = new AppKernel($_SERVER['APP_ENV'] ?? 'test', (bool) ($_SERVER['APP_DEBUG'] ?? false));
$application = new Application($kernel);
$application->setCatchExceptions(false);
$application->setAutoExit(false);

$input = new ArrayInput([
Expand Down

0 comments on commit 8a8458e

Please sign in to comment.