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

Introduce ClassMetadataFactoryInterface to allow switching implementations #2552

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

malarzm
Copy link
Member

@malarzm malarzm commented Sep 30, 2023

Q A
Type bugfix
BC Break fixing one
Fixed issues fixes #2551

@malarzm malarzm force-pushed the gh-2551-cmf-interface branch from bd6d99f to 6c1e90c Compare September 30, 2023 21:40
@malarzm malarzm changed the base branch from 2.6.x to 2.5.x September 30, 2023 21:41
@malarzm malarzm force-pushed the gh-2551-cmf-interface branch 2 times, most recently from c51a6da to b1c8e41 Compare September 30, 2023 21:53
$metadataFactoryClassName = $this->config->getClassMetadataFactoryName();
$this->metadataFactory = new $metadataFactoryClassName();
$this->metadataFactory->setDocumentManager($this);
$this->metadataFactory->setConfiguration($this->config);
$this->metadataFactory->setProxyClassNameResolver($this->classNameResolver);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rearranging so initialization is done in one place

@@ -6,6 +6,7 @@

use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but phpcbf fixed this automatically

Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static analysis isn't happy, but LGTM in general.

@malarzm malarzm force-pushed the gh-2551-cmf-interface branch from b1c8e41 to 7dd5a77 Compare October 23, 2023 20:24
@malarzm
Copy link
Member Author

malarzm commented Oct 23, 2023

Rebasing as #2553 brought back changes for SA/CS tools to 2.5.x branch. Will work on SA happiness and merge this when CI is green :)

@malarzm malarzm force-pushed the gh-2551-cmf-interface branch from 7dd5a77 to fbff519 Compare October 23, 2023 20:33
@malarzm malarzm added this to the 2.5.3 milestone Oct 23, 2023
@malarzm malarzm merged commit bdbb370 into doctrine:2.5.x Oct 23, 2023
18 checks passed
@malarzm malarzm deleted the gh-2551-cmf-interface branch October 23, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot override the class metadata factory via configuration since 2.5.0
3 participants