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

Mark ClassCache pattern as deprecated #118

Merged
merged 2 commits into from
Jul 11, 2021

Conversation

boesing
Copy link
Member

@boesing boesing commented May 24, 2021

Q A
QA yes

Description

As recommended by @marc-mabe in #107, we mark the ClassCache as deprecated as of v2.12.

@boesing boesing added this to the 2.12.0 milestone May 24, 2021
@marc-mabe
Copy link
Contributor

It should be marked as deprecated in documentation as well : https://github.com/laminas/laminas-cache/blob/2.12.x/docs/book/pattern/class-cache.md

@marc-mabe
Copy link
Contributor

Probably also trigger a deprecation notice on class loading or initializing ?

@boesing
Copy link
Member Author

boesing commented May 25, 2021

Ive thought it would be a good thing as well when introducing the new Interfaces for plugins but there, the notice was only triggered when upstream did not implemented the AbstractStorage. In this case, it would trigger like always as it is a manual pick.

There were some complaints from @Ocramius about having runtime effects in deprecations and thus I try to avoid these now as I see the point.
Since the class will only be removed in the next major, I think it will be fine. Updating to a new major should be a process where the migration documentation should be used and thus I have to add this there.

Actually, there is not even an alternative to this and thus no way of fixing the deprecation message unless someone copys the code and removes the message.

What do you think?

@marc-mabe
Copy link
Contributor

Fine for me. At least the current documentation and (upcoming) migration guide should include this deprecation/removal.

@boesing
Copy link
Member Author

boesing commented Jun 3, 2021

@froschdesign Is there some "standard" to mark something as deprecated in the documentation?

@froschdesign
Copy link
Member

froschdesign commented Jun 3, 2021

@boesing
We use a blockquote for this. Example:

# ClassCache

> ### Deprecated
>
> The `ClassCache` pattern is deprecated…

The block should be placed directly after the headline. It would be good if an alternative with a link could be added.

@boesing
Copy link
Member Author

boesing commented Jun 6, 2021

@froschdesign Sadly, there is no alternative yet. I am thinking about creating a pattern which can be used in combination with PSR-6 to have such cache logic again but that is not yet implemented.

@boesing boesing force-pushed the qa/deprecate-classcache-pattern branch 2 times, most recently from f270508 to 944d7ed Compare June 6, 2021 12:09
@boesing boesing force-pushed the qa/deprecate-classcache-pattern branch 2 times, most recently from 944d7ed to dc83482 Compare July 11, 2021 11:35
boesing added 2 commits July 11, 2021 13:43
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing force-pushed the qa/deprecate-classcache-pattern branch from dc83482 to 73f4eb5 Compare July 11, 2021 11:44
@boesing boesing merged commit 7d4a6a5 into laminas:2.12.x Jul 11, 2021
@boesing boesing deleted the qa/deprecate-classcache-pattern branch July 11, 2021 11:47
@boesing boesing changed the title qa: mark ClassCache pattern as deprecated Mark ClassCache pattern as deprecated Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants