-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another round of mapping refactoring in tests for cross-version compa…
…tibility
- Loading branch information
Showing
23 changed files
with
313 additions
and
124 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
tests/Gedmo/Mapping/Driver/Xml/Gedmo.Tests.Mapping.Fixture.Xml.User.dcm.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"> | ||
<entity name="Gedmo\Tests\Mapping\Fixture\Xml\User" table="users"> | ||
<indexes> | ||
<index name="search_idx" columns="username"/> | ||
</indexes> | ||
<id name="id" type="integer" column="id"> | ||
<generator strategy="IDENTITY"/> | ||
</id> | ||
<field name="password" type="string" column="password" length="32"> | ||
<gedmo:translatable/> | ||
</field> | ||
<field name="username" type="string" column="username" length="128"> | ||
<gedmo:translatable/> | ||
</field> | ||
<field name="company" type="string" column="company" length="128" nullable="true"> | ||
<gedmo:translatable fallback="true"/> | ||
</field> | ||
<gedmo:translation entity="Gedmo\Tests\Translatable\Fixture\PersonTranslation" locale="localeField"/> | ||
</entity> | ||
</doctrine-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Doctrine Behavioral Extensions package. | ||
* (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Gedmo\Tests\Mapping\Fixture\Xml; | ||
|
||
class User | ||
{ | ||
/** | ||
* @var int | ||
*/ | ||
private $id; | ||
|
||
private ?string $password = null; | ||
|
||
private ?string $username = null; | ||
|
||
private ?string $company = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $localeField; | ||
|
||
public function getId(): int | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function setPassword(string $password): void | ||
{ | ||
$this->password = $password; | ||
} | ||
|
||
public function getPassword(): string | ||
{ | ||
return $this->password; | ||
} | ||
|
||
public function setUsername(string $username): void | ||
{ | ||
$this->username = $username; | ||
} | ||
|
||
public function getUsername(): string | ||
{ | ||
return $this->username; | ||
} | ||
|
||
public function setCompany(string $company): void | ||
{ | ||
$this->company = $company; | ||
} | ||
|
||
public function getCompany(): string | ||
{ | ||
return $this->company; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.