Thomas Ploch
ec3eed68ca
Minor coding style fixes and more docblock removal
2017-08-15 10:17:20 +02:00
Thomas Ploch
b7ae5b4afb
Entity listeners are now processed by exporters
...
The current implementation of the exporters are not taking the entity
listeners into account. I have added test cases for most of the edge
cases I could think of and implemented the Exporter handling.
This PR originates from https://github.com/doctrine/doctrine2/pull/5864 ,
I was overwhelmed by the amount of conflicts I had to resolve so I
started anew on a clean master HEAD.
Squashed commits:
- Code review aftermath
- Add even more return type declarations
- Added `return null` to methods declared with nullable return types
- Removed unneeded docblocks when types are self-explanatory
2017-08-15 10:08:50 +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
a0c0d3bf2a
Revert "Merge branch 'fix/#6499-#6533-fix-commit-order-calculation-consider-all-join-column-fields'"
...
This reverts commit 2a58645cb5870f0ab61e918c7165c248d225dbac, reversing
changes made to 6d428c90e24c914c1e5d817d74646f3b94757c43.
2017-08-11 22:29:45 +02:00
Marco Pivetta
2a58645cb5
Merge branch 'fix/#6499-#6533-fix-commit-order-calculation-consider-all-join-column-fields'
...
Close #6499
Close #6533
2017-08-11 22:17:02 +02:00
Marco Pivetta
1ede3c514f
#6499 #6533 simplifying nullable column check - null coalesce operator makes it *SOMEWHAT* more readable (no miracles)
2017-08-11 22:13:20 +02:00
Marco Pivetta
166c5816b6
#6499 #6533 calibrating test so that the association is populated after persistence in some edge cases
2017-08-11 22:10:02 +02:00
Marco Pivetta
25829ea450
#6499 #6533 simplifying test scenario to the bone, adding description of what happened at persistence-level
2017-08-11 22:05:00 +02:00
Marco Pivetta
ebd521c56e
#6499 #6533 minor CS fixes in the test
2017-08-11 21:55:02 +02:00
Marco Pivetta
b352cd3e22
#6499 #6533 minor CS fixes in the test
2017-08-11 21:54:30 +02:00
Gabe van der Weijde
da3cd04993
-- Transformed into a minimal example.
...
-- Processed Ocramius' feedback.
2017-08-11 21:51:17 +02:00
Gabe van der Weijde
db2530d6fd
-- Proposed fix due to logic error.
2017-08-11 21:51:17 +02:00
Gabe van der Weijde
16a14f2238
-- Created test for validation issue #6499 .
2017-08-11 21:51:17 +02:00
Marco Pivetta
6d428c90e2
Merge branch 'fix/#6464-#6475-correct-SQL-generated-with-JTI-and-WITH-condition'
...
Close #6464
Close #6475
2017-08-11 21:45:34 +02:00
Marco Pivetta
9ad91ddc1c
#6464 #6475 using PHP 7.1 void
and string
return hints where available
2017-08-11 21:45:23 +02:00
Marco Pivetta
91a5091612
#6464 #6475 cleaning up test - removed invalid fetch join, CS
2017-08-11 21:39:13 +02:00
Stefan Siegl
025ed1147b
#6464 code review updates
2017-08-11 21:36:33 +02:00
Stefan Siegl
99fdbf550d
generate nested join sql for CTIs, closes #6464
2017-08-11 21:36:33 +02:00
Stefan Siegl
55882ca7a6
#6464 add test
2017-08-11 21:36:33 +02:00
Marco Pivetta
633c8461c8
Merge branch 'fix/#6614-clean-modified-collection-causing-double-dirty-object-persistence'
...
Close #6613
Close #6614
Close #6616
2017-08-11 21:29:16 +02:00
Marco Pivetta
352b3ba6f6
#6613 #6614 #6616 adding void
return type to newly introduced test methods
2017-08-11 21:28:18 +02:00
Marco Pivetta
c2dd274c42
#6613 #6614 #6616 adding void
return type
2017-08-11 21:27:09 +02:00
Marco Pivetta
004ac51869
#6613 #6614 #6616 minor performance optimisations around the new restoreNewObjectsInDirtyCollection
implementation
2017-08-11 21:14:05 +02:00
Marco Pivetta
3579997531
#6613 #6614 #6616 removing DDC6613 test, which was fully ported to unit tests
2017-08-11 21:11:31 +02:00
Marco Pivetta
a2ca6bbfaf
#6613 #6614 #6616 ensuring that the collection is marked as non-dirty if all new items are contained in the initialized ones
2017-08-11 21:09:34 +02:00
Andreas Braun
1174ec6e8a
Add failing test for dirty flag
2017-08-11 20:39:03 +02:00
Marco Pivetta
b064fe3d86
#6613 #6614 #6616 removing repeated PersistentCollectionTest
chunks of code
2017-08-11 19:08:24 +02:00
Marco Pivetta
93c4064679
#6613 #6614 #6616 initializing a dirty collection that has new items that are also coming from initialization data de-duplicates new and persisted items
2017-08-11 19:02:39 +02:00
Marco Pivetta
04a5b122b0
#6613 #6614 #6616 moved integration test basics to a unit test that verifies basic dirty collection initialization semantics
2017-08-11 18:58:05 +02:00
Marco Pivetta
345cf1acf8
#6613 #6614 correcting broken test that isn't using objects against a PersistentCollection
2017-08-11 15:15:57 +02:00
Marco Pivetta
031e79e726
#6613 #6614 correcting broken test that isn't using objects against a PersistentCollection
2017-08-11 15:14:42 +02:00
Marco Pivetta
d44e6e1a9e
#6613 #6614 ensuring that only newly added items that weren't loaded are restored in the dirty state of the collection
2017-08-11 15:13:39 +02:00
Marco Pivetta
1fc7f81741
#6613 #6614 after initialization, the collection should be dirty anyway
2017-08-11 14:47:51 +02:00
Marco Pivetta
5e2257db04
#6613 #6614 adding assertions about collection initialization and dirty status
2017-08-11 14:46:11 +02:00
Marco Pivetta
d2c9b22397
#6613 #6614 removing IDE-generated header
2017-08-11 14:44:28 +02:00
Marco Pivetta
8c4b5a4b71
#6613 #6614 removing phone/user specifics, using ORM naming for associations
2017-08-11 14:44:04 +02:00
Marco Pivetta
80f12ed490
#6613 #6614 correcting column mapping (was integer
, should be string
), segregating phone creation away
2017-08-11 14:41:32 +02:00
Marco Pivetta
a4e547b691
#6613 #6614 remove superfluous mappings
2017-08-11 14:34:35 +02:00
Marco Pivetta
eca1d6b3ea
#6613 #6614 rewrote test logic to be less magic-constant-dependent
2017-08-11 14:27:34 +02:00
Marco Pivetta
c195064ba4
#6613 #6614 CS - applying @group
annotation to the test
2017-08-11 14:23:21 +02:00
Marco Pivetta
625f792290
#6613 #6614 removing dedicated DDC6613 model directory
2017-08-11 14:22:31 +02:00
Marco Pivetta
112a402016
#6613 #6614 smashing entity definitions into the test
2017-08-11 14:21:56 +02:00
Marco Pivetta
0a1a84163e
#6613 #6614 better test specification - removing useless assertions
2017-08-11 14:20:07 +02:00
Marco Pivetta
594e60d3f7
#6613 #6614 simplifying entity definition - using auto-assigned string identifiers to reduce moving parts
2017-08-11 14:19:01 +02:00
Uladzimir Struts
874d60d8c7
It added the unit test #6613
2017-08-11 13:46:21 +03:00
Marco Pivetta
bbe005837e
Merge pull request #6607 from lcobucci/be-strict-with-risky-tests
...
Be strict with risky tests
2017-08-06 14:40:16 +02:00
Luís Cobucci
b960170fe1
Move test to the right place and add assertions
...
That test was removed from "performance" group but we forgot to move it
to the correct namespace.
It was also not doing any assertion, which is quite bad.
More info:
- https://github.com/doctrine/doctrine2/issues/3333
2017-08-06 12:51:58 +02:00
Luís Cobucci
27300bf4af
Make PHPUnit strict about risky tests
2017-08-06 12:51:16 +02:00
Luís Cobucci
aa13e49fdf
Merge pull request #6606 from lcobucci/add-exception-msg
...
Add message to NonUniqueResultException
2017-08-06 12:28:58 +02:00
Jean Carlo Machado
c2167664fc
add test of NonUniqueResultException message presence
2017-08-06 12:08:57 +02:00