Skip to content

Commit

Permalink
Merge pull request #10108 from doctrine/2.13.x
Browse files Browse the repository at this point in the history
Merge 2.13.x up into 2.14.x
  • Loading branch information
greg0ire committed Oct 7, 2022
2 parents e14e9be + e750360 commit 0e65b0c
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standard.yml
Expand Up @@ -10,4 +10,4 @@ on:

jobs:
coding-standards:
uses: "doctrine/.github/.github/workflows/coding-standards.yml@2.0.0"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@2.1.0"
34 changes: 17 additions & 17 deletions .github/workflows/continuous-integration.yml
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
with:
fetch-depth: 2

Expand All @@ -53,7 +53,7 @@ jobs:
if: "${{ matrix.dbal-version != 'default' }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--ignore-platform-req=php+"

Expand All @@ -68,7 +68,7 @@ jobs:
ENABLE_SECOND_LEVEL_CACHE: 1

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
uses: "actions/upload-artifact@v3"
with:
name: "phpunit-sqlite-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
path: "coverage*.xml"
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
with:
fetch-depth: 2

Expand All @@ -126,15 +126,15 @@ jobs:
if: "${{ matrix.dbal-version != 'default' }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--ignore-platform-req=php+"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
uses: "actions/upload-artifact@v3"
with:
name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
path: "coverage.xml"
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
with:
fetch-depth: 2

Expand All @@ -202,15 +202,15 @@ jobs:
extensions: "${{ matrix.extension }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--ignore-platform-req=php+"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
uses: "actions/upload-artifact@v3"
with:
name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
path: "coverage.xml"
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
with:
fetch-depth: 2

Expand All @@ -278,7 +278,7 @@ jobs:
if: "${{ matrix.dbal-version != 'default' }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--ignore-platform-req=php+"

Expand All @@ -293,7 +293,7 @@ jobs:
ENABLE_SECOND_LEVEL_CACHE: 1

- name: "Upload coverage files"
uses: "actions/upload-artifact@v2"
uses: "actions/upload-artifact@v3"
with:
name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
path: "coverage*.xml"
Expand All @@ -313,7 +313,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
with:
fetch-depth: 2

Expand All @@ -324,7 +324,7 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.deps }}"

Expand All @@ -343,16 +343,16 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
with:
fetch-depth: 2

- name: "Download coverage files"
uses: "actions/download-artifact@v2"
uses: "actions/download-artifact@v3"
with:
path: "reports"

- name: "Upload to Codecov"
uses: "codecov/codecov-action@v1"
uses: "codecov/codecov-action@v3"
with:
directory: reports
4 changes: 2 additions & 2 deletions .github/workflows/phpbench.yml
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
with:
fetch-depth: 2

Expand All @@ -36,7 +36,7 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
uses: "actions/cache@v3"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-on-milestone-closed.yml
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@2.0.0"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@2.1.0"
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/static-analysis.yml
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
Expand All @@ -50,7 +50,7 @@ jobs:
if: "${{ matrix.persistence-version != 'default' }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:

steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
Expand All @@ -87,7 +87,7 @@ jobs:
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"

Expand Down
7 changes: 3 additions & 4 deletions docs/en/reference/attributes-reference.rst
Expand Up @@ -10,8 +10,8 @@ annotation metadata supported since the first version 2.0.
Index
-----

- :ref:`#[AssociationOverride] <attrref_associationoverride]`
- :ref:`#[AttributeOverride] <attrref_attributeoverride]`
- :ref:`#[AssociationOverride] <attrref_associationoverride>`
- :ref:`#[AttributeOverride] <attrref_attributeoverride>`
- :ref:`#[Column] <attrref_column>`
- :ref:`#[Cache] <attrref_cache>`
- :ref:`#[ChangeTrackingPolicy <attrref_changetrackingpolicy>`
Expand All @@ -27,7 +27,6 @@ Index
- :ref:`#[Id] <attrref_id>`
- :ref:`#[InheritanceType] <attrref_inheritancetype>`
- :ref:`#[JoinColumn] <attrref_joincolumn>`
- :ref:`#[JoinColumns] <attrref_joincolumns>`
- :ref:`#[JoinTable] <attrref_jointable>`
- :ref:`#[ManyToOne] <attrref_manytoone>`
- :ref:`#[ManyToMany] <attrref_manytomany>`
Expand Down Expand Up @@ -179,7 +178,7 @@ Optional parameters:
If not specified, default value is ``false``.

- **insertable**: Boolean value to determine if the column should be
included when inserting a new row into the underlying entities table.
included when inserting a new row into the underlying entities table.
If not specified, default value is true.

- **updatable**: Boolean value to determine if the column should be
Expand Down
2 changes: 1 addition & 1 deletion docs/en/tutorials/embeddables.rst
@@ -1,5 +1,5 @@
Separating Concerns using Embeddables
-------------------------------------
=====================================

