Fix backwards compatibility with cache subclasses #243

merged 7 commits into from Oct 13, 2012


None yet

2 participants

rmccue commented Oct 11, 2012

As per nacin, the redefining of Cache::create() as static broke a bunch of stuff when subclassing. This should fix that.

rmccue added some commits Oct 11, 2012
@rmccue rmccue Add Cache::get_handler()
To try and fix compatibility issues, add Cache::get_handler() This is now called instead of Cache::create(), *except* if the cache handler is registered via the legacy method.
@rmccue rmccue Throw a E_USER_DEPRECATED error on old cache method e3c45b1
rmccue commented Oct 11, 2012

SimplePie will use get_handler() if the class is registered via the registry, or create() if created via set_cache_class(). For new cache handlers, they should be using the registry so that the class isn't marked as legacy.

rmccue added some commits Oct 11, 2012
@rmccue rmccue Add tests for Cache classes
This should ensure that the correct methods are called.
@rmccue rmccue Merge branch 'master' into cache-backwards-compat c326e76
@rmccue rmccue Ignore E_NOTICE too
Apparently, this throws a notice, not a deprecated error. Who knew.
@rmccue rmccue Add CacheTest to AllTests 0e0f117
@rmccue rmccue Rather than changing error_reporting, just suppress
Hopefully this should fix tests on 5.4
rmccue commented Oct 11, 2012

Unfortunately, Travis is having some problems with their 5.2 builder, so it's not passing there. Can anyone confirm the tests pass on 5.2?

nacin commented Oct 12, 2012


@rmccue rmccue merged commit e93cbe5 into master Oct 13, 2012

1 check failed

default The Travis build failed
rmccue commented Oct 13, 2012

Also fixed on one-dot-three: 9aa3385, f00f19c, 8b7ffd6, c2915d2, aafb99d, d029efb, e4920d1,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment