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

278 Commits

Author SHA1 Message Date
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
74ce8913fc
Upgrade phpstan to 0.9
Applying the necessary fixes.
2017-12-17 00:55:50 +01:00
Marco Pivetta
44f2e22f14
#6303 #6304 documenting why collisions in field name hydration in STI/JTI require additional information and checks in the hydration process 2017-08-19 18:30:33 +02:00
Marco Pivetta
c503b81421
#6303 #6304 removing += operator usage on arrays (scary\!), CS (alignment) 2017-08-19 16:02:30 +02:00
Marco Pivetta
7e7921e32f
#6303 #6304 documenting why the loose comparison is required 2017-08-19 15:58:50 +02:00
fullbl
8cc29e84a0
Update AbstractHydrator.php
revert strict comparison in hydration (fails on some dates)
2017-08-19 15:56:59 +02:00
Full
db9c12f1af
comparison on discriminator value with !== 2017-08-19 15:56:59 +02:00
Full
4c7286f57b
removed trailing spaces 2017-08-19 15:56:59 +02:00
Full
0b8e468f06
fix wrong pharenthesis 2017-08-19 15:56:59 +02:00
Full
bf06b7dbbc
check if array is set before assigning 2017-08-19 15:56:59 +02:00
Full
ad3b9de4b8
use dataMap also in first test function 2017-08-19 15:56:59 +02:00
Full
6d40859228
added tests on empty values 2017-08-19 15:56:59 +02:00
Marco Pivetta
ff3c89d8b1
#6623 minor code cleanups (removing useless assignments, array callback syntax) 2017-08-16 15:10:27 +02:00
Nikolas Tsiongas
f0ed4e87b5 fix AbstractHydrator addEventListener on hydrateAll()
# Conflicts:
#	tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3146Test.php
2017-08-14 00:45:50 +02:00
Marco Pivetta
aba486ea2d
#1515 removing redundant assignment, short array notation 2017-06-24 03:27:12 +02:00
Emiel Nijpels
9eb2d6139e
DDC-3146 remove event listener from event listener in abstract hydrator in cleanup function 2017-06-24 03:22:12 +02:00
Artem Stepin
43009682a4 minor code work:
- method calls with incorrect case
- removed unused imports
- typos and some other minor code smells
- documentation update (wrong return types etc. )
2017-06-08 22:04:07 +02:00
Timothy Clissold
0a10f347d3
Fix inheritance join alias 2017-05-02 00:17:16 +02:00
Luís Cobucci
234989d069
Use short-array syntax on "lib" directory 2016-12-08 00:31:12 +01:00
Luís Cobucci
1b39cd87ad
Allow using objects as discriminators 2016-11-23 18:56:36 +01:00
Carl Vuorinen
00bbf4f523 Use yoda condition in the null check 2016-09-08 13:37:00 +02:00
Carl Vuorinen
95546d68c5 Fix hydration in a joined inheritance with simple array or json array
SimpleArrayType and JsonArrayType convert NULL value to an empty array, which fails the null check that is used to prevent overwrite
Fixes issue #5989
2016-09-08 13:37:00 +02:00
Marco Pivetta
140960ebb1 #5975 short array syntax 2016-09-07 23:17:40 +02:00
John Keller
3bec698fed add functional test and bug fix for issue #5762 2016-09-07 23:15:00 +02:00
ReenExe
015ec444c5 use PHP common functions 2016-07-01 01:17:25 +03:00
Mikhail Shamin
bf322b903d Optimize imports. Remove full qualified class names 2016-05-11 01:55:12 +07:00
Jeroen Thora
6dcb97a20e Fixed many small phpcs issues 2015-12-11 20:30:41 +01:00
Guilherme Blanco
3c3b7364ba Hotfix for missing reverse dependency in case of non-implicit change tracking policies 2015-12-01 20:24:16 +00:00
Guilherme Blanco
8ea62b95b8 Tests around reported cases over DDC-2524 2015-11-27 18:44:23 +00:00
Guilherme Blanco
843966ac50 General fixes across CS, type resolving, test fixes, etc 2015-11-07 03:55:05 +00:00
Thomas Häber
d92785811b Added PHPDoc return type false of next method
Because hydrateRow can return false, too. The PHPDoc return type of the next method has return false in addition to array.
2015-05-15 12:06:56 +02:00
Marco Pivetta
2a81adc1fc Correcting ObjectHydrator logic: if an array is a default value for a collection-valued property, it should be cast to a Collection 2015-04-03 15:28:53 +01:00
Jeroen Thora
a409e7591d Changed some wrong usage of the @internal phpdoc 2015-03-15 16:53:34 +01:00
Marco Pivetta
6fc0d84b7a DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
Guilherme Blanco
de4723883f Merge pull request #1171 from jaimz22/master
Improvements for complex select statements when using new object expression
2015-01-12 22:48:56 -05:00
Marco Pivetta
f571a9ef88 #470 DDC-54 DDC-3005 - query iteration must cause eager hydrationComplete logic to be fired 2015-01-13 01:42:38 +01:00
Marco Pivetta
b1144e74ea #470 DDC-54 DDC-3005 - reverting hydrator changes, as patch DDC-3005 already deals with the issue 2015-01-13 01:09:23 +01:00
Lukasz Cybula
aa4796cd0d Moved postLoad dispatching from UnitOfWork to object hydrators 2015-01-13 01:03:48 +01:00
Marco Pivetta
d09280a1dc #1001 DDC-3005 - HydrationCompleteHandler cs fixes (line-wrap) 2015-01-13 00:52:12 +01:00
Marco Pivetta
45221b1951 #1001 DDC-3005 - removed HydrationCompleteHandler#invokeAllDeferredPostLoadEvents() (useless method call indirection) 2015-01-13 00:51:44 +01:00
Marco Pivetta
c9ccd91421 #1001 DDC-3005 - optimized HydrationCompleteHandler imports 2015-01-13 00:50:19 +01:00
Marco Pivetta
730c2a81f7 #1001 DDC-3005 - HydrationCompleteHandler static introspection cleanups, as well as memory and performance improvements 2015-01-13 00:50:05 +01:00
Marco Pivetta
7b81cfb6ea #1001 DDC-3005 - Minor CS fixes in HydrationCompleteHandler 2015-01-13 00:33:15 +01:00
Marco Pivetta
89530f88f7 #1001 DDC-3005 - Removing dead assignment HydrationCompleteHandler#__construct() 2015-01-13 00:32:10 +01:00
Marco Pivetta
516d04c391 #1001 DDC-3005 - Removing useless dependency from the HydrationCompleteHandler to the UnitOfWork 2015-01-13 00:31:32 +01:00
Marco Pivetta
af93539576 #1001 DDC-3005 - HydrationCompleteHandler should accept EntityManagerInterface instances 2015-01-13 00:06:07 +01:00
Strate
0c8a31bf2b DDC-3005. Revert empty line. Removed @since annotation 2015-01-12 22:34:24 +01:00
Strate
35ea399d33 DDC-3005 Defer invoking of postLoad event to the end of hydration cycle.
1. Refactor handling of hydration complete: delegate this task to special object
2. Write test case for situation, when inside postLoad listener other entity is loading.
3. Make test, written on second step, be able to pass :)
2015-01-12 22:34:24 +01:00