Embeddables are classes which are not entities themselves, but are embedded
in entities and can also be queried in DQL. You'll mostly want to use them
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/Models/Cache/City.php
Expand Up @@ -51,7 +51,7 @@ class City
* @JoinColumn(name="state_id", referencedColumnName="id")
*/
#[ORM\Cache]
#[ORM\ManyToOne(targetEntity: 'State', inversedBy: 'citities')]
#[ORM\ManyToOne(targetEntity: 'State', inversedBy: 'cities')]
#[ORM\JoinColumn(name: 'state_id', referencedColumnName: 'id')]
protected $state;

Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC5684Test.php
Expand Up @@ -125,7 +125,7 @@ class DDC5684Object
/**
* @var DDC5684ObjectIdType
* @Id
* @Column(type=Doctrine\Tests\ORM\Functional\Ticket\DDC5684ObjectIdType::class)
* @Column(type=DDC5684ObjectIdType::class)
* @GeneratedValue(strategy="AUTO")
*/
public $id;
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/GH6141Test.php
Expand Up @@ -153,8 +153,8 @@ public function __toString(): string
* @InheritanceType("JOINED")
* @DiscriminatorColumn(name="discr", type="gh6141people")
* @DiscriminatorMap({
* Doctrine\Tests\ORM\Functional\Ticket\GH6141People::BOSS = GH6141Boss::class,
* Doctrine\Tests\ORM\Functional\Ticket\GH6141People::EMPLOYEE = GH6141Employee::class
* GH6141People::BOSS = GH6141Boss::class,
* GH6141People::EMPLOYEE = GH6141Employee::class
* })
*/
abstract class GH6141Person
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/GH7012Test.php
Expand Up @@ -58,7 +58,7 @@ class GH7012UserData
/**
* @var QuotedUser
* @Id
* @OneToOne(targetEntity=Doctrine\Tests\Models\Quote\User::class)
* @OneToOne(targetEntity=QuotedUser::class)
* @JoinColumn(name="`user-id`", referencedColumnName="`user-id`", onDelete="CASCADE")
*/
public $user;
Expand Down
8 changes: 4 additions & 4 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/GH7512Test.php
Expand Up @@ -48,8 +48,8 @@ public function testFindEntityByAssociationPropertyJoinedChildWithClearMetadata(
* @Entity()
* @InheritanceType("JOINED")
* @DiscriminatorMap({
* "entitya"=Doctrine\Tests\ORM\Functional\Ticket\GH7512EntityA::class,
* "entityB"=Doctrine\Tests\ORM\Functional\Ticket\GH7512EntityB::class
* "entitya"=GH7512EntityA::class,
* "entityB"=GH7512EntityB::class
* })
*/
class GH7512EntityA
Expand All @@ -63,7 +63,7 @@ class GH7512EntityA
public $id;

/**
* @OneToMany(targetEntity="Doctrine\Tests\ORM\Functional\Ticket\GH7512EntityC", mappedBy="entityA")
* @OneToMany(targetEntity="GH7512EntityC", mappedBy="entityA")
* @var Collection<int, GH7512EntityC>
*/
public $entityCs;
Expand All @@ -86,7 +86,7 @@ class GH7512EntityC
public $id;

/**
* @ManyToOne(targetEntity="Doctrine\Tests\ORM\Functional\Ticket\GH7512EntityA", inversedBy="entityCs")
* @ManyToOne(targetEntity="GH7512EntityA", inversedBy="entityCs")
* @var GH7512EntityA
*/
public $entityA;
Expand Down
11 changes: 11 additions & 0 deletions tests/Doctrine/Tests/ORM/PersistentCollectionTest.php
Expand Up @@ -21,6 +21,8 @@
use function array_keys;
use function assert;
use function method_exists;
use function serialize;
use function unserialize;

/**
* Tests the lazy-loading capabilities of the PersistentCollection and the initialization of collections.
Expand Down Expand Up @@ -286,4 +288,13 @@ public function testModifyUOWForDeferredImplicitOwnerOnClear(): void

$this->collection->clear();
}

public function testItCanBeSerializedAndUnserializedBack(): void
{
$this->collection->add(new stdClass());
$collection = unserialize(serialize($this->collection));
$collection->add(new stdClass());
$collection[3] = new stdClass();
self::assertCount(3, $collection);
}
}
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php
Expand Up @@ -366,7 +366,7 @@ class DDC1649Two
{
/**
* @var DDC1649One
* @Id @ManyToOne(targetEntity="DDC1649One")@JoinColumn(name="id", referencedColumnName="id")
* @Id @ManyToOne(targetEntity="DDC1649One")
*/
public $one;
}
Expand Down

0 comments on commit 0e65b0c

Please sign in to comment.