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

Enable to set custom TypedFieldMapper; #1802

Merged
merged 22 commits into from
May 21, 2024

Conversation

jifer
Copy link

@jifer jifer commented May 15, 2024

This PR add typed_field_mapper option allowing to override or set custom TypedFieldMapper as described in ORM documentation. This option allows auto detection of doctrine types based on PHP typed properties.

https://www.doctrine-project.org/projects/doctrine-orm/en/3.1/reference/typedfieldmapper.html

\Doctrine\ORM\Configuration::getTypedFieldMapper() return null as default and \Doctrine\ORM\Mapping\ClassMetadataInfo instance is created by providing null or TypedFieldMapper. If null \Doctrine\ORM\Mapping\DefaultTypedFieldMapper is created. This why i set it as default under typed_field_mapper option.

public function __construct($entityName, ?NamingStrategy $namingStrategy = null, ?TypedFieldMapper $typedFieldMapper = null)
{
   // [..]
    $this->typedFieldMapper = $typedFieldMapper ?? new DefaultTypedFieldMapper();
}

dmaicher and others added 21 commits March 19, 2024 09:48
It seems that while modernizing the directory structure, I overlooked
some of the paths present in that configuration file.
fix deprecations for deprecated mysql server versions
This silences a warning at test suite setup.
This commit adds necessary delimiters to regular expressions used in schema_filter configurations, preventing the 'No ending delimiter' error in preg_match. It improves the error handling by ensuring that regular expressions are always correctly formatted.
Bumps [doctrine/.github](https://github.com/doctrine/.github) from 3.1.0 to 5.0.1.
- [Release notes](https://github.com/doctrine/.github/releases)
- [Commits](doctrine/.github@3.1.0...5.0.1)

---
updated-dependencies:
- dependency-name: doctrine/.github
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3.
- [Release notes](https://github.com/ramsey/composer-install/releases)
- [Commits](ramsey/composer-install@v2...v3)

---
updated-dependencies:
- dependency-name: ramsey/composer-install
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@ostrolucky
Copy link
Member

You need to adjust xsd schema too

@jifer
Copy link
Author

jifer commented May 15, 2024

Thank you. I see I missed few things, including DI test. That's my first try here so apologies if I did something wrong.

@jifer
Copy link
Author

jifer commented May 20, 2024

@ostrolucky I'm not sure if there is something more I should update? Thank you in advance.

@ostrolucky ostrolucky changed the base branch from 2.12.x to 2.13.x May 21, 2024 07:46
@ostrolucky ostrolucky merged commit 794cb9e into doctrine:2.13.x May 21, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants