From 473ba5269292a1870be2a6bcec4d4a38fc032041 Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 02:41:42 +0300 Subject: [PATCH 1/9] [Refactoring] Updated Code Style --- .scrutinizer.yml | 2 +- .travis.yml | 36 ++++++++----------- BundleDependency.php | 5 --- BundleDependencyInterface.php | 1 - .../Compiler/ExtensionLoadPass.php | 4 --- LICENSE | 2 +- README.md | 3 -- Tests/Bundle/FirstBundle/FirstBundle.php | 2 -- Tests/Bundle/FourthBundle/FourthBundle.php | 1 - Tests/Bundle/SecondBundle/SecondBundle.php | 1 - .../DependencyInjection/ThirdExtension.php | 3 -- Tests/Bundle/ThirdBundle/ThirdBundle.php | 4 +-- Tests/BundleTest.php | 2 -- Tests/Fixtures/app/AppKernel.php | 2 -- Tests/Kernel.php | 2 -- Tests/TestCase.php | 2 -- Tests/TraitTest.php | 2 -- composer.json | 9 ++--- 18 files changed, 20 insertions(+), 63 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 96f85f6..181f653 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -12,7 +12,7 @@ build: tests: override: - - command: phpunit --coverage-clover ./clover.xml + command: ./vendor/bin/phpunit --coverage-clover ./clover.xml coverage: file: clover.xml format: clover diff --git a/.travis.yml b/.travis.yml index 2298adc..d9e61be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,25 @@ language: php - sudo: false php: - 5.6 + - 7.0 + - 7.1 + - 7.2 - hhvm +env: + - SYMFONY_VERSION=2.7.* + - SYMFONY_VERSION=2.8.* + - SYMFONY_VERSION=3.0.* + - SYMFONY_VERSION=3.1.* + - SYMFONY_VERSION=3.2.* + - SYMFONY_VERSION=3.3.* + +cache: + directories: + - $HOME/.composer/cache + before_install: - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" < "7.1" ]; then phpenv config-rm xdebug.ini; fi - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv rehash; fi; @@ -17,23 +31,3 @@ install: script: - phpunit - -matrix: - fast_finish: true - include: - - php: 5.6 - env: SYMFONY_VERSION=2.7.* - - php: 5.6 - env: SYMFONY_VERSION=2.8.* - - php: 5.6 - env: SYMFONY_VERSION=3.0.* - - php: 7.0 - env: SYMFONY_VERSION=3.0.* - - php: nightly - env: SYMFONY_VERSION=3.1.* - allow_failures: - - php: hhvm - - php: nightly - -notifications: - email: false diff --git a/BundleDependency.php b/BundleDependency.php index f3e599e..b9f2b1f 100644 --- a/BundleDependency.php +++ b/BundleDependency.php @@ -7,7 +7,6 @@ trait BundleDependency { - /** * @var bool */ @@ -35,8 +34,6 @@ public function build(ContainerBuilder $container) * Register the bundle dependencies. * * @param ContainerBuilder $container - * - * @return void */ protected function registerBundleDependencies(ContainerBuilder $container) { @@ -87,8 +84,6 @@ protected function createBundles(array $dependencies) /** * @param ContainerBuilder $container - * - * @return void */ protected function initializeBundles(ContainerBuilder $container) { diff --git a/BundleDependencyInterface.php b/BundleDependencyInterface.php index 3446ebd..56b862c 100644 --- a/BundleDependencyInterface.php +++ b/BundleDependencyInterface.php @@ -4,7 +4,6 @@ interface BundleDependencyInterface { - /** * Gets the list of bundle dependencies. * diff --git a/DependencyInjection/Compiler/ExtensionLoadPass.php b/DependencyInjection/Compiler/ExtensionLoadPass.php index 1c96921..289eba4 100644 --- a/DependencyInjection/Compiler/ExtensionLoadPass.php +++ b/DependencyInjection/Compiler/ExtensionLoadPass.php @@ -8,7 +8,6 @@ class ExtensionLoadPass implements CompilerPassInterface { - /** * @var array */ @@ -37,8 +36,6 @@ public function process(ContainerBuilder $container) /** * @param Extension $extension * @param ContainerBuilder $container - * - * @return void */ private function loadExtension(Extension $extension, ContainerBuilder $container) { @@ -46,5 +43,4 @@ private function loadExtension(Extension $extension, ContainerBuilder $container $extension->load([], $container); } } - } diff --git a/LICENSE b/LICENSE index 48a4e16..5c8be9a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Symfony Bundles (Dmitry Khaperets) +Copyright (c) 2016-2017 Symfony Bundles (Dmitry Khaperets) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0048a58..6a0869c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,6 @@ use SymfonyBundles\BundleDependency\BundleDependencyInterface; class MyBundle extends Bundle implements BundleDependencyInterface { - use BundleDependency; public function getBundleDependencies() @@ -42,7 +41,6 @@ class MyBundle extends Bundle implements BundleDependencyInterface 'SymfonyBundles\RedisBundle\SymfonyBundlesRedisBundle', ]; } - } ``` @@ -52,7 +50,6 @@ If you want override a method `build`, call the method `registerBundleDependenci public function build(ContainerBuilder $container) { parent::build($container); - // ... $this->registerBundleDependencies($container); diff --git a/Tests/Bundle/FirstBundle/FirstBundle.php b/Tests/Bundle/FirstBundle/FirstBundle.php index 6604174..a93b7bf 100644 --- a/Tests/Bundle/FirstBundle/FirstBundle.php +++ b/Tests/Bundle/FirstBundle/FirstBundle.php @@ -8,7 +8,6 @@ class FirstBundle extends Bundle implements BundleDependencyInterface { - use BundleDependency; public function getBundleDependencies() @@ -18,5 +17,4 @@ public function getBundleDependencies() \SymfonyBundles\BundleDependency\Tests\Bundle\ThirdBundle\ThirdBundle::class, ]; } - } diff --git a/Tests/Bundle/FourthBundle/FourthBundle.php b/Tests/Bundle/FourthBundle/FourthBundle.php index ef719fe..a1f27a5 100644 --- a/Tests/Bundle/FourthBundle/FourthBundle.php +++ b/Tests/Bundle/FourthBundle/FourthBundle.php @@ -6,5 +6,4 @@ class FourthBundle extends Bundle { - } diff --git a/Tests/Bundle/SecondBundle/SecondBundle.php b/Tests/Bundle/SecondBundle/SecondBundle.php index 0cb69bb..3361e47 100644 --- a/Tests/Bundle/SecondBundle/SecondBundle.php +++ b/Tests/Bundle/SecondBundle/SecondBundle.php @@ -6,5 +6,4 @@ class SecondBundle extends Bundle { - } diff --git a/Tests/Bundle/ThirdBundle/DependencyInjection/ThirdExtension.php b/Tests/Bundle/ThirdBundle/DependencyInjection/ThirdExtension.php index e0d8258..373c0eb 100644 --- a/Tests/Bundle/ThirdBundle/DependencyInjection/ThirdExtension.php +++ b/Tests/Bundle/ThirdBundle/DependencyInjection/ThirdExtension.php @@ -7,10 +7,7 @@ class ThirdExtension extends Extension { - public function load(array $configs, ContainerBuilder $container) { - // } - } diff --git a/Tests/Bundle/ThirdBundle/ThirdBundle.php b/Tests/Bundle/ThirdBundle/ThirdBundle.php index ef75e78..0680a0b 100644 --- a/Tests/Bundle/ThirdBundle/ThirdBundle.php +++ b/Tests/Bundle/ThirdBundle/ThirdBundle.php @@ -4,12 +4,11 @@ use Symfony\Component\HttpKernel\Bundle\Bundle; use SymfonyBundles\BundleDependency\BundleDependency; -use SymfonyBundles\BundleDependency\BundleDependencyInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; +use SymfonyBundles\BundleDependency\BundleDependencyInterface; class ThirdBundle extends Bundle implements BundleDependencyInterface { - use BundleDependency; public function build(ContainerBuilder $container) @@ -29,5 +28,4 @@ public function getBundleDependencies() \SymfonyBundles\BundleDependency\Tests\Bundle\FourthBundle\FourthBundle::class, ]; } - } diff --git a/Tests/BundleTest.php b/Tests/BundleTest.php index 58410be..b63f7e8 100644 --- a/Tests/BundleTest.php +++ b/Tests/BundleTest.php @@ -4,7 +4,6 @@ class BundleTest extends TestCase { - public function testBundleExists() { $bundles = $this->container->getParameter('kernel.bundles'); @@ -14,5 +13,4 @@ public function testBundleExists() $this->assertArrayHasKey('ThirdBundle', $bundles); $this->assertArrayHasKey('FourthBundle', $bundles); } - } diff --git a/Tests/Fixtures/app/AppKernel.php b/Tests/Fixtures/app/AppKernel.php index df76d5c..8a318c4 100644 --- a/Tests/Fixtures/app/AppKernel.php +++ b/Tests/Fixtures/app/AppKernel.php @@ -8,7 +8,6 @@ class AppKernel extends Kernel { - public function __construct($environment, $debug) { parent::__construct($environment, $debug); @@ -45,5 +44,4 @@ public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load($this->getRootDir() . '/config/config_test.yml'); } - } diff --git a/Tests/Kernel.php b/Tests/Kernel.php index 2b3ddec..855311e 100644 --- a/Tests/Kernel.php +++ b/Tests/Kernel.php @@ -4,7 +4,6 @@ class Kernel { - /** * @var Fixtures\app\AppKernel */ @@ -23,5 +22,4 @@ public static function make() return static::$instance; } - } diff --git a/Tests/TestCase.php b/Tests/TestCase.php index dc10f38..a4770a9 100644 --- a/Tests/TestCase.php +++ b/Tests/TestCase.php @@ -4,7 +4,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { - /** * @var \Symfony\Component\DependencyInjection\ContainerInterface */ @@ -14,5 +13,4 @@ public function setUp() { $this->container = Kernel::make()->getContainer(); } - } diff --git a/Tests/TraitTest.php b/Tests/TraitTest.php index 04393d7..f349e20 100644 --- a/Tests/TraitTest.php +++ b/Tests/TraitTest.php @@ -6,7 +6,6 @@ class TraitTest extends TestCase { - use BundleDependency; public function testGetBundleDependencies() @@ -20,5 +19,4 @@ public function getBundleDependencies() Bundle\FirstBundle\FirstBundle::class, ]; } - } diff --git a/composer.json b/composer.json index 67cb971..b20adfc 100644 --- a/composer.json +++ b/composer.json @@ -23,16 +23,11 @@ "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.3", - "phpunit/php-code-coverage": "^3.3.0", + "phpunit/phpunit": "^4.8.0|^5.3", + "phpunit/php-code-coverage": "^3.3.0|^4.0", "symfony/framework-bundle": "~2.7|~3.0", "doctrine/annotations": "~1.1" }, - "config": { - "platform": { - "php": "5.6" - } - }, "minimum-stability": "dev", "extra": { "branch-alias": { From 743b7dea2272653295d40966ddc53dfe20d4a081 Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 02:47:47 +0300 Subject: [PATCH 2/9] [Refactoring] Updated Code Style --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b20adfc..7309737 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^4.8.0|^5.3", - "phpunit/php-code-coverage": "^3.3.0|^4.0", + "phpunit/phpunit": "^5.3", + "phpunit/php-code-coverage": "^3.3.0", "symfony/framework-bundle": "~2.7|~3.0", "doctrine/annotations": "~1.1" }, From b08f89507a9efbc62f7a9cc72cb7d78857805060 Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 02:52:59 +0300 Subject: [PATCH 3/9] [Refactoring] Updated Code Style --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7309737..e5a1fea 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "require-dev": { "phpunit/phpunit": "^5.3", - "phpunit/php-code-coverage": "^3.3.0", + "phpunit/php-code-coverage": "^3.3.0|^4.0", "symfony/framework-bundle": "~2.7|~3.0", "doctrine/annotations": "~1.1" }, From d7615880dd6c9af840671cc45113c86e5fd685af Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 03:02:06 +0300 Subject: [PATCH 4/9] [Refactoring] Tested PHPUnit versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e5a1fea..7309737 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "require-dev": { "phpunit/phpunit": "^5.3", - "phpunit/php-code-coverage": "^3.3.0|^4.0", + "phpunit/php-code-coverage": "^3.3.0", "symfony/framework-bundle": "~2.7|~3.0", "doctrine/annotations": "~1.1" }, From ac00dab4492fc6fec3bbc80977929e0269f5f8de Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 03:12:20 +0300 Subject: [PATCH 5/9] [Refactoring] Tested PHPUnit versions --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7309737..20d4f79 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,10 @@ }, "require-dev": { "phpunit/phpunit": "^5.3", - "phpunit/php-code-coverage": "^3.3.0", + "phpunit/php-code-coverage": "^3.3.0|^4.0", "symfony/framework-bundle": "~2.7|~3.0", "doctrine/annotations": "~1.1" }, - "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "1.x-dev" From bdb090c9e9ae97a68fc5b8598547be2e01128f67 Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 03:15:26 +0300 Subject: [PATCH 6/9] Tested PHPUnit versions --- .scrutinizer.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 181f653..96f85f6 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -12,7 +12,7 @@ build: tests: override: - - command: ./vendor/bin/phpunit --coverage-clover ./clover.xml + command: phpunit --coverage-clover ./clover.xml coverage: file: clover.xml format: clover diff --git a/composer.json b/composer.json index 20d4f79..bb7cf0f 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "require-dev": { "phpunit/phpunit": "^5.3", - "phpunit/php-code-coverage": "^3.3.0|^4.0", + "phpunit/php-code-coverage": "^3.3.0", "symfony/framework-bundle": "~2.7|~3.0", "doctrine/annotations": "~1.1" }, From c311281bcb9c6f91e5ef480084414e525cc461c3 Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 04:04:00 +0300 Subject: [PATCH 7/9] [Tests] Tested PHPUnit versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bb7cf0f..20d4f79 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "require-dev": { "phpunit/phpunit": "^5.3", - "phpunit/php-code-coverage": "^3.3.0", + "phpunit/php-code-coverage": "^3.3.0|^4.0", "symfony/framework-bundle": "~2.7|~3.0", "doctrine/annotations": "~1.1" }, From 8f06dba2955cd1515c0c03e00296114e320a3a2d Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 04:11:12 +0300 Subject: [PATCH 8/9] [Tests] Updated Scrutinizer CI configuration --- .scrutinizer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 96f85f6..181f653 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -12,7 +12,7 @@ build: tests: override: - - command: phpunit --coverage-clover ./clover.xml + command: ./vendor/bin/phpunit --coverage-clover ./clover.xml coverage: file: clover.xml format: clover From 74bead19e1058761fcfae8c956a13e17be291473 Mon Sep 17 00:00:00 2001 From: Dmitry Khaperets Date: Tue, 17 Oct 2017 04:18:07 +0300 Subject: [PATCH 9/9] [Tests] Updated Travis CI configuration --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d9e61be..0dc11c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,4 +30,4 @@ install: - composer install script: - - phpunit + - ./vendor/bin/phpunit