diff --git a/.travis.yml b/.travis.yml index b1d61ea6..02106af1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ branches: language: php php: - - '7.1' - '7.2' - '7.3' - '7.4snapshot' @@ -43,12 +42,12 @@ matrix: env: TARGET=docs - php: '7.3' env: TARGET=lint - - php: '7.1' + - php: '7.2' env: COMPOSER_FLAGS="--prefer-lowest" - php: '7.3' - env: SYMFONY=3.4.* + env: SYMFONY=4.4.* - php: '7.3' - env: SYMFONY='dev-master as 3.4.x-dev' + env: SYMFONY='dev-master as 4.4.x-dev' - php: '7.3' env: SONATA_CORE=3.* - php: '7.3' @@ -59,7 +58,7 @@ matrix: - php: 7.4snapshot - php: nightly - env: SYMFONY_DEPRECATIONS_HELPER=0 - - env: SYMFONY='dev-master as 3.4.x-dev' + - env: SYMFONY='dev-master as 4.4.x-dev' - env: SONATA_CORE='dev-master as 3.x-dev' before_install: diff --git a/composer.json b/composer.json index a09cc780..5e6c3526 100644 --- a/composer.json +++ b/composer.json @@ -20,42 +20,38 @@ } ], "require": { - "php": "^7.1", + "php": "^7.2", "doctrine/collections": "^1.6", - "doctrine/common": "^2.3 || ^3.0", + "doctrine/common": "^2.7.1 || ^3.0", "psr/cache": "^1.0", "sonata-project/cache": "^1.0 || ^2.0", - "sonata-project/core-bundle": "^3.15.1", + "sonata-project/core-bundle": "^3.20", "sonata-project/doctrine-extensions": "^1.1", - "symfony/asset": "^2.8 || ^3.2 || ^4.0", - "symfony/config": "^2.8 || ^3.2 || ^4.0", - "symfony/console": "^2.8 || ^3.2 || ^4.0", - "symfony/dependency-injection": "^2.8 || ^3.2 || ^4.0", - "symfony/event-dispatcher": "^2.8 || ^3.2 || ^4.0", - "symfony/form": "^2.8 || ^3.2 || ^4.0", - "symfony/framework-bundle": "^2.8 || ^3.2 || ^4.0", - "symfony/http-foundation": "^2.8 || ^3.2 || ^4.0", - "symfony/http-kernel": "^2.8 || ^3.2 || ^4.0", - "symfony/options-resolver": "^2.8 || ^3.2 || ^4.0", - "symfony/templating": "^2.8 || ^3.2 || ^4.0", - "symfony/twig-bundle": "^2.8 || ^3.2 || ^4.0", - "twig/twig": "^1.34 || ^2.0" - }, - "conflict": { - "jms/di-extra-bundle": "<1.7.0" + "symfony/asset": "^4.3", + "symfony/config": "^4.3", + "symfony/console": "^4.3", + "symfony/dependency-injection": "^4.3", + "symfony/event-dispatcher": "^4.3", + "symfony/form": "^4.3", + "symfony/framework-bundle": "^4.3", + "symfony/http-foundation": "^4.3", + "symfony/http-kernel": "^4.3", + "symfony/options-resolver": "^4.3", + "symfony/templating": "^4.3", + "symfony/twig-bundle": "^4.3", + "twig/twig": "^2.12.1" }, "require-dev": { - "jms/di-extra-bundle": "^1.7", - "knplabs/knp-menu-bundle": "^2.0", - "sonata-project/admin-bundle": "^3.22", - "symfony/debug": "^2.8 || ^3.2 || ^4.0", - "symfony/phpunit-bridge": "^4.2", - "symfony/stopwatch": "^2.8 || ^3.2 || ^4.0" + "knplabs/knp-menu-bundle": "^2.2", + "matthiasnoback/symfony-dependency-injection-test": "^4.1", + "phpspec/prophecy": "^1.10", + "sonata-project/admin-bundle": "^3.28", + "symfony/debug": "^4.3", + "symfony/phpunit-bridge": "^5.0", + "symfony/stopwatch": "^4.3" }, "suggest": { - "jms/di-extra-bundle": "Annotations for Block definition", - "knplabs/knp-menu-bundle": "^2.0", - "sonata-project/cache-bundle": "^3.0" + "knplabs/knp-menu-bundle": "^2.2" }, "config": { "sort-packages": true diff --git a/tests/Block/BlockRendererTest.php b/tests/Block/BlockRendererTest.php index 33c11428..49326ffb 100644 --- a/tests/Block/BlockRendererTest.php +++ b/tests/Block/BlockRendererTest.php @@ -48,7 +48,7 @@ final class BlockRendererTest extends TestCase /** * Setup test object. */ - public function setUp() + public function setUp(): void { $this->blockServiceManager = $this->createMock('Sonata\BlockBundle\Block\BlockServiceManagerInterface'); $this->exceptionStrategyManager = $this->createMock('Sonata\BlockBundle\Exception\Strategy\StrategyManagerInterface'); diff --git a/tests/Block/Service/MenuBlockServiceTest.php b/tests/Block/Service/MenuBlockServiceTest.php index 61d9c41c..0f68ed69 100644 --- a/tests/Block/Service/MenuBlockServiceTest.php +++ b/tests/Block/Service/MenuBlockServiceTest.php @@ -40,7 +40,7 @@ final class MenuBlockServiceTest extends BlockServiceTestCase * * @group legacy */ - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/DependencyInjection/Compiler/AnnotationCompilerPassTest.php b/tests/DependencyInjection/Compiler/AnnotationCompilerPassTest.php deleted file mode 100644 index 991b75a2..00000000 --- a/tests/DependencyInjection/Compiler/AnnotationCompilerPassTest.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Sonata\BlockBundle\Tests\DependencyInjection; - -use JMS\DiExtraBundle\Metadata\ClassMetadata; -use PHPUnit\Framework\TestCase; -use Sonata\BlockBundle\Annotation\Block; - -final class AnnotationCompilerPassTest extends TestCase -{ - public function testMinimalBlock() - { - /* - * @Block() - */ - $annotation = new Block(); - - $meta = new ClassMetadata('Sonata\BlockBundle\Tests\Fixtures\Block\FooBlock'); - - $annotation->processMetadata($meta); - - $this->assertSame( - $meta->tags['sonata.block'][0], - [] - ); - } - - public function testBlock() - { - /* - * @Block() - */ - $annotation = new Block(); - $annotation->id = 'block.test'; - - $meta = new ClassMetadata('Sonata\BlockBundle\Tests\Fixtures\Block\FooBlock'); - - $annotation->processMetadata($meta); - - $this->assertSame( - $meta->tags['sonata.block'][0], - [] - ); - - $this->assertSame( - $meta->id, - 'block.test' - ); - } -} diff --git a/tests/DependencyInjection/Compiler/TweakCompilerPassTest.php b/tests/DependencyInjection/Compiler/TweakCompilerPassTest.php index fbfe939e..69b54405 100644 --- a/tests/DependencyInjection/Compiler/TweakCompilerPassTest.php +++ b/tests/DependencyInjection/Compiler/TweakCompilerPassTest.php @@ -28,7 +28,7 @@ final class TweakCompilerPassTest extends TestCase /** * Setup test object. */ - public function setUp() + public function setUp(): void { $this->container = new ContainerBuilder(); diff --git a/tests/Exception/Strategy/StrategyManagerTest.php b/tests/Exception/Strategy/StrategyManagerTest.php index c6365733..72b3dcd3 100644 --- a/tests/Exception/Strategy/StrategyManagerTest.php +++ b/tests/Exception/Strategy/StrategyManagerTest.php @@ -79,7 +79,7 @@ final class StrategyManagerTest extends TestCase /** * setup a basic scenario to avoid long test setup. */ - public function setUp() + public function setUp(): void { $this->renderer1 = $this->createMock('\Sonata\BlockBundle\Exception\Renderer\RendererInterface'); $this->renderer2 = $this->createMock('\Sonata\BlockBundle\Exception\Renderer\RendererInterface'); diff --git a/tests/Twig/Extension/BlockExtensionTest.php b/tests/Twig/Extension/BlockExtensionTest.php index 20112fa9..2cf3772e 100644 --- a/tests/Twig/Extension/BlockExtensionTest.php +++ b/tests/Twig/Extension/BlockExtensionTest.php @@ -37,7 +37,7 @@ final class BlockExtensionTest extends TestCase */ protected $env; - public function setUp() + public function setUp(): void { $this->blockHelper = $this->getMockBuilder( 'Sonata\BlockBundle\Templating\Helper\BlockHelper'