Skip to content
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

CRM_Core_BAO_Cache - Remove functions deprecated a year ago #17989

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jul 29, 2020

Overview

Remove functions deprecated a year ago in the CRM_Core_BAO_Cache class

Before

Screen Shot 2020-07-29 at 12 44 27 PM

Screen Shot 2020-07-29 at 12 42 58 PM

Screen Shot 2020-07-29 at 12 43 57 PM

After

Poof

Technical Details

These have been spitting out deprecation notices for a year

Comments

@civibot
Copy link

civibot bot commented Jul 29, 2020

(Standard links)

@civibot civibot bot added the master label Jul 29, 2020
@eileenmcnaughton eileenmcnaughton force-pushed the cache_deprecate branch 2 times, most recently from c22aa4b to d4341a0 Compare July 29, 2020 00:51
@seamuslee001
Copy link
Contributor

@eileenmcnaughton test fails relate

@totten totten changed the title Remove functions deprecated a year ago CRM_Core_BAO_Cache - Remove functions deprecated a year ago Jul 29, 2020
@totten
Copy link
Member

totten commented Jul 29, 2020

Yeah, a year is a pretty fair wind-down period (esp considering that the transition actually started a few years before the official deprecation).

I did a grep on a recent universe for references to the deprecated CRM_Core_BAO_Cache::setItem, ::getItem, and ::deleteGroup -- and these were the only repos that still needed an update:

The required updates should be pretty simple - i.e. swapping CRM_Core_BAO_Cache with Civi::cache(...), e.g.

  • If you just need to store 1 or 2 bespoke items in a SQL cache, then use Civi::cache('long').
  • If you need to access the cache-group-formally-known-as contact fields, then use Civi::cache('fields').

@eileenmcnaughton
Copy link
Contributor Author

Thanks @totten - I think you ping on top of a year of noisy deprecation notices should be enough. I've fixed the tests

totten added a commit to totten/civicrm-core that referenced this pull request Jul 29, 2020
Overview
--------

The constant `CIVICRM_BAO_CACHE_ADAPTER` was a low-visibility transitional
option added during early 5.x.  It facilitated the deprecation of
`CRM_Core_BAO_Cache` (in favor of `Civi::cache()`).  The option allowed
certain builds/configurations to be tested in a "purer" configuration where
`Civi::cache()` handled all storage.

However, following civicrm#17989, the deprecated functions no longer exist.  Hence,
there's no need for transitional mechanism to support them.  The
replacements are now mainline.

Before
-------

There's some obsolete stuff hanging around.

After
-----

The obsolete stuff is taking a long walk to the moon.
@totten
Copy link
Member

totten commented Jul 31, 2020

Test failure looks unrelated. We've given a small pause on the pings, but I don't really expect pushback, and those new filings by @eileenmcnaughton were good idea.

Merging.

@totten totten merged commit 3e8ffc0 into civicrm:master Jul 31, 2020
totten added a commit to totten/civicrm-core that referenced this pull request Jul 31, 2020
Overview
--------

The constant `CIVICRM_BAO_CACHE_ADAPTER` was a low-visibility transitional
option added during early 5.x.  It facilitated the deprecation of
`CRM_Core_BAO_Cache` (in favor of `Civi::cache()`).  The option allowed
certain builds/configurations to be tested in a "purer" configuration where
`Civi::cache()` handled all storage.

However, following civicrm#17989, the deprecated functions no longer exist.  Hence,
there's no need for transitional mechanism to support them.  The
replacements are now mainline.

Before
-------

There's some obsolete stuff hanging around.

After
-----

The obsolete stuff is taking a long walk to the moon.
@eileenmcnaughton eileenmcnaughton deleted the cache_deprecate branch July 31, 2020 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants