Skip to content

[DependencyInjection] Renaming ExtensionInterface::getNamespace to avoid conflict with BundleInterface::getNamespace #45607

@alexander-schranz

Description

@alexander-schranz

Description

The BundleInterface and the ExtensionInterface both requires a getNamespace method. But where the Bundle returns the Bundle Namespace, the extension return thing is the xml namespace of the configuration.

As I'm experemting by merging Bundle/Extension/Configuration into a single instance. See example here. It would be great that this would make possible without any conflicts by deprecating the getNamespace on ExtensionInterface and use in future the getXmlNamespace method.

What would you think about this change? Are you open for a PR here?

Example

class MyLibraryBundle extends Bundle implements ExtensionInterface, ConfigurationExtensionInterface, ConfigurationInterface
{
    public function getNamespace(): string
    {
       // returns bundle namespace
    }
    
    public function getXMLNamespace(): string
    {
       // returns xml namespace
    }
}

See also here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions