Leaseweb / LswMemcacheBundle

Symfony bundle for Memcache Doctrine caching and session storage in the Web Debug Toolbar.
MIT License
202 stars 57 forks source link

User Deprecated Symfony 4.0 #101

Open allfreelancers opened 6 years ago

allfreelancers commented 6 years ago

User Deprecated: Implementing "Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "Lsw\MemcacheBundle\DataCollector\MemcacheDataCollector".

mevdschee commented 6 years ago

Good find, thank you. What do you propose? Can you do a PR?

allfreelancers commented 6 years ago

@mevdschee What does PR mean?

mevdschee commented 6 years ago

@allfreelancers ... sorry about the acronym.. I meant a Pull Request.

allfreelancers commented 6 years ago

@mevdschee ok, a little later I will do

GabrielAnca commented 6 years ago

Hi @allfreelancers. We would be very happy if you want to contribute about this issue. You can use these two pull requests as reference, they fixed the same issue in other of our bundles:

Best regards

allfreelancers commented 6 years ago

@GabrielAnca, in Lsw\MemcacheBundle\DataCollector\MemcacheDataCollector we can add this?

public function reset()
{
  $this->data = [];
}
GabrielAnca commented 6 years ago

Hi @allfreelancers, if you do that, it will most likely remove the warnings.

Please use array() instead of [] to keep backwards compatibility :)

tobias-93 commented 4 years ago

For anyone looking for a Symfony 4 compatible version of this bundle: I have forked the bundle and applied the patches necessary for Symfony 4 here: https://github.com/Kick-In/LswMemcacheBundle. Use "kick-in/memcache-bundle": "~v3.0" as composer constraint.