1
0
mirror of synced 2025-02-02 21:41:45 +03:00

11197 Commits

Author SHA1 Message Date
Marco Pivetta
87ee409783
Merge pull request #7082 from mariusklocke/issue-7062
Add failing test for issue #7062
2018-02-27 08:30:56 +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
Marius Klocke
b952dac339
Add a failing test for issue 7062 2018-02-26 14:39:05 +01:00
Luís Cobucci
ffb7d4c79c
Merge pull request #7093 from lcobucci/patch-association-identifier-not-quoted
Fix updating entities with quoted identifier association
2018-02-25 20:28:33 +01:00
Jan Langer
e68717b725
Fix updating entities with quoted identifier association 2018-02-25 20:10:18 +01:00
Luís Cobucci
30a063ef9d
Merge pull request #6701 from vhenzl/pr/issue-6531-test
Add failing tests for #6531 

Fixes https://github.com/doctrine/doctrine2/issues/6043
Fixes https://github.com/doctrine/doctrine2/issues/6531
Fixes https://github.com/doctrine/doctrine2/issues/7002
Fixes https://github.com/doctrine/doctrine2/pull/7003
2018-02-19 23:17:19 +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
Vašek Henzl
23f4f03575
Add failing tests for #6531
Tests are based on examples from "Composite and Foreign Keys as Primary Key" tutorial:
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/composite-primary-keys.html
2018-02-19 22:14:57 +01:00
Luís Cobucci
a912fc09be
Add @group to delete query test 2018-02-19 22:04:28 +01:00
Marco Pivetta
a736a3713b
Merge pull request #6988 from kbond/inheritance-issue
Inheritance middle-layer doesn't get hydrated
2018-02-19 12:13:08 +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
Kevin Bond
15a4302902
Inheritance middle-layer doesn't get hydrated with HYDRATE_OBJECT 2018-02-19 12:07:41 +01:00
Marco Pivetta
1f82a20312
Merge pull request #7077 from lcobucci/fix-delete-bc-break
Fix BC-break on delete without alias DQL
2018-02-19 11:32:46 +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
Carnage
ae6d80daab
Adds sql generation test 2018-02-19 00:50:27 +01:00
Luís Cobucci
44e82e2720
Remove unused functions 2018-02-17 19:49:16 +01:00
Luís Cobucci
e94467d6da
Fix incorrect value in L2C+lock test
Which was causing the optimistic lock to fail in MySQL since it was
trying to update the data with exact same value.
2018-02-17 19:46:22 +01:00
Luís Cobucci
794c7708e8
Merge branch 'backport/fix/l2c-version' into 2.6
Backporting https://github.com/doctrine/doctrine2/pull/7069
2018-02-17 18:09:39 +01:00
‘Andrey Lukin’
8e73926359
Add version fields into L2C data 2018-02-17 18:05:32 +01:00
‘Andrey Lukin’
8fc1d74820
Add test for L2C using optimistic locks
As explained in #7067, fields with `@ORM\Version` annotation were not
being added to L2C cached data.
2018-02-17 18:05:27 +01:00
Luís Cobucci
496c6a9f03
Merge branch 'backport/fix-date-issues-once-and-for-all' into 2.6
Backporting https://github.com/doctrine/doctrine2/pull/7055
2018-02-09 17:21:29 +01:00
Luís Cobucci
7873f700b0
Add missing tests for day calculation
For the DATE_SUB() and DATE_ADD() functions.
2018-02-09 17:21:06 +01:00
Luís Cobucci
46c0861f45
Fix date calculation in tests (again)
Now using PHP to calculate the expected date manipulation, keeping a day
as delta since PHP resets the hour when performing operations with
days/weeks/months/years.

February is a wonderful month, isn't it?
2018-02-09 17:21:06 +01:00
Luís Cobucci
5149c0ff25
Merge branch 'backport/fix/7031-tests-february' into 2.6
Backporting: https://github.com/doctrine/doctrine2/pull/7032
2018-02-02 09:07:25 +01:00
Michael Moravec
cf99d62472
QueryDqlFunctionTest: Increase delta for testDateAdd() to work in February 2018-02-02 08:59:35 +01:00
Luís Cobucci
5878797eae
Merge pull request #6971 from rolando-caldas/master
Exception Call to undefined method Doctrine\Common\Cache\MemcachedCache::setMemcache()
2018-01-30 01:53:35 +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
3f772eac32
Merge pull request #7021 from lcobucci/fix-phpstan-check
Fix incorrect variable reference
2018-01-30 01:38:21 +01:00
Luís Cobucci
62c952d258
Fix wrong variable reference 2018-01-30 01:21:34 +01:00
Luís Cobucci
c2f698e56e
Merge pull request #6997 from NicolaF/fix/fix-6991-2.6
ManyToManyPersister fails to remove join table entry if there is multiple join columns
2018-01-30 01:19:12 +01:00
Nicolas FRANÇOIS
40f2a3efba
Add test case for many-to-many collection deletion, when owning side has a composite PK 2018-01-30 01:04:28 +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
d752cafb47
Merge pull request #6911 from lcobucci/bump-dependencies
Require more up-to-date dependencies
2017-12-20 00:19:31 +01:00
Luís Cobucci
0e44271a40
Require more up-to-date dependencies 2017-12-20 00:10:05 +01:00
Marco Pivetta
4c89498359
Merge branch 'feature/#6767-allow-association-as-JTI-identifier'
Close #6767
2017-12-19 18:02:48 +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
Luís Cobucci
b210c1e364
Merge pull request #6905 from Majkl578/setup-cache-7.1-compat
Setup: Switch Apc -> Apcu and Memcache -> Memcached
2017-12-19 08:21:02 +01:00
Guilherme Blanco
a16dc65cd2 Fixes #1391, DDC-3693 2017-12-18 22:46:48 -05:00
Guilherme Blanco
0345f7b836
Merge pull request #1578 from StoshSeb/patch-1
Fixed DDC-3740
2017-12-18 22:41:18 -05:00
Michael Moravec
349724f05b
Setup: Switch Apc -> Apcu and Memcache -> Memcached 2017-12-19 02:43:03 +01:00
Michael Moravec
e1825e37ef
Merge pull request #6780 from aequasi/patch-1
getRepository actually returns ObjectRepository
2017-12-18 00:40:47 +01:00
Luís Cobucci
cfa1dfbfe6
Merge pull request #6887 from greg0ire/stable_stability
Use stable packages
2017-12-18 00:39:02 +01:00
Grégoire Paris
8e3c3f0bae
Add marker variable for Travis 2017-12-18 00:14:00 +01:00