Gregwar / CaptchaBundle

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

Split the Captcha Generation logic #38

Closed Gregwar closed 11 years ago

Gregwar commented 11 years ago

I thought we could create another repository which would only contain the generation logic and be Symfony-independant

This could be done easily by splitting the CaptchaGenerator class, and creating a CaptchaGeneratorService for instance which would inherits from the generator and add Symfony specific logic

@jeremylivingston: what do you think?

I'll wait for your changes to avoid painful conflicts and I think I will work on this

jeremylivingston commented 11 years ago

I think that would be a wise decision. I'm working on the other changes as we speak, so I'll let you know when that is all set.

Thanks!

jeremylivingston commented 11 years ago

While we're breaking this out into a different service, I think that we could also move the garbage collection into a service of its own. This way, we won't need to clutter the generator service with the gcFreq and expiration parameters.

I can work on both of these if you're okay with the changes in the other PR.

Gregwar commented 11 years ago

I'm OK with the other PR and I'll do my best to merge it ASAP

I'm uncertain about the way to handle it, I think the best way would be to create another composer project and add a dependency in the composer.json file (Gregwar\Captcha?)

jeremylivingston commented 11 years ago

Are you looking to retain the previous functionality of the code before the pull request was submitted? If so, you could "tag" the last commit that happened before that version. I would tag the commit as "v.1.0.0" or something so you can use "1.0.0" in composer to pull it down.

Gregwar commented 11 years ago

Fixed by 516046a6b5558fd96832dbb7471afbee157ad593