Remove broken BC code in Registry#764
Conversation
jtojnar
left a comment
There was a problem hiding this comment.
Looks good – the only way this could work if someone used the Registry newly introduced in f6e63e6 with the legacy class and lowercase name $simplepie->registry->register('locator', $class, true). But as you noticed that is not possible, since the lowercase $type argument would not be a key in the Registry::$defaults property so registration would fail on not finding a parent class to check subclass relationship for.
|
Now, if only we could drop the other legacy alias: 5f107f3#diff-c09efaf19f27f39a1f6829e8ded114062e329cb15f8ce1d65f1f0a6c6bb159bd Unfortunately, that one can be relied on externally so we would need to deprecate it first. While at it, we should probably also deprecate |
I also thought about removing that, but since the whole
The |
|
thanks @Art4 good catch! |
* bump version to 1.8.0 * Update CHANGELOG.md * Fix version tags in deprecated messages * fix version in old deprecation messages * Fix typo see comment from @jtojnar in #752 * Add comment for DataCache interface see comment from @jtojnar in #752 * Update CHANGELOG.md for #760, #764 and #765 * Update CHANGELOG.md for #762, #767 and #763 * Update CHANGELOG.md for #768 and #770 * Update release date * Update CHANGELOG.md for #769 and #771 * Update CHANGELOG.md for #766
While working on the
Registryclass I noted this BC code that actually never worked. It was introduced in f6e63e6 (version 1.3).The code was intended to fix a BC break in the
Locator::__construct()method. But because the switch looks forlocatorinstead of (uppercase)Locatorthere was no chance to register a BC class that matches this requirement. Please note also the wrong lower case in$this->get_class('file')and$this->get_class('content_type_sniffer')that would always returnnullinstead of a class name. Also I could not find any complaints about a BC break for the changed parameter in theLocator::__construct()method.Therefor I propose to remove this BC code, that actually never worked.