Gregwar / CaptchaBundle

Symfony bundle implementing a "captcha" form type
MIT License
346 stars 126 forks source link

CaptchaType #226

Closed gerMdz closed 2 years ago

gerMdz commented 2 years ago

deprecation

Symfony 5.4.1 gregwar/captcha-bundle: 2.1.5

Since symfony/framework-bundle 5.3: The "session" service and "SessionInterface" alias are deprecated, use "$requestStack->getSession()" instead. It is being referenced by the "gregwar_captcha.type" service.

Hi. Is there a way to fix it without touching the vendor class?

Gregwar commented 2 years ago

Hello This is done, tagged v2.1.7

Gregwar commented 2 years ago

Thanks for reporting

gerMdz commented 2 years ago

Thank you for your time

bretrzaun commented 2 years ago

This drops Symfony 4 compatibility :-(

Error: Call to undefined method Symfony\Component\HttpFoundation\RequestStack::getSession()

/var/www/vendor/gregwar/captcha-bundle/Type/CaptchaType.php:48
Gregwar commented 2 years ago

You are right, we should adjust the table here accordingly: https://github.com/Gregwar/CaptchaBundle#compatibility-with-symfony

Can you confirm it's ok if you use v2.1.5 ?

bretrzaun commented 2 years ago

v2.1.5 works fine.

Doing this in a bugfix release is probably not a good idea. This would prevent you from creating further fixes for Symfony-4- compatible versions.

Gregwar commented 2 years ago

Ok, here is what I suggest:

Does it sounds good to you ?

bretrzaun commented 2 years ago

Yes - sounds good to me.

Gregwar commented 2 years ago

Ok it's done, now on v2.2.0

Gregwar commented 2 years ago

(Plus edited composer.json) If you can give it a try, tell me if it installs correctly on Sf4

bretrzaun commented 2 years ago

https://github.com/Gregwar/CaptchaBundle/blob/v2.2.0/composer.json still allows Symfony 4, so it still updates to that version.

bretrzaun commented 2 years ago

The 2.1.7 release is also still available from packagist: https://packagist.org/packages/gregwar/captcha-bundle#v2.1.7

Gregwar commented 2 years ago

You are right It should be fine now, I bumped v2.2.0 that is no longer compatible with Sf4 and removed irrelevant versions from packagist as well