From e72845b825f0987056610a0aae9443e9e1d74be1 Mon Sep 17 00:00:00 2001 From: AntikCz Date: Sun, 21 Feb 2016 12:59:25 +0100 Subject: [PATCH 1/2] Fixed error with php 5.3.3 in travis --- .travis.yml | 1 - Cronner/DI/CronnerExtension.php | 4 ++-- tests/CronnerTests/Cronner.phpt | 14 +++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3abde67..f895681 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,6 @@ matrix: env: PHP_BIN=php-cgi install: - - composer self-update - composer install --prefer-source --no-interaction --optimize-autoloader before_script: diff --git a/Cronner/DI/CronnerExtension.php b/Cronner/DI/CronnerExtension.php index 15d4a4b..1f246fe 100644 --- a/Cronner/DI/CronnerExtension.php +++ b/Cronner/DI/CronnerExtension.php @@ -97,7 +97,7 @@ public function loadConfiguration() if ($config['bar'] && class_exists('Tracy\Bar')) { $container->addDefinition($this->prefix('bar')) - ->setClass('stekycz\Cronner\Bar\Tasks', [$this->prefix('@runner'), $this->prefix('@timestampStorage')]); + ->setClass('stekycz\Cronner\Bar\Tasks', array($this->prefix('@runner'), $this->prefix('@timestampStorage'))); } } @@ -112,7 +112,7 @@ public function beforeCompile() if ($builder->hasDefinition($this->prefix('bar'))) { $builder->getDefinition('tracy.bar') - ->addSetup('addPanel', [$this->prefix('@bar')]); + ->addSetup('addPanel', array($this->prefix('@bar'))); } } diff --git a/tests/CronnerTests/Cronner.phpt b/tests/CronnerTests/Cronner.phpt index 6ed312d..438da80 100644 --- a/tests/CronnerTests/Cronner.phpt +++ b/tests/CronnerTests/Cronner.phpt @@ -227,9 +227,9 @@ class CronnerTest extends \TestCase public function testAddingTwoTestsWithTheSameNameInOneObject() { - $self = $this; - Assert::exception(function () use ($self) { - $self->cronner->addTasks(new SameTaskNameObject()); + $cronner = $this->cronner; + Assert::exception(function () use ($cronner) { + $cronner->addTasks(new SameTaskNameObject()); }, '\stekycz\Cronner\DuplicateTaskNameException'); } @@ -237,10 +237,10 @@ class CronnerTest extends \TestCase public function testAddingTwoTestsWithTheSameNameInMoreObjects() { - $self = $this; - Assert::exception(function () use ($self) { - $self->cronner->addTasks(new AnotherSimpleTestObject()); - $self->cronner->addTasks(new NextSimpleTestObject()); + $cronner = $this->cronner; + Assert::exception(function () use ($cronner) { + $cronner->addTasks(new AnotherSimpleTestObject()); + $cronner->addTasks(new NextSimpleTestObject()); }, '\stekycz\Cronner\DuplicateTaskNameException'); } From 248537a8120929e596cf1c04ba53401aaf08aafa Mon Sep 17 00:00:00 2001 From: AntikCz Date: Mon, 22 Feb 2016 13:30:14 +0100 Subject: [PATCH 2/2] Revert self-update, added disable-tls to composer.json --- .travis.yml | 1 + composer.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index f895681..3abde67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ matrix: env: PHP_BIN=php-cgi install: + - composer self-update - composer install --prefer-source --no-interaction --optimize-autoloader before_script: diff --git a/composer.json b/composer.json index 6f292c6..c10742a 100644 --- a/composer.json +++ b/composer.json @@ -39,5 +39,8 @@ }, "autoload-dev": { "classmap": ["tests/CronnerTests/objects"] + }, + "config": { + "disable-tls": true } }