Skip to content

Adding TypeLoader and type_definitions for documents#14047

Merged
fashxp merged 9 commits into10.6from
13947-custom-document-types
Jan 19, 2023
Merged

Adding TypeLoader and type_definitions for documents#14047
fashxp merged 9 commits into10.6from
13947-custom-document-types

Conversation

@mattamon
Copy link
Copy Markdown
Contributor

Changes in this pull request

Resolves #13947

Additional info

Adding a TypeLoader instead of loading the Documents via namespace.
Making it possible to extend or override existing types

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 12, 2023

Review Checklist

  • Target branch (10.5 for bug fixes, others 11.x)
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

brusch
brusch previously requested changes Jan 12, 2023
@mattamon mattamon linked an issue Jan 16, 2023 that may be closed by this pull request
Adding deprecation trigger
@mattamon mattamon removed the BC-BREAK label Jan 17, 2023
# Conflicts:
#	doc/Development_Documentation/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
Copy link
Copy Markdown
Member

@fashxp fashxp left a comment

Choose a reason for hiding this comment

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

looks good to me now, but we should add a documentation similar to the ones for how to add editables

@mattamon
Copy link
Copy Markdown
Contributor Author

@fashxp we should also think about the getTypes method: https://github.com/pimcore/pimcore/blob/10.6/models/Document.php#L154 as it returns the predefined list here: https://github.com/pimcore/pimcore/blob/10.6/bundles/CoreBundle/Resources/config/pimcore/default.yaml#L203

Maybe we should switch to the keys of the mapping?

@fashxp
Copy link
Copy Markdown
Member

fashxp commented Jan 18, 2023

@fashxp we should also think about the getTypes method: https://github.com/pimcore/pimcore/blob/10.6/models/Document.php#L154 as it returns the predefined list here: https://github.com/pimcore/pimcore/blob/10.6/bundles/CoreBundle/Resources/config/pimcore/default.yaml#L203

Maybe we should switch to the keys of the mapping?

good catch. yes we should, but that we only can do with Pimcore 11 ... removing a config option would be a BC break.

@fashxp fashxp merged commit e556af6 into 10.6 Jan 19, 2023
@fashxp fashxp deleted the 13947-custom-document-types branch January 19, 2023 08:09
@fashxp fashxp self-assigned this Jan 19, 2023
@dvesh3 dvesh3 mentioned this pull request Jan 23, 2023
mcop1 pushed a commit that referenced this pull request Feb 13, 2023
* Adding TypeLoader and type_definitions for documents

* Breaking Change Layer to enable custom document via config

* Enable the loader by default
Adding deprecation trigger

* Update upgrade notes

* Removing unnecessary imports

* Add doc on how to add custom documents

* Deprecating document types

* Adding additional info to deprecation
mcop1 pushed a commit that referenced this pull request Feb 13, 2023
* Adding TypeLoader and type_definitions for documents

* Breaking Change Layer to enable custom document via config

* Enable the loader by default
Adding deprecation trigger

* Update upgrade notes

* Removing unnecessary imports

* Add doc on how to add custom documents

* Deprecating document types

* Adding additional info to deprecation
dvesh3 pushed a commit that referenced this pull request May 9, 2023
* Adding TypeLoader and type_definitions for documents

* Breaking Change Layer to enable custom document via config

* Enable the loader by default
Adding deprecation trigger

* Update upgrade notes

* Removing unnecessary imports

* Add doc on how to add custom documents

* Deprecating document types

* Adding additional info to deprecation
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.

Custom Document Types

4 participants