Skip to content

Commit

Permalink
Merge branch 'release/2.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Jan 21, 2021
2 parents 1a5b570 + 95057b0 commit d6cd255
Show file tree
Hide file tree
Showing 22 changed files with 2,306 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
/composer.lock
/vendor/

# Composer bin plugin
/vendor-bin/**/vendor

# Eclipse
/.buildpath
/.project
Expand Down
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ before_install:
if [[ "$COVERAGE" != "1" && -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]]; then
phpenv config-rm xdebug.ini
fi
# Set Xdebug mode for coverage.
- export XDEBUG_MODE=coverage
# Raise PHP memory limit to 2048MB
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Validate composer.json file.
Expand All @@ -72,6 +74,10 @@ install:
- composer self-update
# Install Composer packages.
- composer install
# PHPStan
- if [ "$PHPSTAN" == "1" ]; then composer bin phpstan install; fi
# Psalm
- if [ "$PSALM" == "1" ]; then composer bin psalm install; fi
# Test on specific WordPress version.
- composer require --dev --update-with-dependencies roots/wordpress:${WP_VERSION} wp-phpunit/wp-phpunit:${WP_VERSION}
# List available packages.
Expand All @@ -87,9 +93,9 @@ script:
# PHP Mess Detector
- if [ "$PHPMD" == "1" ]; then composer run-script phpmd; fi
# PHPStan
- if [ "$PHPSTAN" == "1" ]; then phpstan analyze; fi
- if [ "$PHPSTAN" == "1" ]; then composer run-script phpstan; fi
# Psalm
- if [ "$PSALM" == "1" ]; then psalm; fi
- if [ "$PSALM" == "1" ]; then composer run-script psalm; fi

after_success:
- if [ "$COVERAGE" == "1" ]; then composer run-script coveralls; fi
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## [Unreleased][unreleased]
-

## [2.2.1] - 2021-01-21
- Fixed using undefined variable.
- Removed debug code.

## [2.2.0] - 2021-01-14
- Simplified icon hover style.
- Updated form action icon.
Expand Down Expand Up @@ -55,7 +59,8 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## 1.0.0 - 2015-11-05
- First release.

