Skip to content

Commit

Permalink
bringing in the captcha elements/decorators from zend_form since they…
Browse files Browse the repository at this point in the history
… depend on eachother
  • Loading branch information
jaydiablo committed May 1, 2018
1 parent 93fd1e0 commit ef34f28
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 26 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ branches:
only:
master

before_install:
- travis_retry composer self-update

install:
- phpenv rehash
- travis_retry composer install --no-interaction --prefer-source
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Zend Framework 1 - Captcha
[![Total Downloads](https://poser.pugx.org/diablomedia/zendframework1-captcha/downloads)](https://packagist.org/packages/diablomedia/zendframework1-captcha)
[![License](https://poser.pugx.org/diablomedia/zendframework1-captcha/license)](https://packagist.org/packages/diablomedia/zendframework1-captcha)

This is just the Zend_Captcha component extracted from our fork of the Zend Framework 1 repo (https://github.com/diablomedia/zf1).
This is just the Zend_Captcha, Zend_Form_Element_Captcha and Zend_Form_Decorator_Captcha components extracted from our fork of the Zend Framework 1 repo (https://github.com/diablomedia/zf1).
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"diablomedia/zendframework1-loader": "^1.0.0",
"diablomedia/zendframework1-crypt": "^1.0.0",
"diablomedia/zendframework1-text": "^1.0.0",
"diablomedia/zendframework1-form": "*",
"diablomedia/zendframework1-service-recaptcha": "*",
"diablomedia/zendframework1-session": "*",
"diablomedia/zendframework1-validate": "*",
"diablomedia/zendframework1-view": "*"
"diablomedia/zendframework1-form": "^1.0.0",
"diablomedia/zendframework1-service-recaptcha": "^1.0.0",
"diablomedia/zendframework1-session": "^1.0.0",
"diablomedia/zendframework1-validate": "^1.0.0",
"diablomedia/zendframework1-view": "^1.0.0"
},
"autoload": {
"psr-0": {
Expand All @@ -46,7 +46,7 @@
"scripts": {
"test": "phpunit ./tests",
"test-with-coverage": "phpunit --coverage-clover=clover.xml ./tests",
"phpstan": "phpstan analyze -l7 -c phpstan.neon --no-progress ./src --ansi"
"phpstan": "phpstan analyze -l6 -c phpstan.neon --no-progress ./src --ansi"
},
"suggest": {
"ext-gd": "Used in the Image Captcha"
Expand Down
6 changes: 5 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ parameters:
ignoreErrors:
- '#Casting to int something that.s already int\.#'
- '#Access to an undefined property Zend_Session_Namespace::\$word\.#'
- '#Call to an undefined method Zend_View_Abstract::doctype\(\)\.#'
- '#Call to an undefined method Zend_View_Abstract::doctype\(\)\.#'
- '#Call to an undefined method Zend_View_Interface::.+\(\)\.#'
- '#Call to an undefined method Zend_Form\|Zend_Form_DisplayGroup\|Zend_Form_Element::get.+\(\)\.#'
- '#Parameter \#1 \$name of method Zend_Form_Element::_getDecorator\(\) expects string, array<string, Zend_Captcha_Adapter>\|string given\.#'
- '#Parameter \#2 \$options of method Zend_Form_Element::_getDecorator\(\) expects array\|null, array<string, Zend_Captcha_Adapter>\|string given\.#'
2 changes: 1 addition & 1 deletion src/Zend/Captcha/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getName();
/**
* Get optional private decorator for this captcha type
*
* @return Zend_Form_Decorator_Interface|string
* @return string
*/
public function getDecorator();
}
3 changes: 0 additions & 3 deletions tests/Zend/Form/Decorator/ReCaptchaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
* @version $Id$
*/

require_once 'Zend/Form/Decorator/Captcha/ReCaptcha.php';
require_once 'Zend/Form/Element/Captcha.php';
require_once 'Zend/View.php';

/**
* Test class for Zend_Form_Decorator_Captcha_ReCaptcha
Expand Down
11 changes: 0 additions & 11 deletions tests/Zend/Form/Element/CaptchaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
* @version $Id$
*/

/** Zend_Form_Element_Captcha */
require_once 'Zend/Form/Element/Captcha.php';

/** Zend_Captcha_Dumb */
require_once 'Zend/Captcha/Dumb.php';

/** Zend_Captcha_ReCaptcha */
require_once 'Zend/Captcha/ReCaptcha.php';

/**
* @category Zend
Expand Down Expand Up @@ -121,8 +113,6 @@ public function testSettingCustomCaptchaAdapterPerConstructor()
*/
public function testCaptchaShouldRenderFullyQualifiedElementName()
{
require_once 'Zend/Form.php';
require_once 'Zend/View.php';
$form = new Zend_Form();
$form->addElement($this->element)
->setElementsBelongTo('bar');
Expand Down Expand Up @@ -171,7 +161,6 @@ public function testDefaultDecoratorsShouldIncludeErrorsDescriptionHtmlTagAndLab
*/
public function testHelperDoesNotShowUpInAttribs()
{
require_once 'Zend/View.php';
$this->assertArrayNotHasKey('helper', $this->element->getAttribs());
}

Expand Down

0 comments on commit ef34f28

Please sign in to comment.