Issues

ZF2-472: ReCaptcha throws Fatal error: Class 'ZendService\ReCaptcha\ReCaptcha' not found

Issue Type: Improvement Created: 2012-08-16T14:59:25.000+0000 Last Updated: 2012-08-16T15:13:56.000+0000 Status: Resolved Fix version(s): Reporter: Daniel Müller (damu) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Captcha

  • Error
  • Fatal
  • ReCaptcha,
  • ZendService

Related issues: Attachments:

Description

ReCaptcha references a non-existant class and namespace ZendService\ReCaptcha\ReCaptcha.

Reproduce

<pre class="highlight">
$cap = new \Zend\Captcha\ReCaptcha();
$capElem = new \Zend\Form\Element\Captcha();
$capElem->setCaptcha($cap);

Comments

Posted by Daniel Müller (damu) on 2012-08-16T15:08:29.000+0000

Just realized that this has been exported to another repos. However, it should be communicated somehow that you have to include an extern repos in order to use a core component.

Posted by Matthew Weier O'Phinney (matthew) on 2012-08-16T15:08:39.000+0000

Have you installed ZendService\ReCaptcha? It must be installed in order for that captcha adapter to work.

The repository is here: https://github.com/zendframework/…

You can add it to composer using the package name "zendframework/zendservice-recaptcha", or via pyrus using the package name "zendservicerecaptcha". Alternately, grab a tarball/zipball from the git repository, unpack it, and add autoloader configuration that will pick it up.

Posted by Daniel Müller (damu) on 2012-08-16T15:13:56.000+0000

In case you haven't seen my previous comment, I think it would be helpful to explicitly catch this case and at least throw a customized exception. Thus, the developer will know he failed to install a dependency.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts