orm/.git
2 months agoAdd Doctrine\ORM\Query\Expr::mod() (#6747) master origin/HEAD origin/master
Menno Holtkamp [Tue, 22 Sep 2020 13:21:21 +0000 (15:21 +0200)]
Add Doctrine\ORM\Query\Expr::mod() (#6747)

5 months agoReplace "Blacklist" with "Banlist" in join example (#8175)
Alexander Berl [Tue, 9 Jun 2020 05:39:41 +0000 (07:39 +0200)]
Replace "Blacklist" with "Banlist" in join example (#8175)

5 months agoUse correct target branch info in PR templates (#8171)
Grégoire Paris [Thu, 4 Jun 2020 20:19:41 +0000 (22:19 +0200)]
Use correct target branch info in PR templates (#8171)

The current branch for bugfixes is 2.7, and new features should go on
2.8.x, not master.

6 months agoShow full XML filename for dataset in test failure report (#7346)
Guilliam Xavier [Sun, 31 May 2020 17:03:45 +0000 (19:03 +0200)]
Show full XML filename for dataset in test failure report (#7346)

6 months agoUpdated persisters origin/new-embeddables
Guilherme Blanco [Mon, 11 May 2020 03:43:54 +0000 (23:43 -0400)]
Updated persisters

6 months agoUpdated persister->update()
Guilherme Blanco [Sun, 10 May 2020 19:39:33 +0000 (15:39 -0400)]
Updated persister->update()

6 months agoDisable embedded temporarily
Guilherme Blanco [Sun, 10 May 2020 15:40:43 +0000 (11:40 -0400)]
Disable embedded temporarily

6 months agoMore work towards embeddables
Guilherme Blanco [Sat, 9 May 2020 20:04:35 +0000 (16:04 -0400)]
More work towards embeddables

6 months agoInitial work on adding support back to embeddables on ORM 3
Guilherme Blanco [Tue, 5 May 2020 14:02:40 +0000 (10:02 -0400)]
Initial work on adding support back to embeddables on ORM 3

6 months agophpstan
Guilherme Blanco [Mon, 4 May 2020 21:27:09 +0000 (17:27 -0400)]
phpstan

6 months agoPHPCS
Guilherme Blanco [Mon, 4 May 2020 21:25:46 +0000 (17:25 -0400)]
PHPCS

6 months agoPHP 7.4
Guilherme Blanco [Mon, 4 May 2020 20:35:32 +0000 (16:35 -0400)]
PHP 7.4

6 months agoMoving Github actions to PHP 7.3, since DBAL requires 7.3 as minimum dependency
Guilherme Blanco [Mon, 4 May 2020 19:23:33 +0000 (15:23 -0400)]
Moving Github actions to PHP 7.3, since DBAL requires 7.3 as minimum dependency

6 months agoIntroduced LazyDataType support.
Guilherme Blanco [Mon, 4 May 2020 18:18:58 +0000 (14:18 -0400)]
Introduced LazyDataType support.

7 months agoUpdated composer.json and made unit tests run, not necessarily pass... (#7921)
Guilherme Blanco [Fri, 1 May 2020 18:17:07 +0000 (14:17 -0400)]
Updated composer.json and made unit tests run, not necessarily pass... (#7921)

* Updated composer.json and made unit tests run, not necessarily pass...

* Addressed code review comments. Fixed BC break in AbstractPlatform now relying on column name to be provided when generating the column sql definition. Switched a skipped embedded test to its proper group

* Several test fixes

* Update doctrine/dbal dep to concrete commit

dev-snapshot/develop/2018-11-26 is not found by composer

* Update Tidelift item to fix auto-verification

* Add Tidelift enterprise marketing language

* Adapt contributing guide to new target versions

* Set link to contribution guide for target branches

* Run Static analysis and coding standards in Github Actions (#8049)

* Run Static analysis and coding standards in Github Actions

* Remove static analysis from Travis.

* Run on PRs and Push to master branch

* Add name suggestions by Gregoire

* Downgrade version to lowest supported.

* Suggestions by Gabriel, Luis and Claudio

* Update .github/workflows/ci.yml

Co-Authored-By: Gabriel Caruso <carusogabriel34@gmail.com>
Co-authored-by: Gabriel Caruso <carusogabriel34@gmail.com>
* Fix: Give workflow a name (#8060)

* Updated composer.json and made unit tests run, not necessarily pass...

* Addressed code review comments. Fixed BC break in AbstractPlatform now relying on column name to be provided when generating the column sql definition. Switched a skipped embedded test to its proper group

* Several test fixes

* Several fixes to unit tests and codebase to make it run on DBAL 3.0.x

* Unit test suite now passes

* Test for 7.4

* Remove 7.2

* Finished fixing phpunit, phpstan and phpcs

* Make scrutinizer run with PHP 7.4

* Attempt to improve travis

* Take 2

* More work on travis

* Take 4

* xdebug

* xdebug

Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>
Co-authored-by: Blaine Bublitz <blaine@tidelift.com>
Co-authored-by: Jonathan H. Wage <jonwage@gmail.com>
Co-authored-by: Claudio Zizza <claudio@budgegeria.de>
Co-authored-by: Claudio Zizza <859964+SenseException@users.noreply.github.com>
Co-authored-by: Gabriel Caruso <carusogabriel34@gmail.com>
8 months agoFix: Give workflow a name (#8060)
Benjamin Eberlei [Wed, 4 Mar 2020 22:32:11 +0000 (23:32 +0100)]
Fix: Give workflow a name (#8060)

9 months agoRun Static analysis and coding standards in Github Actions (#8049)
Benjamin Eberlei [Mon, 2 Mar 2020 21:29:15 +0000 (22:29 +0100)]
Run Static analysis and coding standards in Github Actions (#8049)

* Run Static analysis and coding standards in Github Actions

* Remove static analysis from Travis.

* Run on PRs and Push to master branch

* Add name suggestions by Gregoire

* Downgrade version to lowest supported.

* Suggestions by Gabriel, Luis and Claudio

* Update .github/workflows/ci.yml

Co-Authored-By: Gabriel Caruso <carusogabriel34@gmail.com>
Co-authored-by: Gabriel Caruso <carusogabriel34@gmail.com>
9 months agoMerge pull request #8021 from SenseException/contribute-version
Claudio Zizza [Mon, 17 Feb 2020 10:11:59 +0000 (11:11 +0100)]
Merge pull request #8021 from SenseException/contribute-version

Update target branches of CONTRIBUTING.md

9 months agoSet link to contribution guide for target branches
Claudio Zizza [Fri, 14 Feb 2020 20:40:21 +0000 (21:40 +0100)]
Set link to contribution guide for target branches

9 months agoAdapt contributing guide to new target versions
Claudio Zizza [Fri, 14 Feb 2020 20:33:29 +0000 (21:33 +0100)]
Adapt contributing guide to new target versions

10 months agoMerge pull request #8001 from phated/patch-2
Jonathan H. Wage [Thu, 23 Jan 2020 19:41:39 +0000 (13:41 -0600)]
Merge pull request #8001 from phated/patch-2

Add Tidelift enterprise marketing language

10 months agoMerge pull request #8000 from phated/patch-1
Jonathan H. Wage [Thu, 23 Jan 2020 19:40:58 +0000 (13:40 -0600)]
Merge pull request #8000 from phated/patch-1

Update Tidelift item to fix auto-verification

10 months agoAdd Tidelift enterprise marketing language
Blaine Bublitz [Thu, 23 Jan 2020 18:19:36 +0000 (11:19 -0700)]
Add Tidelift enterprise marketing language

10 months agoUpdate Tidelift item to fix auto-verification
Blaine Bublitz [Thu, 23 Jan 2020 17:58:45 +0000 (10:58 -0700)]
Update Tidelift item to fix auto-verification

10 months agoMerge pull request #7938 from simPod/fix-dbal-dep
Benjamin Eberlei [Tue, 7 Jan 2020 22:54:53 +0000 (23:54 +0100)]
Merge pull request #7938 from simPod/fix-dbal-dep

Update doctrine/dbal dep to concrete commit

12 months agoUpdate doctrine/dbal dep to concrete commit
Simon Podlipsky [Sun, 1 Dec 2019 10:50:03 +0000 (11:50 +0100)]
Update doctrine/dbal dep to concrete commit

dev-snapshot/develop/2018-11-26 is not found by composer

12 months agoMerge pull request #7914 from lcobucci/update-branch-information
Luís Cobucci [Fri, 22 Nov 2019 13:00:49 +0000 (14:00 +0100)]
Merge pull request #7914 from lcobucci/update-branch-information

Add branch 2.8 to docs

12 months agoAdd branch 2.8 to docs
Luís Cobucci [Thu, 21 Nov 2019 12:21:54 +0000 (13:21 +0100)]
Add branch 2.8 to docs

12 months agoMerge pull request #7828 from andrews05/andrews05-jti-properties
Guilherme Blanco [Fri, 15 Nov 2019 05:14:58 +0000 (00:14 -0500)]
Merge pull request #7828 from andrews05/andrews05-jti-properties

Fix for TransientMetadata on joined subclass

12 months agoMerge pull request #7647 from SenseException/entity-readOnly
Claudio Zizza [Sun, 10 Nov 2019 22:09:13 +0000 (23:09 +0100)]
Merge pull request #7647 from SenseException/entity-readOnly

Add readOnly attribute to annotation example

12 months agoMerge pull request #7613 from SenseException/dql-select-subheadlines
Claudio Zizza [Wed, 6 Nov 2019 20:38:35 +0000 (21:38 +0100)]
Merge pull request #7613 from SenseException/dql-select-subheadlines

Add headlines for direct references to DQL examples

13 months agoMerge pull request #7669 from iliyaZelenko/patch-1
Grégoire Paris [Thu, 31 Oct 2019 16:52:42 +0000 (17:52 +0100)]
Merge pull request #7669 from iliyaZelenko/patch-1

fix: information about units in DATE_ADD, DATE_SUB

13 months agoMerge pull request #7883 from Pictor13/patch-1
Marco Pivetta [Thu, 31 Oct 2019 14:18:17 +0000 (15:18 +0100)]
Merge pull request #7883 from Pictor13/patch-1

Fix bullet list not rendering correctly on Github

13 months agoFix bullet list not rendering correctly on Github
Igor Pellegrini [Thu, 31 Oct 2019 13:30:36 +0000 (14:30 +0100)]
Fix bullet list not rendering correctly on Github

As *rts*, if reading the tutorial on the Github repository, the items are not seen as elements of a bullet list, hence they are not rendered and they are collapsed in a single line of text.

Fix won't affect how it renders on [doctrine-project.org](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html).

14 months agoSkip TransientMetadata properties while inserting
andrews05 [Tue, 24 Sep 2019 02:00:31 +0000 (14:00 +1200)]
Skip TransientMetadata properties while inserting

This prevents an exception being thrown if a non-ORM property is declared on a joined subclass.
Fixes #7824.

14 months agoMerge pull request #7840 from peter-gribanov/reflFieldValue
mikeSimonson [Mon, 30 Sep 2019 08:30:06 +0000 (10:30 +0200)]
Merge pull request #7840 from peter-gribanov/reflFieldValue

Remove not used variable $reflFieldValue in ObjectHydrator

14 months agoremove not used variable $reflFieldValue in ObjectHydrator
Peter Gribanov [Mon, 30 Sep 2019 08:05:59 +0000 (11:05 +0300)]
remove not used variable $reflFieldValue in ObjectHydrator

15 months agoImplemented and adopted ClassMetadataBuilder in both Annotation and XML drivers....
Guilherme Blanco [Wed, 21 Aug 2019 04:32:08 +0000 (00:32 -0400)]
Implemented and adopted ClassMetadataBuilder in both Annotation and XML drivers. Implemented and adopted PropertyMetadataBuilder in Annotation driver.

15 months agoCleanup after AssociationBuilders and prep for ClassMetadataBuilder
Guilherme Blanco [Mon, 19 Aug 2019 04:54:01 +0000 (00:54 -0400)]
Cleanup after AssociationBuilders and prep for ClassMetadataBuilder

15 months agoMerge pull request #7799 from doctrine/m2m-association-builder
Guilherme Blanco [Mon, 19 Aug 2019 02:04:10 +0000 (22:04 -0400)]
Merge pull request #7799 from doctrine/m2m-association-builder

Many to many association builder

15 months agoImplemented AssociationBuilders
Guilherme Blanco [Wed, 14 Aug 2019 14:55:00 +0000 (10:55 -0400)]
Implemented AssociationBuilders

16 months agoMerge pull request #7782 from doctrine/bump-phpstan
Marco Pivetta [Sun, 28 Jul 2019 17:17:35 +0000 (19:17 +0200)]
Merge pull request #7782 from doctrine/bump-phpstan

Update to PHPStan v0.11

16 months agoMerge pull request #7776 from doctrine/chore/remove-hack-this-scope
Marco Pivetta [Sun, 28 Jul 2019 13:03:06 +0000 (15:03 +0200)]
Merge pull request #7776 from doctrine/chore/remove-hack-this-scope

Remove hack to access class scope inside closures

16 months agoRemove hack to access class scope inside closures
Gabriel Caruso [Sun, 21 Jul 2019 19:12:14 +0000 (21:12 +0200)]
Remove hack to access class scope inside closures

This is possible since 5.4.

16 months agoUpdate to PHPStan v0.11
Gabriel Caruso [Sun, 28 Jul 2019 11:20:23 +0000 (13:20 +0200)]
Update to PHPStan v0.11

16 months agoMerge pull request #7781 from tybulewicz/patch-1
Luís Cobucci [Fri, 26 Jul 2019 16:15:14 +0000 (18:15 +0200)]
Merge pull request #7781 from tybulewicz/patch-1

Missing method `getUtc` added

16 months agoMissing method `getUtc` added
Tomasz Tybulewicz [Fri, 26 Jul 2019 08:51:47 +0000 (10:51 +0200)]
Missing method `getUtc` added

16 months agoMerge pull request #7777 from doctrine/chore/fix-phpcs-errors
Luís Cobucci [Fri, 26 Jul 2019 08:04:48 +0000 (10:04 +0200)]
Merge pull request #7777 from doctrine/chore/fix-phpcs-errors

Fix Code Style issues in master branch

16 months agoFixing build
Guilherme Blanco [Wed, 24 Jul 2019 03:15:57 +0000 (23:15 -0400)]
Fixing build

16 months agoFix Code Style issues in master branch
Gabriel Caruso [Sun, 21 Jul 2019 19:35:59 +0000 (21:35 +0200)]
Fix Code Style issues in master branch

16 months agoIntroduced ValueGeneratorMetadataBuilder
Guilherme Blanco [Fri, 19 Jul 2019 04:19:46 +0000 (00:19 -0400)]
Introduced ValueGeneratorMetadataBuilder

16 months agoIntroduced FieldMetadataBuilder
Guilherme Blanco [Wed, 10 Jul 2019 04:37:58 +0000 (00:37 -0400)]
Introduced FieldMetadataBuilder

16 months agoMerge pull request #7771 from Arman-Hosseini/patch-1
Luís Cobucci [Tue, 9 Jul 2019 14:59:51 +0000 (16:59 +0200)]
Merge pull request #7771 from Arman-Hosseini/patch-1

Remove year from license

16 months agoUpdate license year
Arman [Mon, 8 Jul 2019 14:28:34 +0000 (18:58 +0430)]
Update license year

16 months agoMerge pull request #7772 from lcobucci/fix-build
Guilherme Blanco [Tue, 9 Jul 2019 13:53:05 +0000 (09:53 -0400)]
Merge pull request #7772 from lcobucci/fix-build

Fix build

16 months agoFix static analysis issues
Luís Cobucci [Tue, 9 Jul 2019 12:34:20 +0000 (14:34 +0200)]
Fix static analysis issues

16 months agoFix coding standard violations
Luís Cobucci [Tue, 9 Jul 2019 08:37:31 +0000 (10:37 +0200)]
Fix coding standard violations

17 months agoIntroduced JoinTableMetadataBuilder
Guilherme Blanco [Thu, 4 Jul 2019 04:51:09 +0000 (00:51 -0400)]
Introduced JoinTableMetadataBuilder

17 months agoIntroduced JoinColumnMetadataBuilder.
Guilherme Blanco [Wed, 3 Jul 2019 04:50:59 +0000 (00:50 -0400)]
Introduced JoinColumnMetadataBuilder.

17 months agoEliminated the differentiation between class declared versus inheritance declared
Guilherme Blanco [Wed, 3 Jul 2019 03:09:33 +0000 (23:09 -0400)]
Eliminated the differentiation between class declared versus inheritance declared

17 months agoRemoved completeRuntimeMetadata() method from ClassMetadataFactory and moved to the...
Guilherme Blanco [Wed, 3 Jul 2019 02:47:41 +0000 (22:47 -0400)]
Removed completeRuntimeMetadata() method from ClassMetadataFactory and moved to the appropriate location

17 months agoDecoupled DiscriminatorColumnMetadataBuilder from drivers
Guilherme Blanco [Fri, 28 Jun 2019 14:26:51 +0000 (10:26 -0400)]
Decoupled DiscriminatorColumnMetadataBuilder from drivers

17 months agoAdded transient metadata builder. Fixed cache bug for missing column name for fields...
Guilherme Blanco [Thu, 27 Jun 2019 04:04:59 +0000 (00:04 -0400)]
Added transient metadata builder. Fixed cache bug for missing column name for fields.  More typehint

17 months agoAdded TableMetadataBuilder
Guilherme Blanco [Wed, 26 Jun 2019 03:37:06 +0000 (23:37 -0400)]
Added TableMetadataBuilder

17 months agoEliminated AbstractClassMetadataFactory, as there is no purpose for abstracting
Guilherme Blanco [Mon, 24 Jun 2019 03:58:16 +0000 (23:58 -0400)]
Eliminated AbstractClassMetadataFactory, as there is no purpose for abstracting

17 months agoFixes for non-cached behavior
Guilherme Blanco [Mon, 24 Jun 2019 03:41:51 +0000 (23:41 -0400)]
Fixes for non-cached behavior

17 months agoSimplified entity listeners. Implemented cache builder
Guilherme Blanco [Mon, 24 Jun 2019 03:37:57 +0000 (23:37 -0400)]
Simplified entity listeners. Implemented cache builder

17 months agoOptimized VersionFieldMetadata support. General fixes for phpstan. Moved validation...
Guilherme Blanco [Fri, 21 Jun 2019 04:56:21 +0000 (00:56 -0400)]
Optimized VersionFieldMetadata support. General fixes for phpstan. Moved validation and comppletion of FieldMetadata to corresponding methods. More optimizations around sequencing generation.

17 months agoRemove unnecessary argument
Luís Cobucci [Tue, 18 Jun 2019 08:46:37 +0000 (10:46 +0200)]
Remove unnecessary argument

17 months agoFix coding standard violations
Luís Cobucci [Tue, 18 Jun 2019 08:45:44 +0000 (10:45 +0200)]
Fix coding standard violations

17 months agoExpanded featureset of ClassMetadataBuildingContext. Added more typehints. Added...
Guilherme Blanco [Tue, 18 Jun 2019 04:28:34 +0000 (00:28 -0400)]
Expanded featureset of ClassMetadataBuildingContext. Added more typehints. Added parent ClalassMetadata to constructor. Optimized sequencing generation by delegating its creation to ValueGenerator.

17 months agoMerge pull request #7725 from doctrine/sync-master
Luís Cobucci [Tue, 18 Jun 2019 00:17:21 +0000 (02:17 +0200)]
Merge pull request #7725 from doctrine/sync-master

Sync bug fixes from v2.6

17 months agochange variable name
Darryl Hein [Mon, 29 Apr 2019 03:07:22 +0000 (21:07 -0600)]
change variable name

to make it consistent throughout document

17 months agoUpdate ordered-associations.rst
Sergiu Pirlici [Sat, 16 Feb 2019 13:04:45 +0000 (15:04 +0200)]
Update ordered-associations.rst

Fixed some typos

17 months agofix typo
Marc Plotz [Thu, 17 Jan 2019 09:14:56 +0000 (10:14 +0100)]
fix typo

`has to allow null values` vs `has to allows null values`

17 months agoFix of links and php version after review
Claudio Zizza [Sun, 11 Nov 2018 21:56:01 +0000 (22:56 +0100)]
Fix of links and php version after review

17 months agoFix of links and anchors
Claudio Zizza [Sat, 1 Sep 2018 23:48:34 +0000 (01:48 +0200)]
Fix of links and anchors

17 months agoSwap properties via entity manager mock
Guilherme Blanco [Mon, 17 Jun 2019 22:55:45 +0000 (00:55 +0200)]
Swap properties via entity manager mock

17 months ago #7527 automated CS checks
Marco Pivetta [Thu, 20 Dec 2018 21:45:54 +0000 (22:45 +0100)]
 #7527 automated CS checks

17 months agoAs an example result:
Marco Pivetta [Wed, 19 Dec 2018 09:52:11 +0000 (10:52 +0100)]
As an example result:

```
./phpbench.phar run tests/Doctrine/Performance/Query --iterations=50 --revs=50 --report=aggregate
PhpBench 0.15-dev (dcbe193). Running benchmarks.
Using configuration file: /home/ocramius/Documents/doctrine/doctrine2/phpbench.json

\Doctrine\Performance\Query\QueryBoundParameterProcessingBench

    benchExecuteParsedQueryWithInferredParameterTypeI49 P0  [μ Mo]/r: 643.684 634.664 (μs)  [μSD μRSD]/r: 17.700μs 2.75%
    benchExecuteParsedQueryWithDeclaredParameterTypeI49 P0  [μ Mo]/r: 97.673 94.251 (μs)  [μSD μRSD]/r: 8.259μs 8.46%

2 subjects, 100 iterations, 100 revs, 0 rejects, 0 failures, 0 warnings
(best [mean mode] worst) = 88.460 [370.679 364.458] 127.400 (μs)
⅀T: 37,067.880μs μSD/r 12.980μs μRSD/r: 5.603%
suite: 133f0e30090f815142331ebec6af18241694e7c0, date: 2018-12-19, stime: 10:47:10
+------------------------------------+--------------------------------------------------+--------+--------+------+-----+------------+-----------+-----------+-----------+-----------+----------+--------+-------+
| benchmark                          | subject                                          | groups | params | revs | its | mem_peak   | best      | mean      | mode      | worst     | stdev    | rstdev | diff  |
+------------------------------------+--------------------------------------------------+--------+--------+------+-----+------------+-----------+-----------+-----------+-----------+----------+--------+-------+
| QueryBoundParameterProcessingBench | benchExecuteParsedQueryWithInferredParameterType |        | []     | 50   | 50  | 5,970,568b | 604.680μs | 643.684μs | 634.664μs | 677.640μs | 17.700μs | 2.75%  | 6.59x |
| QueryBoundParameterProcessingBench | benchExecuteParsedQueryWithDeclaredParameterType |        | []     | 50   | 50  | 5,922,424b | 88.460μs  | 97.673μs  | 94.251μs  | 127.400μs | 8.259μs  | 8.46%  | 1.00x |
+------------------------------------+--------------------------------------------------+--------+--------+------+-----+------------+-----------+-----------+-----------+-----------+----------+--------+-------+
```

This indicates that the performance impact for NOT declaring parameter types
explicitly is *MASSIVE*.

17 months agoNote: this will still lead to the `UnitOfWork#getSingleIdentifierValue()` still being
Marco Pivetta [Sun, 16 Dec 2018 15:20:26 +0000 (16:20 +0100)]
Note: this will still lead to the `UnitOfWork#getSingleIdentifierValue()` still being
called when not specifying the type of a DQL parameter being bound via
`Doctrine\ORM\Query#setParameter()`:

```php
$query->setParameter('foo', $theValue, $theType);
```

A full parameter bind is required in order to gain back performance:

```php
$query->setParameter('foo', $theValue, $theType);
```

This is up for discussion with patch reviewers.

17 months agoAs previously reported by @flaushi in https://github.com/doctrine/doctrine2/pull...
Marco Pivetta [Sun, 16 Dec 2018 14:37:45 +0000 (15:37 +0100)]
As previously reported by @flaushi in https://github.com/doctrine/doctrine2/pull/7471#discussion_r241949045, we discovered
that binding a parameter causes a `ClassMetadataFactory#getClassMetadata()` call, which in turn leads to large performance
regression when using any `object` type as parameter.

Following two snippets lead to an internal `ClassMetadataFactory#getClassMetadata()` call, which in turn leads to an
exception being thrown and garbage collected, plus multiple associated performance implications:

```php
$query->setParameter('foo', new DateTime());
$query->getResult();
```

```php
$query->setParameter('foo', new DateTime(), DateTimeType::NAME);
$query->getResult();
```

This is due to following portion of code:

https://github.com/doctrine/doctrine2/blob/434820973cadf2da2d66e7184be370084cc32ca8/lib/Doctrine/ORM/Query.php#L406-L409

Notice how `$value = $this->processParameterValue($value);` happens before attempting to infer the type for the parameter value.

That call leads to this segment being reached, which leads to the regression:

https://github.com/doctrine/doctrine2/blob/434820973cadf2da2d66e7184be370084cc32ca8/lib/Doctrine/ORM/AbstractQuery.php#L423-L433

Assuming the bound parameter type is provided, we can completely skip attempting to introspect the given object:

```php
$query->setParameter('foo', new DateTime(), DateTimeType::NAME);
$query->getResult();
```

Processing the parameter value is not needed in this case, so we can safely skip that logic for all known parameters.
In order to not introduce a BC break or change the `AbstractQuery#processParameterValue()` implementation, we could filter
out all parameters for which the type is given upfront, and later on merge them back in instead.

The test expectation to be set is for `UnitOfWork#getSingleIdentifierValue()` to never be called.

17 months agoLock dependencies for Code Quality stage
Michael Moravec [Wed, 14 Nov 2018 12:57:44 +0000 (13:57 +0100)]
Lock dependencies for Code Quality stage

17 months agoIsolate entities used by the new test
Luís Cobucci [Tue, 20 Nov 2018 23:20:20 +0000 (00:20 +0100)]
Isolate entities used by the new test

To ensure we don't have any unintended side-effect.

17 months agoFix applying collation on foreign key columns
Tobias Schultze [Sat, 18 Nov 2017 23:57:54 +0000 (00:57 +0100)]
Fix applying collation on foreign key columns

17 months ago[XML] Fix default value of many-to-many order-by to ASC
Alex Denvir [Thu, 19 Jul 2018 09:37:04 +0000 (10:37 +0100)]
[XML] Fix default value of many-to-many order-by to ASC

17 months agofix incorrect phpdoc typehint
Farhad Safarov [Tue, 13 Nov 2018 10:01:10 +0000 (13:01 +0300)]
fix incorrect phpdoc typehint

17 months ago$hydrationMode throughout can be a string as well as int (for custom modes)
James Titcumb [Wed, 24 Oct 2018 12:06:33 +0000 (13:06 +0100)]
$hydrationMode throughout can be a string as well as int (for custom modes)

17 months agoFix parameter value processing for objects with unloaded metadata
Andreas Braun [Tue, 13 Nov 2018 08:08:46 +0000 (09:08 +0100)]
Fix parameter value processing for objects with unloaded metadata

17 months agoUse HTTPS endpoint for XML schema location
Luís Cobucci [Mon, 12 Nov 2018 10:29:32 +0000 (11:29 +0100)]
Use HTTPS endpoint for XML schema location

17 months agoFixed URLs of doctrine-mapping.xsd in docs
naitsirch [Mon, 29 Oct 2018 21:32:34 +0000 (22:32 +0100)]
Fixed URLs of doctrine-mapping.xsd in docs

Until now the references to the `doctrine-mapping.xsd` consisted of different URLs.

A grep of docs showed:
* /Users/robo/dev/php/Doctrine/doctrine-mapping.xsd
* http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd
* http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd
* https://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd

Now it is used http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd everywhere.

17 months agoAdd UPGRADE note for EntityRepository::count()
Michael Moravec [Wed, 27 Jun 2018 18:41:59 +0000 (20:41 +0200)]
Add UPGRADE note for EntityRepository::count()

17 months agoUnnecessary newline removed, small improvements in text
Jarek Jakubowski [Fri, 8 Jun 2018 22:29:59 +0000 (00:29 +0200)]
Unnecessary newline removed, small improvements in text

17 months agoAdd info about Doctrine not using constructor
Jarek Jakubowski [Fri, 8 Jun 2018 18:29:37 +0000 (20:29 +0200)]
Add info about Doctrine not using constructor

17 months agoMention that Doctrine does not use Entities public API
Jarek Jakubowski [Fri, 8 Jun 2018 16:47:39 +0000 (18:47 +0200)]
Mention that Doctrine does not use Entities public API

17 months agoFix default value of one-to-many order-by to ASC, #7141
Donovan Bourlard [Thu, 22 Mar 2018 13:51:02 +0000 (14:51 +0100)]
Fix default value of one-to-many order-by to ASC, #7141

17 months agoFix handling entities with post generated IDs as FK
Nicolas FRANÇOIS [Mon, 22 Jan 2018 18:10:42 +0000 (19:10 +0100)]
Fix handling entities with post generated IDs as FK

This prevents a throw in UnitOfWork#addToIdentityMap because some fields
are null.

17 months agoFix mock creation
Guilherme Blanco [Mon, 17 Jun 2019 22:56:33 +0000 (00:56 +0200)]
Fix mock creation

17 months agoRemove duplicated tag from PHPUnit config
Luís Cobucci [Mon, 17 Jun 2019 23:25:30 +0000 (01:25 +0200)]
Remove duplicated tag from PHPUnit config

17 months agoRemove useless nested switch case
Luís Cobucci [Mon, 17 Jun 2019 23:09:06 +0000 (01:09 +0200)]
Remove useless nested switch case

This is simpler and doesn't make PHPCS go crazy when trying to indent
things properly.