Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support composite & non-identifier generated values #6684

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
9952131
Moved Discriminator Column to OO approach and refactored a bit for pe…
guilhermeblanco Jun 8, 2016
1747acb
Finalized changes to ensure everything breaking now is due to quoting…
guilhermeblanco Jun 9, 2016
ad96156
Removed isVersioned property.
guilhermeblanco Jun 10, 2016
7656296
Switched versionField to versionProperty
guilhermeblanco Jun 10, 2016
dadb0ee
Removed the need for FielMetadata::$currentClass property
guilhermeblanco Jun 12, 2016
0a76215
Cosmetic
guilhermeblanco Jun 12, 2016
2b838c3
Cosmetic
guilhermeblanco Jun 12, 2016
b5b9ea7
Removed isCascadeXXX
guilhermeblanco Jul 4, 2016
a50a3f4
Breaking everything with start migration to use ClassMetadataBuilder …
guilhermeblanco Jul 5, 2016
0296ed1
More work related to ClassMetadataBuilder changes and some fixes to b…
guilhermeblanco Jul 8, 2016
a78db23
Fixes to bugs and made test more consistent
guilhermeblanco Jul 9, 2016
28ea7c7
Fixes and implemented incomplete tests
guilhermeblanco Jul 11, 2016
8aa78e8
Fix for test
guilhermeblanco Jul 11, 2016
2382e49
Removed some methods from QuoteStrategy (beginning of the end of quot…
guilhermeblanco Jul 12, 2016
4e95419
Removing Doctrine ORM 1 schema conversion tool.
lcobucci Jul 12, 2016
e98dd36
Removing YAML class metadata exporter and its references.
lcobucci Jul 12, 2016
dac8373
Removing YAML drivers and all its references.
lcobucci Jul 12, 2016
b3c115f
Removing YAML mappings on docblocks and messages.
lcobucci Jul 12, 2016
b92c7a9
Adding YAML removal as BC break.
lcobucci Jul 12, 2016
f91a62b
s/should/**MUST** as per @afoeder's review
Ocramius Jul 13, 2016
7ff9857
More work around JoinColumns. Should start AssociationMetadata change…
guilhermeblanco Jul 20, 2016
fa9d0b8
Introduced JoinColumnMetadata and refactored most tests. Still 14 fai…
guilhermeblanco Aug 11, 2016
3ff0afc
Starting the concept of Builders on Drivers
guilhermeblanco Aug 26, 2016
9314d0e
Fixing remaining possible to be fixed unit tests
guilhermeblanco Aug 27, 2016
252b0fe
Strict types
guilhermeblanco Aug 27, 2016
db6c704
Merged sequenceGeneratorDefinition and customGeneratorDefinition into…
guilhermeblanco Aug 30, 2016
a843991
Checks for references, proxies and retrievals on EM. Removed todo fro…
guilhermeblanco Aug 30, 2016
f9ad31a
Simplified property inheritance logic when loading class metadata
guilhermeblanco Aug 30, 2016
96b90a5
Moved FieldMetadata creation out of ClassMetadata
guilhermeblanco Sep 7, 2016
f15be6c
Allow unique index creation from ORM mapping
guilhermeblanco Sep 14, 2016
ea00551
Decoupled unique constraint from unique index
guilhermeblanco Sep 22, 2016
24c29f6
Introduced concept of TableMetadata. Still a few tests to finish fixing
guilhermeblanco Oct 4, 2016
603161d
Finalized TableMetadata implementation
guilhermeblanco Oct 5, 2016
310a90e
Removed QuoteStrategy::getTableName()
guilhermeblanco Oct 6, 2016
70437f5
Implemented JoinTableMetadata
guilhermeblanco Oct 8, 2016
1a42e00
Removed support for joinColumnFieldNames
guilhermeblanco Oct 13, 2016
96f4dd6
Removed most of targetToSourceKeyColumns usages
guilhermeblanco Oct 21, 2016
5e52987
Eliminated targetToSourceKeyColumns from association mapping
guilhermeblanco Oct 21, 2016
1765c2c
Eliminated sourceToTargetKeyColumns from association mapping
guilhermeblanco Oct 21, 2016
cafddb2
Removed relationToTargetKeyColumns and relationToSourceKeyColumns fro…
guilhermeblanco Oct 22, 2016
df5cd6a
Removed ClassMetadata::FETCH_* constants and created FetchMode::*
guilhermeblanco Oct 22, 2016
337e418
Removed ClassMetadata::CACHE_USAGE_* constants and created CacheUsage::*
guilhermeblanco Oct 22, 2016
3658d24
Removed ClassMetadata::INHERITANCE_TYPE_* constants and created Inher…
guilhermeblanco Oct 22, 2016
f489f75
Removed ClassMetadata::CHANGETRACKING_* constants and created ChangeT…
guilhermeblanco Oct 22, 2016
8e7548b
Removed ClassMetadata::GENERATOR_TYPE_* constants and created Generat…
guilhermeblanco Oct 23, 2016
6299fb2
Removed code duplication of helper methods, inlining calls.
guilhermeblanco Oct 23, 2016
2a9a3b4
More optimizations and cleanup
guilhermeblanco Oct 23, 2016
1168316
EntityManager::transactional() returns value returned by the closure
enumag Nov 24, 2016
a4330b0
EntityManager::transactional() uses callable type-hint
enumag Nov 24, 2016
b432b16
EntityManager::transactional() catches Throwable
enumag Nov 24, 2016
f81f0db
Refactor EntityManagerTest
enumag Nov 24, 2016
0d1b0b4
EntityManager::transactional() doesn't use call_user_func
enumag Nov 24, 2016
916cb23
Fix typehints in EntityManagerInterface implementations
enumag Nov 24, 2016
96a95bb
Required development version of DBAL
lcobucci Dec 9, 2016
0978742
Use objects instead of arrays for join tables and columns
lcobucci Dec 9, 2016
8bce135
Fixed DDC-536 (GH #5044). Remove the _ prefix from private and protec…
guilhermeblanco Jan 10, 2017
d5c6f75
Fixes #5855. Removed ability to EntityManager::clear($entityName), cl…
guilhermeblanco Jan 10, 2017
3d03fd3
Optimizations improvement over clear()
guilhermeblanco Jan 12, 2017
defa6a4
Introduced CacheMetadata
guilhermeblanco Jan 13, 2017
13d6d9c
Renamed ClassMetadata->enableCache to ClasMetadata->setCache
guilhermeblanco Jan 14, 2017
0c00994
Improvement over last commit
guilhermeblanco Jan 14, 2017
f66e65a
CacheMetadata is now immutable
guilhermeblanco Jan 14, 2017
d40e103
Removed ClassMetadata->containsForeignIdentifier
guilhermeblanco Jan 14, 2017
361ad07
Added foreign key columns to the maps of columns to property names.
guilhermeblanco Jan 17, 2017
182c56f
PHPUnit 6 WIP
guilhermeblanco Feb 7, 2017
ce41dda
Fixed issue with EntityManagerDecoratorTest
guilhermeblanco Feb 7, 2017
d56ff0c
Fixed remaining bits of rebase
guilhermeblanco Feb 9, 2017
6a59bb4
Small code optimization
guilhermeblanco Feb 11, 2017
cb4a556
Adios SimpleAnnotationReader!
guilhermeblanco Feb 14, 2017
75c18bb
Docs update
guilhermeblanco Feb 15, 2017
443a7f3
Introduced AssociationMetadata and its subclasses as classes. \o/
guilhermeblanco Mar 13, 2017
de04217
Introduced AssociationMetadata and its subclasses as classes. \o/
guilhermeblanco Mar 13, 2017
7fa296d
Eliminated mapXToY methods and normalized into only addAssociation
guilhermeblanco Mar 13, 2017
86679b7
Eliminated QuoteStrategy support completely and simplified SQL alias …
guilhermeblanco Mar 13, 2017
9672759
Ignore .iml file
guilhermeblanco Mar 13, 2017
14b2f7d
Removed ClassMetadata::reflFields, delegating the work to Property in…
guilhermeblanco Mar 14, 2017
e5ba446
Fixed DDC2780Test to be compliant with develop branch
guilhermeblanco Mar 15, 2017
6d8f6db
Removed ClassMetadata::getAssociationMapping and ClassMetadata::getAs…
guilhermeblanco Mar 16, 2017
5d04328
Quick optimizations
guilhermeblanco Mar 16, 2017
6c93020
Missing file from previous commit
guilhermeblanco Mar 16, 2017
236088e
Changed isReadOnly to be private and also added wrapper method
guilhermeblanco Mar 16, 2017
a9ab3c6
Quick changes
guilhermeblanco Mar 17, 2017
d824358
Merged associationMappings with properties
guilhermeblanco Mar 21, 2017
524b1f0
Merged addProperty and addAssociation
guilhermeblanco Mar 22, 2017
5bfdaaa
Merged addInheritedProperty and addInheritedAssociation
guilhermeblanco Mar 22, 2017
60f5b90
Merged setAttributeOverride and setAssociationOverride into setProper…
guilhermeblanco Mar 22, 2017
ab73a20
Fixes #6302
guilhermeblanco Mar 22, 2017
6b47f88
Minor optimizations
guilhermeblanco Mar 23, 2017
ea32eb3
More centralization around identifier flattening
guilhermeblanco Mar 23, 2017
138b353
Encapsulated ReflectionClass
guilhermeblanco Mar 24, 2017
c854e94
Encapsulated CacheMetadata from ClassMetadata into ComponentMetadata
guilhermeblanco Mar 24, 2017
2aba869
Ported AbstractClassMetadataFactory from Common to ORM, allowing us t…
guilhermeblanco Mar 24, 2017
458608f
Incorporated LocalColumnMetadata, simplifying runtime memory consumpt…
guilhermeblanco Mar 24, 2017
d8d3537
Added TransientMetadata support, allowing to track properties not dir…
guilhermeblanco Mar 25, 2017
d21a50f
Simplified version field metadata setup. Implemented more exporters
guilhermeblanco Mar 28, 2017
ea4532e
Intermediate work for ClassMetadataFactory refactoring
guilhermeblanco Apr 6, 2017
b5d121d
More work on cleanup
guilhermeblanco Apr 10, 2017
6c228e8
work
guilhermeblanco Apr 18, 2017
bcb967c
More work on MappingFactory. Decoupled ProxyConfiguration. Centralize…
guilhermeblanco Apr 30, 2017
7a9a2a2
Removed isIdentifierComposite flag from ClassMetadata
guilhermeblanco May 6, 2017
5062d75
Quick rename
guilhermeblanco May 8, 2017
a820166
Work on ClassMetadataFactory. Updated ProxyFactory reducing dependencies
guilhermeblanco May 27, 2017
d2e4d77
Refactored Proxy support
guilhermeblanco Jun 19, 2017
4b8af0f
Quick fixes
guilhermeblanco Jun 19, 2017
740afb9
Fix bugs related to rebase
guilhermeblanco Jun 22, 2017
2bab6db
Fixed tetss after rebase
guilhermeblanco Jun 22, 2017
c84a82d
Removed Builders
guilhermeblanco Jun 23, 2017
dde33e2
#6118 removing DDC-720 related tests
Ocramius Jun 21, 2017
51f6532
#6118 removing DDC-720 related tests for multiple flushed entities
Ocramius Jun 21, 2017
6563d77
#6118 remove reference to single entity flush operations
Ocramius Jun 21, 2017
b2aca85
#6118 remove `flush`\($entity\)` signature
Ocramius Jun 21, 2017
2098b9e
#6118 removing `flush\($entity\)` usage from the test suite
Ocramius Jun 21, 2017
b55a484
#6118 removing `UnitOfWork#commit\($entity\)` signature
Ocramius Jun 21, 2017
cf92452
#6118 upgrade notes mentioning the BC break in `EntityManager#flush()`
Ocramius Jun 24, 2017
b1c1992
Quick fix
guilhermeblanco Jun 26, 2017
a743923
Added generation strategy for class metadata
guilhermeblanco Jul 2, 2017
93fb1de
Removed Instantiator from ClassMetadata and concentrate into UnitOfWork
guilhermeblanco Jul 3, 2017
a66935b
Removed sequence methods from class metadata
guilhermeblanco Jul 11, 2017
b20ea29
OrmTestCase: Always use full AnnotationReader, drop legacy versions
Majkl578 Jul 11, 2017
9e4327c
Populate FieldMetadata ID generator
Majkl578 Jul 12, 2017
5e7a677
WIP
Majkl578 Jul 12, 2017
9e0bbb9
Revert "[3.0] Moved IdentifierGenerator to Property."
guilhermeblanco Jul 14, 2017
4f7ec39
Moved IdentifierFlattener temporarily to EntityManager and removed on…
guilhermeblanco Jul 14, 2017
c7a0b9b
Optimizations around EntityPersisters
guilhermeblanco Jul 14, 2017
de96ced
Move identifier generation to FieldMetadata
Majkl578 Jul 12, 2017
df9af26
Removed enqueueing for insert support from EntityPersister. There was…
guilhermeblanco Jul 17, 2017
1e9a91d
Return array of identifier field names instead of hardcoded identifier
guilhermeblanco Jul 17, 2017
b874948
Ensure we are using getClassName() which will be later available in C…
guilhermeblanco Jul 17, 2017
d38944d
Removed direct access to ClassMetadata->name
guilhermeblanco Jul 18, 2017
3c12c3f
Removed direct access to ClassMetadata->name
guilhermeblanco Jul 18, 2017
66f1ff4
Removed EntityListenerBuilder
guilhermeblanco Jul 18, 2017
946b35f
Consume custom repository class through methods only.
guilhermeblanco Jul 18, 2017
bbd2fbf
Replace $this->assertXXX with self::assertXXX
lcobucci Jul 23, 2017
c305d87
Simplified NamedQuery support
guilhermeblanco Jul 24, 2017
256b7e3
Implemented runtime resolution of __CLASS__ calls to SqlResultSetMapp…
guilhermeblanco Jul 24, 2017
e341491
Simplified logic and stored information around named native query.
guilhermeblanco Jul 25, 2017
807c848
Simplified RSM building for result class
guilhermeblanco Jul 25, 2017
8d2abbb
Moved MappingDriver to ORM to allow changes in its API
guilhermeblanco Jul 26, 2017
cedfceb
Eliminated the concept of ClassMetadataInterface temporarily until re…
guilhermeblanco Jul 26, 2017
b872c96
Decoupled Generator and GeneratorStrategy
guilhermeblanco Jul 26, 2017
46a3bde
Moved computation of FCQN resolution to Metadata building step.
guilhermeblanco Jul 27, 2017
68de864
Moved getIdentifierValues to EntityPersister
guilhermeblanco Jul 27, 2017
be3540b
Moved ClassMetadata::assignIdentifier to EntityPersister::setIdentifi…
guilhermeblanco Jul 27, 2017
ce1e325
Enable strict types
Majkl578 Jun 24, 2017
1464f93
Fix type errors
Majkl578 Jun 24, 2017
e864d86
Added ValueGeneratorMetadata, implemented ValueGeneratorPlan
Majkl578 Jul 14, 2017
c192646
Drop AssignedGenerator (obsoleted by ValueGenerationPlan)
Majkl578 Jul 28, 2017
352830c
Fixed issue with associatied entities implementing __toString()
guilhermeblanco Jul 31, 2017
6355a9b
Added information of action items for later.
guilhermeblanco Jul 31, 2017
c479564
Added concept of SecondPass to ClassMetadataFactory
guilhermeblanco Aug 1, 2017
136201f
added the final keyword EntityManager to indicate that extending Enti…
Aug 2, 2017
888a1fb
Typehint EntityManagerInterface instead of EntityManager where possible
Majkl578 Aug 2, 2017
d85e07f
added the test and updated the entitymanager
Aug 3, 2017
d7f68bc
Merge remote-tracking branch 'Majkl578/dev/typehint-EntityManagerInte…
Aug 3, 2017
3f4514f
removing copyright headers in every files
mikeSimonson Aug 3, 2017
03bebba
Remove another copyright header
mikeSimonson Aug 3, 2017
45d73e3
Add missing strict type declaration
mikeSimonson Aug 3, 2017
ca42e9c
fixed the broken tests and updated the UPGRADE guide to notify about BC
Aug 3, 2017
348e78a
Merge pull request #6600 from mikeSimonson/remove-copyright
Ocramius Aug 3, 2017
6434b2a
Merge pull request #6602 from mikeSimonson/add-missing-strict-type
Ocramius Aug 3, 2017
dcb5bdb
Typehint EntityManagerInterface instead of EntityManager where possible
Majkl578 Aug 2, 2017
082d666
Merge pull request #6599 from Majkl578/dev/typehint-EntityManagerInte…
Ocramius Aug 5, 2017
46b1312
Merge branch 'develop' into add-finalkeyword-entitymanager-patch
Aug 5, 2017
6f26e11
More optimizations and preparation for ClassMetadataFactory replaceme…
guilhermeblanco Aug 1, 2017
72b753e
change the em property to fix the tests and UPGRADE file as per the P…
Aug 7, 2017
ba90418
Some quick typehints
guilhermeblanco Aug 8, 2017
2b85eab
Reverted the public method on construct to protected. Updated the tests.
Aug 9, 2017
9e384c4
Merge remote-tracking branch 'upstream/develop' into add-finalkeyword…
Aug 9, 2017
ca4b2ee
updated the heading for upgrade doc
Aug 9, 2017
24f6829
ClassMetadataFactory changed to bring ClassMetadata instantiation clo…
guilhermeblanco Aug 9, 2017
01a8a87
Merge pull request #6596 from usmanzafar/add-finalkeyword-entitymanag…
Ocramius Aug 10, 2017
cec19ec
More simplifications in ClassMetadataFactory.
guilhermeblanco Aug 10, 2017
14ce66f
Removed PHP and Static PHP mapping drivers, since they will be irrele…
guilhermeblanco Aug 10, 2017
7b23d35
Fixed broken tests
guilhermeblanco Aug 10, 2017
1370989
Removing `count()` operations from the `AbstractQuery` implementations
Ocramius Aug 11, 2017
a80f0e6
Removing useless `count()` operations from the `PersistentCollection`…
Ocramius Aug 11, 2017
6dd1d53
Removing useless counting around query resultset handling
Ocramius Aug 11, 2017
1c92b80
Removing counting operations around parameter handling in `QueryBuilder`
Ocramius Aug 11, 2017
7a2d438
Removing counting operations in the `UnitOfWork`
Ocramius Aug 11, 2017
d9aeb2b
Avoiding counting aliases when determining whether a query is simple …
Ocramius Aug 11, 2017
df78548
Avoid repeated counting of root aliases in `ArrayHydrator`
Ocramius Aug 11, 2017
031ec51
Avoiding counting scalars at every iteration - simply checking once i…
Ocramius Aug 11, 2017
4fe9070
Removing counting of generated id fields when checking for composite …
Ocramius Aug 11, 2017
7b226c8
Quicker check on whether an identifier is composite - removes counting
Ocramius Aug 11, 2017
5ee2f40
Removing useless counting of the discriminator map during metadata lo…
Ocramius Aug 11, 2017
0e38ef5
Fixing check of inheritance on a mapped superclass
Ocramius Aug 11, 2017
9bc68a4
Removing useless counting on whether subclasses are present
Ocramius Aug 11, 2017
87e7cfe
Removed counting of local variable when generating filter clauses for…
Ocramius Aug 11, 2017
58787de
Removing counting from `getSelectConditionStatementSQL`
Ocramius Aug 11, 2017
db19e17
Removing some useless counting operations from the DQL parser
Ocramius Aug 11, 2017
80e31d7
Removing counting in an iteration when generating aliases
Ocramius Aug 11, 2017
65c49f4
Removed counting of sql parts when deciding whether to wrap parts in …
Ocramius Aug 11, 2017
6c6cf46
Removed typical `if (count(expr)) {` issue from sql walker
Ocramius Aug 11, 2017
a2f9584
Avoiding fallback function lookup when counting expression parts in a…
Ocramius Aug 11, 2017
6a6312d
Avoiding fallback function lookup when counting expression parts in a…
Ocramius Aug 11, 2017
7f775d1
Moved class metadata binding to proper methods
guilhermeblanco Aug 11, 2017
be91c6b
Reverting dangerous index lookup operations - resultset may contain g…
Ocramius Aug 11, 2017
200e53a
Replacing possible O(n^2) operation from `PersistentCollection` diffi…
Ocramius Aug 11, 2017
1ac31fc
Removing useless checking for never-used parameter, inlining merge op…
Ocramius Aug 11, 2017
3e2ad00
Removing useless variable
Ocramius Aug 11, 2017
b69ddf8
Removing useless post-array-population association hydration via `arr…
Ocramius Aug 11, 2017
9351a20
Removing useless `array_key_exists()` calls, using `??` operator instead
Ocramius Aug 11, 2017
389f5df
Removing `is_array` check on a type that can only have two possible s…
Ocramius Aug 11, 2017
454cf8a
Merge pull request #6618 from doctrine/feature/quick-wins-removal-of-…
guilhermeblanco Aug 12, 2017
8560538
Merge pull request #6619 from doctrine/fix/remove-expensive-array-ite…
Ocramius Aug 17, 2017
a7d1bd7
TableMetadata should only exist if ClassMetadata has a table. Started…
guilhermeblanco Aug 12, 2017
32a4d64
Removing functional test cases covering `EntityManager#merge()` seman…
Ocramius Dec 2, 2015
b8c017a
Removing tests around `EntityManager#merge()` and similar operations
Ocramius Dec 2, 2015
466fa65
Removing `EntityManager#merge()` logic
Ocramius Dec 2, 2015
856280d
Removing merge operations from the UnitOfWork
Ocramius Dec 2, 2015
439e92c
Adding TODO: serialization of entities is something the ORM shouldn't…
Ocramius Dec 2, 2015
81e9127
Adding @TODO about batch-processing and `detach()` operations: `clear…
Ocramius Dec 2, 2015
968b5b4
Note about sections to be removed
Ocramius Dec 2, 2015
507151e
Removing tests around the `detach` functionality
Ocramius Dec 2, 2015
7a2bedb
Removing `EntityManager#detach()`
Ocramius Dec 2, 2015
3bf9f6a
Disabling test around the `EntityManager#clear($entityName)` function…
Ocramius Dec 2, 2015
06be914
Removing `clear($entityName)` functionality (for now)
Ocramius Dec 2, 2015
0f18690
#1577 remove newly introduced tests around merge/detach semantics, w…
Ocramius Jun 24, 2017
9de68f6
#1577 adding upgrade notes about the BC break caused by merge() and …
Ocramius Jun 24, 2017
c49af2f
#1577 re-adding `merge()` and `detach()`, since a release of doctrine…
Ocramius Jun 24, 2017
9a7dedd
#1577 re-wording 'working with sessions' section, so that users are d…
Ocramius Jun 24, 2017
28a2684
#1577 removing `detach()` calls references from the batch processing …
Ocramius Jun 24, 2017
d9e86af
#1577 removing <cascade-merge/> and <cascade-detach/> from the XSD
Ocramius Jun 24, 2017
d837399
#1577 removing cascade-merge and cascade-detach from mapping examples
Ocramius Jun 24, 2017
775697a
#1577 removing cascade-merge and cascade-detach from mapping examples
Ocramius Jun 24, 2017
1873d88
#1577 removing references to merge/detach cascade operations
Ocramius Jun 24, 2017
e7d4154
#1577 removing documentation about merge/detach methods, replaced by …
Ocramius Jun 24, 2017
70a32a2
#1577 removing all references to `merge` operations in the docs
Ocramius Jun 24, 2017
e62b47f
#1577 `merge` and `detach` are no longer accepted cascade mappings
Ocramius Jun 24, 2017
9091d2c
#1577 removing `merge` and `detach` related mapping operations in ca…
Ocramius Jun 24, 2017
f84660b
Corrected `XmlExporter` order of exported cascades
Ocramius Jun 24, 2017
b55468c
#1577 re-enabling `clear($entityName)` tests
Ocramius Jun 25, 2017
4d54fac
#1577 removing references to `detach` and `merge` cascade operations …
Ocramius Aug 28, 2017
e0e6cf4
#1577 removed `detach` reference from the docs, as per @lcobucci's re…
Ocramius Aug 28, 2017
37797a0
#1577 rephrasing reference to `detach` that is now `clear()` instead
Ocramius Aug 28, 2017
ffa44c8
#1577 clarifying session user fetching as per @Majkl578's review
Ocramius Aug 28, 2017
7cdf308
Merge pull request #1577 from doctrine/prototype/merge-detach-removal
guilhermeblanco Aug 28, 2017
cd5413b
Adding `ocramius/package-versions` as a replacement for the internal …
Ocramius Aug 28, 2017
73e815a
Dropping references to the ORM `Version` class - using `PackageVersio…
Ocramius Aug 28, 2017
c286a53
Removing build references to the `Version` class, which is finally go…
Ocramius Aug 28, 2017
b330e15
#6653 adding note to `UPGRADE.md` about the removal of `Doctrine\ORM\…
Ocramius Aug 28, 2017
7a094c8
#6653 removing unused variable as per @alcaeus' review
Ocramius Aug 28, 2017
333bf85
Merge pull request #6653 from doctrine/cleanup/drop-version-class
alcaeus Aug 29, 2017
dba197a
Use Generators instead of AppendIterator for properties iteration
Majkl578 Sep 1, 2017
7f14a90
Merge pull request #6663 from Majkl578/dev/ComponentMetadata-properti…
guilhermeblanco Sep 2, 2017
4490b3b
Enable multiple value generators per entity
Majkl578 Sep 1, 2017
3b441a4
Forbid composite or non-primary IDENTITY generators on single entity
Majkl578 Sep 1, 2017
e462794
Added test for non-identifier generators
Majkl578 Sep 3, 2017
f135146
Added test for generators in inheritance
Majkl578 Sep 3, 2017
9c82046
Added test with composite identifier with association and custom gene…
Majkl578 Sep 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ lib/api/
lib/Doctrine/Common
lib/Doctrine/DBAL
/.settings/
*.iml
.buildpath
.project
.idea
Expand Down
171 changes: 169 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,159 @@
# Upgrade to 3.0

## BC Break: Removed `Doctrine\ORM\Version`

The `Doctrine\ORM\Version` class is no longer available: please refrain from checking the ORM version at runtime.

## BC Break: Removed `EntityManager#merge()` and `EntityManager#detach()` methods

Merge and detach semantics were a poor fit for the PHP "share-nothing" architecture.
In addition to that, merging/detaching caused multiple issues with data integrity
in the managed entity graph, which was constantly spawning more edge-case bugs/scenarios.

The following API methods were therefore removed:

* `EntityManager#merge()`
* `EntityManager#detach()`
* `UnitOfWork#merge()`
* `UnitOfWork#detach()`

Users are encouraged to migrate `EntityManager#detach()` calls to `EntityManager#clear()`.

In order to maintain performance on batch processing jobs, it is endorsed to enable
the second level cache (http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/second-level-cache.html)
on entities that are frequently reused across multiple `EntityManager#clear()` calls.

An alternative to `EntityManager#merge()` is not provided by ORM 3.0, since the merging
semantics should be part of the business domain rather than the persistence domain of an
application. If your application relies heavily on CRUD-alike interactions and/or `PATCH`
restful operations, you should look at alternatives such as [JMSSerializer](https://github.com/schmittjoh/serializer).

## BC Break: Added the final keyword for `EntityManager`

Final keyword has been added to the ``EntityManager::class`` in order to ensure that EntityManager is not used as valid extension point. Valid extension point should be EntityManagerInterface.

## BC Break: ``EntityManagerInterface`` is now used instead of ``EntityManager`` in typehints

`Sequencing\Generator#generate()` now takes ``EntityManagerInterface`` as its first argument instead of ``EntityManager``. If you have any custom generators, please update your code accordingly.

## BC Break: Removed `EntityManager#flush($entity)` and `EntityManager#flush($entities)`

If your code relies on single entity flushing optimisations via
`EntityManager#flush($entity)`, the signature has been changed to
`EntityManager#flush()`.

Said API was affected by multiple data integrity bugs due to the fact
that change tracking was being restricted upon a subset of the managed
entities. The ORM cannot support committing subsets of the managed
entities while also guaranteeing data integrity, therefore this
utility was removed.

The `flush()` semantics remain the same, but the change tracking will be performed
on all entities managed by the unit of work, and not just on the provided
`$entity` or `$entities`, as the parameter is now completely ignored.

The same applies to `UnitOfWork#commit($entity)`, which now is simply
`UnitOfWork#commit()`.

If you would still like to perform batching operations over small `UnitOfWork`
instances, it is suggested to follow these paths instead:

* eagerly use `EntityManager#clear()` in conjunction with a specific second level
cache configuration (see http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/second-level-cache.html)
* use an explicit change tracking policy (see http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/change-tracking-policies.html)

## BC Break: Removed ``YAML`` mapping drivers.

If your code relies on ``YamlDriver`` or ``SimpleYamlDriver``, you **MUST** change to
annotation or XML drivers instead.

## BC Break: Changed methods in ``ClassMetadata``

* ``ClassMetadata::addInheritedProperty``
* ``ClassMetadata::setDiscriminatorColumn``

## BC Break: Removed methods in ``ClassMetadata``

* ``ClassMetadata::getTypeOfField`` (to be removed, part of Common API)

## BC Break: Removed methods in ``ClassMetadata``

* ``ClassMetadata::setTableName`` => Use ``ClassMetadata::setPrimaryTable(['name' => ...])``
* ``ClassMetadata::getFieldMapping`` => Use ``ClassMetadata::getProperty()`` and its methods
* ``ClassMetadata::getQuotedColumnName`` => Use ``ClassMetadata::getProperty()::getQuotedColumnName()``
* ``ClassMetadata::getQuotedTableName``
* ``ClassMetadata::getQuotedJoinTableName``
* ``ClassMetadata::getQuotedIdentifierColumnNames``
* ``ClassMetadata::getIdentifierColumnNames`` => Use ``ClassMetadata::getIdentifierColumns($entityManager)``
* ``ClassMetadata::setVersionMetadata``
* ``ClassMetadata::setVersioned``
* ``ClassMetadata::invokeLifecycleCallbacks``
* ``ClassMetadata::isInheritedField`` => Use ``ClassMetadata::getProperty()::isInherited()``
* ``ClassMetadata::isUniqueField`` => Use ``ClassMetadata::getProperty()::isUnique()``
* ``ClassMetadata::isNullable`` => Use ``ClassMetadata::getProperty()::isNullable()``
* ``ClassMetadata::getTypeOfColumn()`` => Use ``PersisterHelper::getTypeOfColumn()``

## BC Break: Removed ``quoted`` index from table, field and sequence mappings

Quoting is now always called. Implement your own ``Doctrine\ORM\Mapping\NamingStrategy`` to manipulate
your schema, tables and column names to your custom desired naming convention.

## BC Break: Removed ``ClassMetadata::$fieldMappings[$fieldName]['requireSQLConversion']``

ORM Type SQL conversion is now always being applied, minimizing the risks of error prone code in ORM internals

## BC Break: Removed ``ClassMetadata::$columnNames``

If your code relies on this property, you should search/replace from this:

$metadata->columnNames[$fieldName]

To this:

$metadata->getProperty($fieldName)->getColumnName()

## BC Break: Renamed ``ClassMetadata::setIdentifierValues()`` to ``ClassMetadata::assignIdentifier()``

Provides a more meaningful name to method.

## BC Break: Removed ``ClassMetadata::$namespace``

The namespace property in ClassMetadata was only used when using association
classes in the same namespace and it was used to speedup ClassMetadata
creation purposes. Namespace could be easily inferred by asking ``\ReflectionClass``
which was already stored internally.

### BC Break: Removed ``ClassMetadata::$isVersioned``

Switched to a method alternative: ``ClassMetadata::isVersioned()``

## BC Break: Removed ``Doctrine\ORM\Mapping\ClassMetadataInfo``

There was no reason to keep a blank class. All references are now pointing
to ``Doctrine\ORM\Mapping\ClassMetadata``.

## BC Break: Annotations classes namespace change

All Annotations classes got moved from ``Doctrine\ORM\Mapping`` into a more
pertinent namespace ``Doctrine\ORM\Annotation``. This change was done to add
room for Metadata namespace refactoring.

## Minor BC break: Mappings now store DBAL\Type instances instead of strings

This lead to manual ``ResultSetMapping`` building instances to also hold Types in meta results.
Example:

$rsm->addMetaResult('e ', 'e_discr', 'discr', false, Type::getType('string'));

## Enhancement: Mappings now store their declaring ClassMetadata

Every field, association or embedded now contains a pointer to its declaring ClassMetadata.

## Enhancement: Mappings now store their corresponding table name

Every field, association join column or inline embedded field/association holds a reference to its owning table name.


# Upgrade to 2.6

## Minor BC BREAK: `Doctrine\ORM\Tools\Console\ConsoleRunner` is now final
Expand All @@ -21,6 +177,7 @@ Method `Doctrine\ORM\Query\Parser#overwriteInternalDQLFunctionNotAllowed` was
removed because of the choice to allow users to overwrite internal functions, ie
`AVG`, `SUM`, `COUNT`, `MIN` and `MAX`. [#6500](https://github.com/doctrine/doctrine2/pull/6500)


# Upgrade to 2.5

## Minor BC BREAK: removed `Doctrine\ORM\Query\SqlWalker#walkCaseExpression()`
Expand Down Expand Up @@ -180,6 +337,7 @@ From now on, the resultset will look like this:

Added way to access the underlying QueryBuilder#from() method's 'indexBy' parameter when using EntityRepository#createQueryBuilder()


# Upgrade to 2.4

## BC BREAK: Compatibility Bugfix in PersistentCollection#matching()
Expand Down Expand Up @@ -224,6 +382,7 @@ Now parenthesis are considered, the previous DQL will generate:

SELECT 100 / (2 * 2) FROM my_entity


# Upgrade to 2.3

## Auto Discriminator Map breaks userland implementations with Listener
Expand Down Expand Up @@ -293,6 +452,7 @@ Also, following mapping drivers have been deprecated, please use their replaceme
* `Doctrine\ORM\Mapping\Driver\PHPDriver` => `Doctrine\Common\Persistence\Mapping\Driver\PHPDriver`
* `Doctrine\ORM\Mapping\Driver\StaticPHPDriver` => `Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver`


# Upgrade to 2.2

## ResultCache implementation rewritten
Expand Down Expand Up @@ -376,6 +536,7 @@ Also, Doctrine 2.2 now is around 10-15% faster than 2.1.

Previously EntityManager#find(null) returned null. It now throws an exception.


# Upgrade to 2.1

## Interface for EntityRepository
Expand All @@ -400,6 +561,7 @@ The annotation reader was heavily refactored between 2.0 and 2.1-RC1. In theory

This is already done inside the ``$config->newDefaultAnnotationDriver``, so everything should automatically work if you are using this method. You can verify if everything still works by executing a console command such as schema-validate that loads all metadata into memory.


# Update from 2.0-BETA3 to 2.0-BETA4

## XML Driver <change-tracking-policy /> element demoted to attribute
Expand All @@ -408,6 +570,7 @@ We changed how the XML Driver allows to define the change-tracking-policy. The w

<entity change-tracking-policy="DEFERRED_IMPLICT" />


# Update from 2.0-BETA2 to 2.0-BETA3

## Serialization of Uninitialized Proxies
Expand Down Expand Up @@ -470,10 +633,12 @@ don't loose anything through this.
The default allocation size for sequences has been changed from 10 to 1. This step was made
to not cause confusion with users and also because it is partly some kind of premature optimization.


# Update from 2.0-BETA1 to 2.0-BETA2

There are no backwards incompatible changes in this release.


# Upgrade from 2.0-ALPHA4 to 2.0-BETA1

## EntityRepository deprecates access to protected variables
Expand Down Expand Up @@ -544,7 +709,6 @@ access all entities.

Xml and Yaml Drivers work as before!


## New inversedBy attribute

It is now *mandatory* that the owning side of a bidirectional association specifies the
Expand Down Expand Up @@ -608,7 +772,7 @@ you need to use the following, explicit syntax:
## XML Mapping Driver

The 'inheritance-type' attribute changed to take last bit of ClassMetadata constant names, i.e.
NONE, SINGLE_TABLE, INHERITANCE_TYPE_JOINED
NONE, SINGLE_TABLE, JOINED

## YAML Mapping Driver

Expand Down Expand Up @@ -640,6 +804,7 @@ The Collection interface in the Common package has been updated with some missin
that were present only on the default implementation, ArrayCollection. Custom collection
implementations need to be updated to adhere to the updated interface.


# Upgrade from 2.0-ALPHA3 to 2.0-ALPHA4

## CLI Controller changes
Expand Down Expand Up @@ -676,6 +841,8 @@ With new required method AbstractTask::buildDocumentation, its implementation de
database schema without deleting any unused tables, sequences or foreign keys.
* Use "doctrine schema-tool --complete-update" to do a full incremental update of
your schema.


# Upgrade from 2.0-ALPHA2 to 2.0-ALPHA3

This section details the changes made to Doctrine 2.0-ALPHA3 to make it easier for you
Expand Down
2 changes: 2 additions & 0 deletions bin/doctrine
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

include('doctrine.php');
20 changes: 3 additions & 17 deletions bin/doctrine-pear.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.doctrine-project.org>.
*/


declare(strict_types=1);

require_once 'Doctrine/Common/ClassLoader.php';

Expand Down
19 changes: 2 additions & 17 deletions bin/doctrine.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>.
*/

declare(strict_types=1);

use Symfony\Component\Console\Helper\HelperSet;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
Expand Down
3 changes: 0 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# Version class and file
project.version_class = Doctrine\\ORM\\Version
project.version_file = lib/Doctrine/ORM/Version.php
23 changes: 0 additions & 23 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,6 @@
</exec>
</target>

<target name="make-release" depends="check-git-checkout-clean,prepare,php">
<replace file="${project.version_file}" token="-DEV" value="" failOnNoReplacements="true" />
<exec executable="${php_executable}" outputproperty="doctrine.current_version" failonerror="true">
<arg value="-r" />
<arg value="require_once '${project.version_file}';echo ${project.version_class}::VERSION;" />
</exec>
<exec executable="${php_executable}" outputproperty="doctrine.next_version" failonerror="true">
<arg value="-r" />
<arg value="$parts = explode('.', str_ireplace(array('-DEV', '-ALPHA', '-BETA'), '', '${doctrine.current_version}'));
if (count($parts) != 3) {
throw new \InvalidArgumentException('Version is assumed in format x.y.z, ${doctrine.current_version} given');
}
$parts[2]++;
echo implode('.', $parts);
" />
</exec>

<git-commit file="${project.version_file}" message="Release ${doctrine.current_version}" />
<git-tag version="${doctrine.current_version}" />
<replace file="${project.version_file}" token="${doctrine.current_version}" value="${doctrine.next_version}-DEV" />
<git-commit file="${project.version_file}" message="Bump version to ${doctrine.next_version}" />
</target>

<target name="check-git-checkout-clean">
<exec executable="git" failonerror="true">
<arg value="diff-index" />
Expand Down
9 changes: 3 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@
"php": "^7.1",
"ext-pdo": "*",
"doctrine/collections": "^1.4",
"doctrine/dbal": ">=2.5-dev,<2.7-dev",
"doctrine/dbal": "dev-develop as 3.x-dev",
"doctrine/instantiator": "~1.1",
"doctrine/common": "^2.7.1",
"doctrine/cache": "~1.6",
"doctrine/annotations": "~1.4",
"ocramius/package-versions": "^1.1.2",
"symfony/console": "~3.0|~4.0"
},
"require-dev": {
"symfony/yaml": "~3.0|~4.0",
"phpunit/phpunit": "^6.0"
},
"suggest": {
"symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
},
"autoload": {
"psr-4": { "Doctrine\\ORM\\": "lib/Doctrine/ORM" }
},
Expand All @@ -43,7 +40,7 @@
"bin": ["bin/doctrine"],
"extra": {
"branch-alias": {
"dev-master": "2.6.x-dev"
"dev-master": "3.0.x-dev"
}
},
"archive": {
Expand Down
Loading