1
0
mirror of synced 2025-02-02 13:31:45 +03:00

3832 Commits

Author SHA1 Message Date
Marco Pivetta
23af164d7a 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.
2018-12-16 18:05:02 +01:00
Konstantin Litvinov
ee64d31f48 7518 Fixed PHPDoc Error. 2018-12-12 17:08:35 +03:00
Luís Cobucci
505ec21f97
Bump up development version 2018-11-21 01:24:06 +01:00
Luís Cobucci
434820973c
Bump up version 2018-11-21 00:46:46 +01:00
Tobias Schultze
ee8dc496d9
Fix applying collation on foreign key columns 2018-11-21 00:20:15 +01:00
Alex Denvir
72121c01ec
[XML] Fix default value of many-to-many order-by to ASC 2018-11-20 12:33:29 +01:00
Luís Cobucci
ac505390dd
Merge pull request #7472 from seferov/patch-2
fix incorrect phpdoc typehint
2018-11-20 09:41:01 +01:00
Luís Cobucci
728e6e15c5
Merge pull request #7441 from asgrim/fix-getResult-type
$hydrationMode throughout can be a string as well as int (for custom modes)
2018-11-20 09:40:04 +01:00
Andreas Braun
0552749059
Fix parameter value processing for objects with unloaded metadata 2018-11-15 11:21:05 +01:00
Farhad Safarov
fbd3fe95e4
fix incorrect phpdoc typehint 2018-11-13 13:01:10 +03:00
James Titcumb
c6d02daee0
$hydrationMode throughout can be a string as well as int (for custom modes) 2018-11-12 13:58:42 +00:00
Luís Cobucci
d93956eff0
Use HTTPS endpoint for XML schema location 2018-11-12 11:29:32 +01:00
Michael Moravec
1d71fbf77b
Merge pull request #7367 from timdev/fix/entitymanager-find-with-optimistic-lock-no-need-tx
Fix for BC break in 2.6.2 when calling EM::find() with LockMode::OPTIMISTIC outside of a TX
2018-09-23 06:43:26 +02:00
Michael Moravec
46f2a41cf7
Merge pull request #7377 from sserbin/fix-query-andx-doctype
Fix query andX doctype
2018-09-23 06:37:42 +02:00
Michael Moravec
fd2baf6f65
Merge pull request #7260 from stof/regression_commit_order
Fix the handling of circular references in the commit order calculator
2018-09-23 05:44:14 +02:00
Tim Lieberman
3acfa50214
Fix for BC break #7366 when calling EM::find() with LockMode::OPTIMISTIC outside of a TX 2018-09-23 05:33:05 +02:00
sserbin
3dbe205498
Query\Expr::andX(): added string as allowed parameter type 2018-09-23 05:23:49 +02:00
philippe-unitiz
d3acbbf79b
Fix constructor argument type in Query\Base 2018-09-23 05:02:30 +02:00
philippe-unitiz
cb9ec8234b
Fix multiline parameter phpDoc in Query\Expr
See https://github.com/phan/phan/issues/1897 (parser won't accept `@param` spanning over several lines)
2018-09-23 05:02:01 +02:00
Christophe Coevoet
568c2d308c Fix the computation of commit order for circular dependencies
When finding a circular dependencies, we must ensure that all dependencies
of a node have been visited before adding it to the sorted list.
2018-09-20 12:13:25 +02:00
Pierre-Louis FORT
32efbd3edd Handle removed parameters by tree walker in Paginator 2018-08-27 11:23:21 +02:00
Luís Cobucci
7b64b4a207
Document getPartialReference() properly
According to the current implementation that method also returns `null`,
however the interface's documentation was incorrect.

Ref: https://github.com/doctrine/doctrine2/blob/v2.6.2/lib/Doctrine/ORM/EntityManager.php#L514-L516
2018-08-18 14:52:17 +02:00
Cyril PASCAL
07fc401d25
Make code php 7.3 lint-compatible 2018-07-26 14:32:52 +02:00
Michael Moravec
f4b775323d
Fix remaining usages of deprecated ClassLoader and Inflector from doctrine/common 2018-07-13 05:31:39 +02:00
Michael Moravec
43d308116d
Bump version to 2.6.3-DEV 2018-07-12 23:24:26 +02:00
Michael Moravec
d2b4dd71d2
Preparing v2.6.2 release 2018-07-12 22:47:13 +02:00
Michael Moravec
e26158a45e
Fix #7286: StringPrimary no longer accepts aggregate functions as argument 2018-07-09 19:12:39 +02:00
Michael Kühn
ff68806bfa
Fix for #7068: EntityManager::find() with pessimistic lock should check for transaction 2018-07-03 03:00:58 +02:00
Michael Moravec
6d81d519b6
Use non-deprecated version of Lexer and Inflector 2018-06-25 14:20:52 +02:00
Marco Pivetta
01f89a8cdc
Merge pull request #7190 from Tobion/patch-1
Fix wrong type in phpdoc of AbstractIdGenerator
2018-04-13 16:29:25 +01:00
Tobias Schultze
7ba0290643
entity should be nullable as in master 2018-04-10 19:15:48 +02:00
Tobias Schultze
8ceb47178b
Fix wrong type in phpdoc of AbstractIdGenerator
\Doctrine\ORM\Mapping\Entity is the annotation class which is not correct. The entity object itself is meant here as tests also assume see https://github.com/doctrine/doctrine2/blob/2.6/tests/Doctrine/Tests/ORM/Id/AssignedGeneratorTest.php#L28

