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

Fix backwards compatibility with cache subclasses #243

Merged
merged 7 commits into from Oct 13, 2012

Conversation

Projects
None yet
2 participants
@rmccue
Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@rmccue

rmccue Oct 11, 2012

Contributor

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.

Contributor

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

Add tests for Cache classes
This should ensure that the correct methods are called.
Ignore E_NOTICE too
Apparently, this throws a notice, not a deprecated error. Who knew.
Rather than changing error_reporting, just suppress
Hopefully this should fix tests on 5.4
@rmccue

This comment has been minimized.

Show comment
Hide comment
@rmccue

rmccue Oct 11, 2012

Contributor

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?

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@nacin

nacin commented Oct 12, 2012

Nice.

rmccue added a commit that referenced this pull request Oct 13, 2012

Merge pull request #243 from simplepie/cache-backwards-compat
Fix backwards compatibility with cache subclasses

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

1 check failed

default The Travis build failed
Details
@rmccue

This comment has been minimized.

Show comment
Hide comment
@rmccue

rmccue Oct 13, 2012

Contributor

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

Contributor

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