From 5113ca17c2391a71e3fafe2622405264d15c9593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mor=C3=A1vek?= Date: Sun, 3 Sep 2017 23:16:38 +0200 Subject: [PATCH 1/5] Drop support for Nette <2.4 --- .travis.yml | 3 +- composer.json | 46 +++++++++---------- src/Kdyby/Autowired/Diagnostics/Panel.php | 4 +- .../Autowired/AutowireComponentFactories.phpt | 2 +- .../Autowired/AutowireProperties.phpt | 6 +-- 5 files changed, 29 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 102b973..1fe340c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,12 +16,11 @@ env: matrix: - NETTE=nette-2.4-dev - NETTE=nette-2.4 - - NETTE=nette-2.3 matrix: include: - php: 5.6 - env: NETTE=nette-2.3 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable" + env: NETTE=nette-2.4 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable" - php: 7.0 env: NETTE=nette-2.4 COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg" exclude: diff --git a/composer.json b/composer.json index d9a2569..8865c01 100644 --- a/composer.json +++ b/composer.json @@ -17,33 +17,33 @@ "issues": "https://github.com/kdyby/autowired/issues" }, "require": { - "nette/di": "~2.3@dev", - "nette/application": "~2.3@dev", - "nette/reflection": "~2.3@dev", - "tracy/tracy": "~2.3@dev" + "nette/di": "~2.4@dev", + "nette/application": "~2.4@dev", + "nette/reflection": "~2.4@dev", + "tracy/tracy": "~2.4@dev" }, "require-dev": { - "nette/application": "~2.3@dev", - "nette/bootstrap": "~2.3@dev", - "nette/caching": "~2.3@dev", - "nette/component-model": "~2.2@dev", - "nette/database": "~2.3@dev", - "nette/deprecated": "~2.3@dev", - "nette/di": "~2.3@dev", - "nette/finder": "~2.3@dev", - "nette/forms": "~2.3@dev", - "nette/http": "~2.3@dev", - "nette/mail": "~2.3@dev", - "nette/neon": "~2.3@dev", - "nette/php-generator": "~2.3@dev", - "nette/reflection": "~2.3@dev", - "nette/robot-loader": "~2.3@dev", + "nette/application": "~2.4@dev", + "nette/bootstrap": "~2.4@dev", + "nette/caching": "~2.5@dev", + "nette/component-model": "~2.3@dev", + "nette/database": "~2.4@dev", + "nette/deprecated": "~2.4@dev", + "nette/di": "~2.4@dev", + "nette/finder": "~2.4@dev", + "nette/forms": "~2.4@dev", + "nette/http": "~2.4@dev", + "nette/mail": "~2.4@dev", + "nette/neon": "~2.4@dev", + "nette/php-generator": "~2.4@dev", + "nette/reflection": "~2.4@dev", + "nette/robot-loader": "~2.4@dev", "nette/safe-stream": "~2.3@dev", - "nette/security": "~2.3@dev", + "nette/security": "~2.4@dev", "nette/tokenizer": "~2.2@dev", - "latte/latte": "~2.3@dev", - "tracy/tracy": "~2.3@dev", - "nette/utils": "~2.3@dev", + "latte/latte": "~2.4@dev", + "tracy/tracy": "~2.4@dev", + "nette/utils": "~2.4@dev", "nette/tester": "~1.7" }, diff --git a/src/Kdyby/Autowired/Diagnostics/Panel.php b/src/Kdyby/Autowired/Diagnostics/Panel.php index 3495113..d30ec7e 100644 --- a/src/Kdyby/Autowired/Diagnostics/Panel.php +++ b/src/Kdyby/Autowired/Diagnostics/Panel.php @@ -21,9 +21,11 @@ /** * @author Filip Procházka */ -class Panel extends Nette\Object +class Panel { + use Nette\SmartObject; + public static function registerBluescreen() { diff --git a/tests/KdybyTests/Autowired/AutowireComponentFactories.phpt b/tests/KdybyTests/Autowired/AutowireComponentFactories.phpt index 6787bbd..b0cfe51 100644 --- a/tests/KdybyTests/Autowired/AutowireComponentFactories.phpt +++ b/tests/KdybyTests/Autowired/AutowireComponentFactories.phpt @@ -143,7 +143,7 @@ class SillyComponent extends Nette\Application\UI\PresenterComponent -class NonPresenterComponent_AcfProperties extends Nette\Object +class NonPresenterComponent_AcfProperties { use Kdyby\Autowired\AutowireComponentFactories; } diff --git a/tests/KdybyTests/Autowired/AutowireProperties.phpt b/tests/KdybyTests/Autowired/AutowireProperties.phpt index 2484801..6f7ae72 100644 --- a/tests/KdybyTests/Autowired/AutowireProperties.phpt +++ b/tests/KdybyTests/Autowired/AutowireProperties.phpt @@ -161,10 +161,6 @@ class AutowirePropertiesTest extends ContainerTestCase public function testTraitUsage() { - if (!method_exists('Nette\Reflection\Helpers', 'getDeclaringClass')) { - Tester\Environment::skip('Correct raits usage requires nette/reflection 2.3.'); - } - $presenter = new WithTraitPresenter(); $this->container->callMethod([$presenter, 'injectProperties']); @@ -230,7 +226,7 @@ class WithMissingServiceFactoryPresenter_ap extends Nette\Application\UI\Present } -class NonPresenterComponent_ap extends Nette\Object +class NonPresenterComponent_ap { use Kdyby\Autowired\AutowireProperties; } From 1e1839e325c43838a0ad7bb0f1a6ea5fc1f58161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mor=C3=A1vek?= Date: Sun, 3 Sep 2017 23:17:37 +0200 Subject: [PATCH 2/5] composer.json: Removed duplicate entries --- composer.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/composer.json b/composer.json index 8865c01..8f52e94 100644 --- a/composer.json +++ b/composer.json @@ -23,26 +23,22 @@ "tracy/tracy": "~2.4@dev" }, "require-dev": { - "nette/application": "~2.4@dev", "nette/bootstrap": "~2.4@dev", "nette/caching": "~2.5@dev", "nette/component-model": "~2.3@dev", "nette/database": "~2.4@dev", "nette/deprecated": "~2.4@dev", - "nette/di": "~2.4@dev", "nette/finder": "~2.4@dev", "nette/forms": "~2.4@dev", "nette/http": "~2.4@dev", "nette/mail": "~2.4@dev", "nette/neon": "~2.4@dev", "nette/php-generator": "~2.4@dev", - "nette/reflection": "~2.4@dev", "nette/robot-loader": "~2.4@dev", "nette/safe-stream": "~2.3@dev", "nette/security": "~2.4@dev", "nette/tokenizer": "~2.2@dev", "latte/latte": "~2.4@dev", - "tracy/tracy": "~2.4@dev", "nette/utils": "~2.4@dev", "nette/tester": "~1.7" From dfa5ec8ae971a7c2ea0aa589b90dfc2c74b6a7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mor=C3=A1vek?= Date: Sun, 3 Sep 2017 23:25:21 +0200 Subject: [PATCH 3/5] Bump minimal requirements versions --- composer.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index 8f52e94..63d6bfe 100644 --- a/composer.json +++ b/composer.json @@ -17,31 +17,31 @@ "issues": "https://github.com/kdyby/autowired/issues" }, "require": { - "nette/di": "~2.4@dev", - "nette/application": "~2.4@dev", - "nette/reflection": "~2.4@dev", - "tracy/tracy": "~2.4@dev" + "nette/di": "^2.4.7@dev", + "nette/application": "^2.4@dev", + "nette/reflection": "^2.4.2@dev", + "tracy/tracy": "^2.4@dev" }, "require-dev": { - "nette/bootstrap": "~2.4@dev", - "nette/caching": "~2.5@dev", - "nette/component-model": "~2.3@dev", - "nette/database": "~2.4@dev", - "nette/deprecated": "~2.4@dev", - "nette/finder": "~2.4@dev", - "nette/forms": "~2.4@dev", - "nette/http": "~2.4@dev", - "nette/mail": "~2.4@dev", - "nette/neon": "~2.4@dev", - "nette/php-generator": "~2.4@dev", - "nette/robot-loader": "~2.4@dev", - "nette/safe-stream": "~2.3@dev", - "nette/security": "~2.4@dev", - "nette/tokenizer": "~2.2@dev", - "latte/latte": "~2.4@dev", - "nette/utils": "~2.4@dev", + "nette/bootstrap": "^2.4@dev", + "nette/caching": "^2.5@dev", + "nette/component-model": "^2.3@dev", + "nette/database": "^2.4@dev", + "nette/deprecated": "^2.4@dev", + "nette/finder": "^2.4@dev", + "nette/forms": "^2.4@dev", + "nette/http": "^2.4.7@dev", + "nette/mail": "^2.4@dev", + "nette/neon": "^2.4@dev", + "nette/php-generator": "^2.4@dev", + "nette/robot-loader": "^2.4@dev", + "nette/safe-stream": "^2.3@dev", + "nette/security": "^2.4@dev", + "nette/tokenizer": "^2.2@dev", + "latte/latte": "^2.4@dev", + "nette/utils": "^2.4.5@dev", - "nette/tester": "~1.7" + "nette/tester": "^1.7" }, "autoload": { "psr-0": { From 50f97236832c7f7ff4edbf70c765dfa68dc9f370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mor=C3=A1vek?= Date: Sun, 3 Sep 2017 23:26:55 +0200 Subject: [PATCH 4/5] travis: run tests against PHP 7.1 and 7.2 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1fe340c..6fecefb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,8 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 + - 7.2 env: matrix: From 78f7822959e35f8ffb051aefbc48b8e1cc59174b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mor=C3=A1vek?= Date: Mon, 30 Oct 2017 22:10:57 +0100 Subject: [PATCH 5/5] Use dev version of code-checker --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6fecefb..85a6cfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ before_install: install: - travis_retry composer update --no-interaction --prefer-dist $COMPOSER_EXTRA_ARGS - travis_retry composer create-project --no-interaction jakub-onderka/php-parallel-lint /tmp/php-parallel-lint - - travis_retry composer create-project --no-interaction kdyby/code-checker /tmp/code-checker + - travis_retry composer create-project --no-interaction kdyby/code-checker:dev-kdyby /tmp/code-checker - travis_retry wget -O /tmp/coveralls.phar https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar script: