Skip to content

Commit

Permalink
Remove eol support, and upgrade most packages (#30)
Browse files Browse the repository at this point in the history
* Remove eol support, and upgrade most packages

* More phpunit 8 deprecation notices to be removed

* Remove duplicate travis builds
  • Loading branch information
mvannes authored Dec 31, 2019
1 parent f57d39d commit 6c00fdc
Show file tree
Hide file tree
Showing 50 changed files with 254 additions and 174 deletions.
26 changes: 14 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@ env:
- COMPOSER_FLAGS="--prefer-stable"

php:
- 7.1
- 7.2
- 7.3

matrix:
include:
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
env: SYMFONY_VERSION="^2.8"
- php: 7.1
env: SYMFONY_VERSION="^3.4"
- php: 7.1
env: SYMFONY_VERSION="^4.0"
- script: vendor/bin/phpcs -n
env: PHPCS_BUILD=1
- php: 7.1
env: COMPOSER_FLAGS="" SYMFONY_VERSION="dev-master"

- php: 7.2
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 7.2
env: SYMFONY_VERSION="^4.0"

- php: 7.3
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 7.3
env: SYMFONY_VERSION="^4.0"

allow_failures:
- php: 7.1
- php: 7.2
env: COMPOSER_FLAGS="" SYMFONY_VERSION="dev-master"
- php: 7.3
env: COMPOSER_FLAGS="" SYMFONY_VERSION="dev-master"

before_install: if [[ "$SYMFONY_VERSION" != "" ]]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
}
],
"require": {
"php": "^5.6||^7.0",
"symfony/form": "^2.7||^3.0||^4.0",
"symfony/http-foundation": "^2.7||^3.0||^4.0"
"php": "^7.2",
"symfony/form": "^4.0",
"symfony/http-foundation": "^4.0"
},
"require-dev": {
"hostnet/phpcs-tool": "^4.1",
"phpunit/phpunit": "^5.4",
"symfony/debug": "^2.7||^3.0||^4.0",
"symfony/phpunit-bridge": "^2.7||^3.0||^4.0"
"hostnet/phpcs-tool": "^8.3.11",
"phpunit/phpunit": "^8.0",
"symfony/debug": "^4.0",
"symfony/phpunit-bridge": "^4.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
5 changes: 2 additions & 3 deletions src/Form/AbstractFormHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form;

use Symfony\Component\Form\FormInterface;

/**
* @author Yannick de Lange <[email protected]>
*/
abstract class AbstractFormHandler implements NamedFormHandlerInterface
{
/**
Expand Down
5 changes: 2 additions & 3 deletions src/Form/Exception/FormNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form\Exception;

use Hostnet\Component\Form\FormHandlerInterface;

/**
* @author Yannick de Lange <[email protected]>
*/
class FormNotFoundException extends \RuntimeException
{
/**
Expand Down
6 changes: 2 additions & 4 deletions src/Form/FormFailureHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form;

use Symfony\Component\HttpFoundation\Request;

/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*/
interface FormFailureHandlerInterface
{
/**
Expand Down
6 changes: 2 additions & 4 deletions src/Form/FormHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form;

use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormTypeInterface;

/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*/
interface FormHandlerInterface
{
/**
Expand Down
6 changes: 2 additions & 4 deletions src/Form/FormProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form;

use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;

/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*/
interface FormProviderInterface
{
/**
Expand Down
5 changes: 2 additions & 3 deletions src/Form/FormSuccesHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form;

@trigger_error(sprintf(
Expand All @@ -11,9 +13,6 @@
), E_USER_DEPRECATED);

/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use {@see FormSuccessHandlerInterface} instead.
*/
interface FormSuccesHandlerInterface extends FormSuccessHandlerInterface
Expand Down
6 changes: 2 additions & 4 deletions src/Form/FormSuccessHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form;

use Symfony\Component\HttpFoundation\Request;

/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*/
interface FormSuccessHandlerInterface
{
/**
Expand Down
5 changes: 2 additions & 3 deletions src/Form/NamedFormHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form;

/**
* @author Yannick de Lange <[email protected]>
*/
interface NamedFormHandlerInterface extends FormHandlerInterface
{
/**
Expand Down
6 changes: 2 additions & 4 deletions src/Form/Simple/SimpleFormProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form\Simple;

use Hostnet\Component\Form\Exception\FormNotFoundException;
Expand All @@ -14,10 +16,6 @@
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;

/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*/
class SimpleFormProvider implements FormProviderInterface
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/ActionSubscriberInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/Exception/InvalidHandlerTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler\Exception;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler\Exception;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/FormSubmitProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Symfony\Component\Form\FormInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Symfony\Component\Form\FormFactoryInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Hostnet\Component\FormHandler\Exception\UnknownSubscribedActionException;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Hostnet\Component\FormHandler\Exception\UnknownSubscribedActionException;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Symfony\Component\Form\FormFactoryInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Hostnet\Component\FormHandler\Exception\InvalidHandlerTypeException;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Symfony\Component\Form\FormInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerRegistryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Hostnet\Component\FormHandler\Exception\InvalidHandlerTypeException;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerTypeAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

use Hostnet\Component\Form\FormFailureHandlerInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\FormHandler;

/**
Expand Down
10 changes: 6 additions & 4 deletions test/Form/AbstractFormHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@
/**
* @copyright 2017 Hostnet B.V.
*/
declare(strict_types=1);

namespace Hostnet\Component\Form\Simple;

use Hostnet\Component\Form\AbstractFormHandler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Form\FormInterface;

/**
* @author Yannick de Lange <[email protected]>
* @covers Hostnet\Component\Form\AbstractFormHandler
* @covers \Hostnet\Component\Form\AbstractFormHandler
*/
class AbstractFormHandlerTest extends \PHPUnit_Framework_TestCase
class AbstractFormHandlerTest extends TestCase
{
private $handler;

public function setUp()
public function setUp(): void
{
$this->handler = $this->getMockForAbstractClass(AbstractFormHandler::class);
}
Expand Down
Loading

0 comments on commit 6c00fdc

Please sign in to comment.