Skip to content

Make new metadata locale independent to contain all data #7930

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

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Apr 29, 2025

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Make new metadata not locale aware.

Why?

We want to remove the old metadata classes but to avoid that the metadata is loaded per locale again we need

With the removal of the old metadata classes xml would be parsed per locale to avoid this we change the metadata to keep all admin locales in them.

@alexander-schranz alexander-schranz force-pushed the enhancement/new-metadata-unlocalized branch 8 times, most recently from 1c4c1f5 to cde1651 Compare April 29, 2025 13:48
@alexander-schranz alexander-schranz added the Technical Debt Impacts code quality, no or just small impact on end developers and users label Apr 29, 2025
@alexander-schranz alexander-schranz force-pushed the enhancement/new-metadata-unlocalized branch 2 times, most recently from ee095b8 to d7d3de2 Compare April 29, 2025 14:10
@alexander-schranz alexander-schranz changed the title Make new metadata not locale aware Make new metadata locale independent to contain all data Apr 29, 2025
@alexander-schranz alexander-schranz force-pushed the enhancement/new-metadata-unlocalized branch 2 times, most recently from 9dba93f to 8a5d751 Compare April 29, 2025 14:13
"disabledCondition": null,
"visibleCondition": null,
"description": "",
Copy link
Member Author

@alexander-schranz alexander-schranz Apr 29, 2025

Choose a reason for hiding this comment

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

small change here empty descriptions, title, label. infotests, placeholders ... are not longer returned.

@alexander-schranz alexander-schranz marked this pull request as ready for review April 29, 2025 14:21
@@ -1,12 +1,9 @@
{
"name": "default",
"title": "Animals",
"form": {
Copy link
Member Author

Choose a reason for hiding this comment

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

we can not set the position of a property added via subscriber this are just moved down

@alexander-schranz alexander-schranz force-pushed the enhancement/new-metadata-unlocalized branch from 8a5d751 to da7e2e8 Compare April 30, 2025 06:35
*/
public function setTitles(array $titles)
{
$this->titles = $titles;
Copy link
Member

Choose a reason for hiding this comment

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

should we check here, that the key is always a string to prevent strange sideeffects later?

Copy link
Member Author

Choose a reason for hiding this comment

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

as discussed the callers responsible to validate that it is a array<string, string> in our case mostly the xml parsers work.

@Prokyonn
Copy link
Member

As we are already touching all of these files, wouldn't it make sense to remove the php doc types and add them as real php types? @alexander-schranz

@alexander-schranz
Copy link
Member Author

@Prokyonn agree but would do that parts after the whole refactoring when we know which classes will stay.

@alexander-schranz alexander-schranz merged commit 0140e38 into sulu:3.0 Apr 30, 2025
9 checks passed
@alexander-schranz alexander-schranz deleted the enhancement/new-metadata-unlocalized branch April 30, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Technical Debt Impacts code quality, no or just small impact on end developers and users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants