Fix backwards compatibility with cache subclasses #243

Merged
merged 7 commits into from Oct 13, 2012

2 participants

@rmccue
SimplePie member

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 12, 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.
5f107f3
@rmccue rmccue Throw a E_USER_DEPRECATED error on old cache method e3c45b1
@rmccue
SimplePie member

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 12, 2012
@rmccue rmccue Add tests for Cache classes
This should ensure that the correct methods are called.
4dcfd46
@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.
7ded6fa
@rmccue rmccue Add CacheTest to AllTests 0e0f117
@rmccue rmccue Rather than changing error_reporting, just suppress
Hopefully this should fix tests on 5.4
f0ea4be
@rmccue
SimplePie member

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

Nice.

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

1 check failed

Details default The Travis build failed
@rmccue
SimplePie member

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