Skip to content

Remove reference handling of tags in properties parser #7925

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 28, 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?

Remove reference handling of tags in properties parser. And make the services internal.

Why?

The tags reference handling is really changed and valdiation and loading should be seperated, to be open for future changes we should also mark such service as internal as its loading should be in our full control.

@alexander-schranz alexander-schranz force-pushed the enhancement/remove-reference-handling-of-tags-in-properties-xml-parser branch from 2645643 to bcebbdb Compare April 28, 2025 12:37
@alexander-schranz alexander-schranz added the Technical Debt Impacts code quality, no or just small impact on end developers and users label Apr 28, 2025
@alexander-schranz alexander-schranz force-pushed the enhancement/remove-reference-handling-of-tags-in-properties-xml-parser branch from bcebbdb to e364867 Compare April 28, 2025 12:46
if (isset($this->requiredTagNames[$type])) {
foreach ($this->requiredTagNames[$type] as $requiredTagName) {
if (!\array_key_exists($requiredTagName, $tags)) {
throw new RequiredTagNotFoundException($result['key'], $requiredTagName);
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 should readd this but not inside the loader.

@@ -20,7 +20,7 @@
use Symfony\Contracts\Translation\TranslatorInterface;

/**
* Parse properties structure from an XML file.
* @internal this class is not part of the public API and may be changed or removed without further notice
Copy link
Member Author

Choose a reason for hiding this comment

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

this should make it in future easier if we need again changes in the parser or loader as we don't longer need to keep bc in mind.

@alexander-schranz alexander-schranz merged commit 9fb2f36 into sulu:3.0 Apr 30, 2025
9 checks passed
@alexander-schranz alexander-schranz deleted the enhancement/remove-reference-handling-of-tags-in-properties-xml-parser branch April 30, 2025 14:42
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.

1 participant