[unreleased]: https://github.com/wp-pay-extensions/formidable-forms/compare/2.2.0...HEAD
[unreleased]: https://github.com/wp-pay-extensions/formidable-forms/compare/2.2.1...HEAD
[2.2.1]: https://github.com/wp-pay-extensions/formidable-forms/compare/2.2.0...2.2.1
[2.2.0]: https://github.com/wp-pay-extensions/formidable-forms/compare/2.1.4...2.2.0
[2.1.4]: https://github.com/wp-pay-extensions/formidable-forms/compare/2.1.3...2.1.4
[2.1.3]: https://github.com/wp-pay-extensions/formidable-forms/compare/2.1.2...2.1.3
Expand Down
15 changes: 10 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,28 @@
"wp-pay/core": "^2.6"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"php-coveralls/php-coveralls": "^2.1",
"bamarni/composer-bin-plugin": "^1.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"php-coveralls/php-coveralls": "^2.4",
"phpcompatibility/php-compatibility": "^9.1",
"phpcompatibility/phpcompatibility-wp": "^2.0",
"phpmd/phpmd": "^2.7",
"phpunit/phpunit": "^5.7 || ^6.0",
"roots/wordpress": "^5.6",
"squizlabs/php_codesniffer": "^3.4",
"wp-coding-standards/wpcs": "^2.1",
"wp-coding-standards/wpcs": "^2.3",
"wp-phpunit/wp-phpunit": "^5.6"
},
"scripts": {
"coveralls": "vendor/bin/coveralls -v",
"coveralls": "vendor/bin/php-coveralls -v",
"phpcbf": "vendor/bin/phpcbf",
"phpcs": "vendor/bin/phpcs -s -v",
"phplint": "find src tests -name '*.php' | xargs -n 1 -P 4 php -l",
"phpmd": "vendor/bin/phpmd src,tests text phpmd.ruleset.xml --suffixes php",
"phpunit": "vendor/bin/phpunit"
"phpstan": "vendor/bin/phpstan analyse",
"phpunit": "vendor/bin/phpunit",
"post-install-cmd": "echo 'Optionally run: composer bin all install'",
"post-update-cmd": "echo 'Optionally run: composer bin all update'",
"psalm": "vendor/bin/psalm"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "formidable-forms",
"version": "2.2.0",
"version": "2.2.1",
"description": "Formidable Forms driver for the WordPress payment processing library.",
"repository": {
"type": "git",
Expand Down
7 changes: 5 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
includes:
- vendor-bin/phpstan/vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
customRulesetUsed: false
level: max
bootstrap: tests/bootstrap.php
bootstrapFiles:
- tests/phpstan/bootstrap.php
paths:
- src
- src/
1 change: 0 additions & 1 deletion psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<MissingReturnType errorLevel="info" />
<MissingPropertyType errorLevel="info" />
<InvalidDocblock errorLevel="info" />
<MisplacedRequiredParam errorLevel="info" />

<PropertyNotSetInConstructor errorLevel="info" />
<MissingConstructor errorLevel="info" />
Expand Down
2 changes: 1 addition & 1 deletion src/BankSelectFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Title: Formidable Forms bank select field type
* Description:
* Copyright: 2005-2020 Pronamic
* Copyright: 2005-2021 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down
6 changes: 3 additions & 3 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Title: Formidable Forms extension
* Description:
* Copyright: 2005-2020 Pronamic
* Copyright: 2005-2021 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down Expand Up @@ -360,7 +360,7 @@ public function redirect_for_payment( $entry_id, $form_id ) {
}

$entry = \FrmEntry::getOne( $entry_id, true );
var_dump( $entry );exit;

/**
* Build payment.
*/
Expand Down Expand Up @@ -404,7 +404,7 @@ public function redirect_for_payment( $entry_id, $form_id ) {
}

if ( empty( $payment->method ) ) {
if ( null !== $data->get_issuer_id() ) {
if ( null !== FormidableFormsHelper::get_issuer_from_form_entry( $form_id, $entry ) ) {
$payment->method = PaymentMethods::IDEAL;
} elseif ( $gateway->payment_method_is_required() ) {
$payment->method = PaymentMethods::IDEAL;
Expand Down
2 changes: 1 addition & 1 deletion src/FormidableForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Title: WordPress pay Formidable Forms
* Description:
* Copyright: 2005-2020 Pronamic
* Copyright: 2005-2021 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down
2 changes: 1 addition & 1 deletion src/FormidableFormsDependency.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Formidable Forms Dependency
*
* @author Pronamic <[email protected]>
* @copyright 2005-2020 Pronamic
* @copyright 2005-2021 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Extensions\FormidableForms
*/
Expand Down
2 changes: 1 addition & 1 deletion src/FormidableFormsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Formidable Forms Helper
*
* @author Pronamic <[email protected]>
* @copyright 2005-2020 Pronamic
* @copyright 2005-2021 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Extensions\FormidableForms
*/
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Title: Formidable Forms payment action
* Description:
* Copyright: 2005-2020 Pronamic
* Copyright: 2005-2021 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentMethodSelectFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Title: Formidable Forms payment method select field type
* Description:
* Copyright: 2005-2020 Pronamic
* Copyright: 2005-2021 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Bootstrap tests
*
* @author Pronamic <[email protected]>
* @copyright 2005-2020 Pronamic
* @copyright 2005-2021 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Extensions\FormidableForms
*/
Expand Down
11 changes: 11 additions & 0 deletions tests/phpstan/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Definitions for PHPStan.
*
* @author Pronamic <[email protected]>
* @copyright 2005-2021 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay
*/

define( 'SCRIPT_DEBUG', true );
2 changes: 1 addition & 1 deletion tests/src/FormidableFormsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Title: WordPress pay Formidable Forms test
* Description:
* Copyright: 2005-2020 Pronamic
* Copyright: 2005-2021 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down
6 changes: 6 additions & 0 deletions vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"require-dev": {
"phpstan/phpstan": "^0.12",
"szepeviktor/phpstan-wordpress": "^0.7"
}
}
Loading

0 comments on commit d6cd255

Please sign in to comment.