Skip to content

Rename PropertiesXmlParser to DeprecatedPropertiesXmlParser #7939

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

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?

Rename PropertiesXmlParser to DeprecatedPropertiesXmlParser.

Why?

This let me implement a new PropertiesXmlParser which is used for FormXmlLoader without have to refactor also the StructureXmlLoader.

@alexander-schranz alexander-schranz added the Technical Debt Impacts code quality, no or just small impact on end developers and users label May 2, 2025
@alexander-schranz alexander-schranz requested a review from Prokyonn May 2, 2025 14:46
@alexander-schranz alexander-schranz force-pushed the enhancement/rename-DeprecatedPropertiesXmlParser branch from fdf2525 to 95b082f Compare May 2, 2025 14:48
@alexander-schranz alexander-schranz force-pushed the enhancement/rename-DeprecatedPropertiesXmlParser branch from 95b082f to 780ef13 Compare May 2, 2025 15:10
Comment on lines +19 to +26
/**
* @template T of mixed
*
* @param T $default
*
* @return T|bool|int|string|null
*/
private function getValueFromXPath(string $path, \DOMXPath $xpath, ?\DOMNode $context = null, $default = null)
Copy link
Member Author

Choose a reason for hiding this comment

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

improved the PHP Typing here the trait is already internal so needs not documentation in upgrade

@@ -31,7 +31,7 @@ class FormXmlLoader extends AbstractLoader
public const SCHEMA_NAMESPACE_URI = 'http://schemas.sulu.io/template/template';

public function __construct(
private PropertiesXmlParser $propertiesXmlParser,
private DeprecatedPropertiesXmlParser $propertiesXmlParser,
Copy link
Member Author

Choose a reason for hiding this comment

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

here we will do a rewrite of DeprecatedPropertiesXmlParser to PropertiesXmlParser which will directly return new metadata instead of the old one.

@@ -74,7 +74,7 @@ class StructureXmlLoader extends AbstractLoader
*/
public function __construct(
private CacheLifetimeResolverInterface $cacheLifetimeResolver,
private PropertiesXmlParser $propertiesXmlParser,
private DeprecatedPropertiesXmlParser $propertiesXmlParser,
Copy link
Member Author

Choose a reason for hiding this comment

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

the whole service will later be removed after Form and Template loader are implemented.

@alexander-schranz
Copy link
Member Author

@Prokyonn FYI

@alexander-schranz alexander-schranz merged commit cda1424 into sulu:3.0 May 2, 2025
9 checks passed
@alexander-schranz alexander-schranz deleted the enhancement/rename-DeprecatedPropertiesXmlParser branch May 2, 2025 15:30
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