Found this when running phpstan on our code that used a custom generator.
2018-04-10 18:31:36 +02:00
Donovan Bourlard
2560d4f419 Fix default value of one-to-many order-by to ASC, #7141 2018-03-22 14:51:02 +01:00
Luís Cobucci
d47c1f3e9b
Fix basic entity persister type resolver
Which was using the wrong way to fetch the field type and using the
association type instead of the column type.
2018-02-26 14:39:06 +01:00
Jan Langer
e68717b725
Fix updating entities with quoted identifier association 2018-02-25 20:10:18 +01:00
Nicolas FRANÇOIS
35c3669ebc
Fix handling entities with post generated IDs as FK
This prevents a throw in UnitOfWork#addToIdentityMap because some fields
are null.
2018-02-19 23:05:13 +01:00
Luís Cobucci
f2da5bc93e
Extract private method to retrieve discriminator values 2018-02-19 12:07:44 +01:00
Luís Cobucci
2905b435db
Remove loose comparison on discriminator values
According to mapping drivers the discriminator values can always be
converted to strings so it's safe to assume that we can actually do a
strict comparison during hydration.
2018-02-19 12:07:43 +01:00
Toni Cornelissen
48ca6dbcec
Use partial discriminator map on multi-inheritance
Hydrator was ignoring data from subclasses when using multiple
inheritance levels. With this patch it will now use the discriminator
values from all subclasses of the class being hydrated.
2018-02-19 12:07:42 +01:00
Luís Cobucci
fc943b70f6
Use early-returns to improve readability of the Parser 2018-02-19 00:53:42 +01:00
Luís Cobucci
f36470941c
Fix BC-break on delete queries with nasty workaround
The `v2.5.x` series of the ORM allowed to have DELETE DQLs without using
an alias, even though it didn't follow the grammar rules of the parser.
We fixed that issue on `v2.6.0` however that was a BC-breaking change
and lots of people were relying on this faulty behaviour.

This workaround fixes the BC-break, without even trying to be elegant.
In `v2.7.0.` we should raise a deprecation notice to notify people that
we'll drop that "feature" in `v3.0`.
2018-02-19 00:53:36 +01:00
‘Andrey Lukin’
8e73926359
Add version fields into L2C data 2018-02-17 18:05:32 +01:00
Rolando Caldas
8c2d090dc8
Exception Call to undefined method Doctrine\Common\Cache\MemcachedCache::setMemcache()
When memcached extension is loaded Doctrine\ORM\Tools\Setup.php  calls to setMemcache method. The MemcachedCache class has the setMemcached method instead. Changed this call in Setup to setMemcached and $memcache to $memcached to keep the name like the extension
2018-01-30 01:38:56 +01:00
Luís Cobucci
62c952d258
Fix wrong variable reference 2018-01-30 01:21:34 +01:00
Nicolas FRANÇOIS
333b9c0b99 Fix #6991: correctly resolve identifer values in ManyToManyPersister 2018-01-19 12:19:02 +01:00
Luís Cobucci
90d19b4131
Bumping development version to v2.6.1-DEV 2017-12-20 02:01:05 +01:00
Luís Cobucci
374e7ace49
Preparing v2.6.0 release 2017-12-20 01:38:15 +01:00
Marco Pivetta
b6aa4bab15
#6767 using in_array rather than array_search
Ref: https://github.com/doctrine/doctrine2/pull/6767/files#r157355050
2017-12-19 18:01:38 +01:00
Marco Pivetta
27c42d418b
#6767 removed unused variable
Ref: https://github.com/doctrine/doctrine2/pull/6767/files#r157354726
2017-12-19 18:00:03 +01:00
Tyler Romeo
bb8970286d
Allow association mappings as IDs for joined-table inherited entity
SchemaTool has custom logic for creating the primary key of a
joined-table inherited entity. This logic overlooked association maps
as a possible source for identity columns, resulting in a fatal error
when fetching the primary key list for child entities.

Removed any custom logic for generating primary keys for root entities
in joined-table inheritance, deferring to the common logic used for
other entities.

Also adjusted the child entity logic, scanning association maps for
identity columns, and including the column as appropriate. It also
ensures that the primary key columns are in the correct order.
2017-12-19 17:58:31 +01:00