From fdf6d21d8487edda3061a55213effcd8e9afe9dc Mon Sep 17 00:00:00 2001
From: Fotis Papadopoulos <fot2803@hotmail.com>
Date: Fri, 23 Oct 2015 15:59:40 +0300
Subject: [PATCH 01/10] Removed OS X related if-else's

---
 scripts/install.sh | 60 +++++++++++++++++++---------------------------
 1 file changed, 25 insertions(+), 35 deletions(-)

diff --git a/scripts/install.sh b/scripts/install.sh
index 433f810..3ea0f2b 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -4,26 +4,25 @@ set -e
 
 PACKAGENAME=builder
 
-if [[ "$OSTYPE" == "linux-gnu" ]]; then
-	echo "Configuring environment for Linux"
-	# Make sure we have up-to-date stuff
-    sudo apt-get update
-	if [[ ! $TRAVIS ]]; then
-		# Ubuntu Server (on AWS?) lacks UTF-8 for some reason. Give it that
-		sudo locale-gen en_US.UTF-8
-		sudo apt-get install -y php5-intl
-	fi
-	# Install dependencies
-	sudo apt-get install -y apache2 libapache2-mod-php5 php-pear php5-curl php5-sqlite php5-mysql acl curl git
-	# Enable Apache configs
-	sudo a2enmod rewrite
-    sudo a2enmod alias
-    # Restart Apache
-    sudo service apache2 restart
-elif [[ "$OSTYPE" == "darwin"* ]]; then
-	# is there something comparable to this on os x? perhaps Homebrew
-	echo "Configuring environment for OS X (to be added..)"
+if [[ "$OSTYPE" != "linux-gnu" ]]; then
+    echo "Only Linux environment is supported"
 fi
+echo "Configuring environment for Linux"
+# Make sure we have up-to-date stuff
+sudo apt-get update
+if [[ ! $TRAVIS ]]; then
+    # Ubuntu Server (on AWS?) lacks UTF-8 for some reason. Give it that
+    sudo locale-gen en_US.UTF-8
+    sudo apt-get install -y php5-intl
+fi
+# Install dependencies
+sudo apt-get install -y apache2 libapache2-mod-php5 php-pear php5-curl php5-sqlite php5-mysql acl curl git
+# Enable Apache configs
+sudo a2enmod rewrite
+sudo a2enmod alias
+# Restart Apache
+sudo service apache2 restart
+
 
 if [[ ! $TRAVIS ]]; then
 
@@ -47,23 +46,14 @@ cd /opt/codebender/$PACKAGENAME
 rm -rf Symfony/app/cache/*
 rm -rf Symfony/app/logs/*
 
-if [[ "$OSTYPE" == "linux-gnu" ]]; then
-
-	if [[ ! $TRAVIS ]]; then
-	    # Need to create cache and logs directories, as they do not pre-exist in new deployments
-	    mkdir -p `pwd`/Symfony/app/cache/
-		mkdir -p `pwd`/Symfony/app/logs/
-
-        # Set access control for both apache and current user on cache and logs directories
-		sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX `pwd`/Symfony/app/cache `pwd`/Symfony/app/logs
-		sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx `pwd`/Symfony/app/cache `pwd`/Symfony/app/logs
-	fi
-
-elif [[ "$OSTYPE" == "darwin"* ]]; then
+if [[ ! $TRAVIS ]]; then
+    # Need to create cache and logs directories, as they do not pre-exist in new deployments
+    mkdir -p `pwd`/Symfony/app/cache/
+    mkdir -p `pwd`/Symfony/app/logs/
 
-	HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1`
-	sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" Symfony/app/cache Symfony/app/logs
-	sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" Symfony/app/cache Symfony/app/logs
+    # Set access control for both apache and current user on cache and logs directories
+    sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX `pwd`/Symfony/app/cache `pwd`/Symfony/app/logs
+    sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx `pwd`/Symfony/app/cache `pwd`/Symfony/app/logs
 fi
 
 cd Symfony

From ab4e2b269949b299985f5800f00aa0499a3dfec1 Mon Sep 17 00:00:00 2001
From: Fotis Papadopoulos <fot2803@hotmail.com>
Date: Fri, 23 Oct 2015 16:06:18 +0300
Subject: [PATCH 02/10] Updated the method that adds user- and project- ids to
 the request and renamed it

---
 .../Controller/DefaultController.php           | 15 ++++-----------
 .../Controller/DefaultControllerUnitTest.php   | 18 +++++++++---------
 2 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php b/Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php
index 969fb51..1bd8a1c 100644
--- a/Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php
+++ b/Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php
@@ -87,7 +87,7 @@ protected function compile($contents)
     {
         $apiHandler = $this->get('codebender_builder.handler');
 
-        $contents = $this->checkForUserIdProjectId($contents);
+        $contents = $this->addUserIdProjectIdIfNotInRequest($contents);
 
         $files = $contents["files"];
 
@@ -210,17 +210,10 @@ protected function returnProvidedAndFetchedLibraries($projectFiles, $userLibrari
       * @param array $requestContents
       * @return array
       */
-    protected function checkForUserIdProjectId($requestContents)
+    protected function addUserIdProjectIdIfNotInRequest($requestContents)
     {
-        if (!array_key_exists('userId', $requestContents)) {
-            $requestContents['userId'] = 'null';
-        }
-
-        if (!array_key_exists('projectId', $requestContents)) {
-            $requestContents['projectId'] = 'null';
-        }
-
-        return $requestContents;
+        $nullDefaults = ['userId' => 'null', 'projectId' => 'null'];
+        return array_merge($nullDefaults, (array)$requestContents);
     }
 }
 
diff --git a/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php b/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php
index 2df3d13..fd418ea 100644
--- a/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php
+++ b/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php
@@ -158,7 +158,7 @@ public function testCompileNonJsonCompilerResponse() {
         // Override previous controller mock. More class member functions need to get mocked.
         $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController')
             ->disableOriginalConstructor()
-            ->setMethods(['get', 'getRequest', 'checkForUserIdProjectId', 'returnProvidedAndFetchedLibraries'])
+            ->setMethods(['get', 'getRequest', 'addUserIdProjectIdIfNotInRequest', 'returnProvidedAndFetchedLibraries'])
             ->getMock();
 
         $controller->setContainer($container);
@@ -170,7 +170,7 @@ public function testCompileNonJsonCompilerResponse() {
 
         $controller->expects($this->at(0))->method('get')->with('codebender_builder.handler')
             ->willReturn($apiHandler);
-        $controller->expects($this->at(1))->method('checkForUserIdProjectId')->with(['files' => []])
+        $controller->expects($this->at(1))->method('addUserIdProjectIdIfNotInRequest')->with(['files' => []])
             ->willReturn(['files' => []]);
         $controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with([])
             ->willReturn(['libraries' => []]);
@@ -191,7 +191,7 @@ public function testCompileFalseCompilationWithoutStepIncluded() {
         // Override previous controller mock. More class member functions need to get mocked.
         $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController')
             ->disableOriginalConstructor()
-            ->setMethods(['get', 'getRequest', 'checkForUserIdProjectId', 'returnProvidedAndFetchedLibraries'])
+            ->setMethods(['get', 'getRequest', 'addUserIdProjectIdIfNotInRequest', 'returnProvidedAndFetchedLibraries'])
             ->getMock();
 
         $controller->setContainer($container);
@@ -203,7 +203,7 @@ public function testCompileFalseCompilationWithoutStepIncluded() {
 
         $controller->expects($this->at(0))->method('get')->with('codebender_builder.handler')
             ->willReturn($apiHandler);
-        $controller->expects($this->at(1))->method('checkForUserIdProjectId')->with(['files' => []])
+        $controller->expects($this->at(1))->method('addUserIdProjectIdIfNotInRequest')->with(['files' => []])
             ->willReturn(['files' => []]);
         $controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with([])
             ->willReturn(['libraries' => []]);
@@ -228,7 +228,7 @@ public function testCompileFalseCompilationWithStepIncluded() {
         // Override previous controller mock. More class member functions need to get mocked.
         $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController')
             ->disableOriginalConstructor()
-            ->setMethods(['get', 'getRequest', 'checkForUserIdProjectId', 'returnProvidedAndFetchedLibraries'])
+            ->setMethods(['get', 'getRequest', 'addUserIdProjectIdIfNotInRequest', 'returnProvidedAndFetchedLibraries'])
             ->getMock();
 
         $controller->setContainer($container);
@@ -240,7 +240,7 @@ public function testCompileFalseCompilationWithStepIncluded() {
 
         $controller->expects($this->at(0))->method('get')->with('codebender_builder.handler')
             ->willReturn($apiHandler);
-        $controller->expects($this->at(1))->method('checkForUserIdProjectId')->with(['files' => []])
+        $controller->expects($this->at(1))->method('addUserIdProjectIdIfNotInRequest')->with(['files' => []])
             ->willReturn(['files' => []]);
         $controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with([])
             ->willReturn(['libraries' => []]);
@@ -435,7 +435,7 @@ public function testcheckUserIdProjectIdHasNone() {
         /*
          * Use ReflectionMethod class to make compile protected function accessible from current context
          */
-        $function = $this->getMethod('checkForUserIdProjectId');
+        $function = $this->getMethod('addUserIdProjectIdIfNotInRequest');
 
         $requestContent = ['files' => [['filename' => 'project.ino', 'content' =>'']]];
 
@@ -451,7 +451,7 @@ public function testcheckUserIdProjectIdHasOnlyUserId() {
         /*
          * Use ReflectionMethod class to make compile protected function accessible from current context
          */
-        $function = $this->getMethod('checkForUserIdProjectId');
+        $function = $this->getMethod('addUserIdProjectIdIfNotInRequest');
 
         $requestContent = ['userId' => 1, 'files' => [['filename' => 'project.ino', 'content' =>'']]];
 
@@ -467,7 +467,7 @@ public function testcheckUserIdProjectIdHasOnlyProjectId() {
         /*
          * Use ReflectionMethod class to make compile protected function accessible from current context
          */
-        $function = $this->getMethod('checkForUserIdProjectId');
+        $function = $this->getMethod('addUserIdProjectIdIfNotInRequest');
 
         $projectFiles = ['projectId' => 1, 'files' => [['filename' => 'project.ino', 'content' =>'']]];
 

From 02246b321557d56754a5756dd36dc3414bc55c5b Mon Sep 17 00:00:00 2001
From: Fotis Papadopoulos <fot2803@hotmail.com>
Date: Fri, 23 Oct 2015 16:08:32 +0300
Subject: [PATCH 03/10] Renamed apache configuration file

---
 apache-config => apache-config-2.4 | 0
 scripts/apache_install.sh          | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename apache-config => apache-config-2.4 (100%)

diff --git a/apache-config b/apache-config-2.4
similarity index 100%
rename from apache-config
rename to apache-config-2.4
diff --git a/scripts/apache_install.sh b/scripts/apache_install.sh
index 81040b3..80f1448 100644
--- a/scripts/apache_install.sh
+++ b/scripts/apache_install.sh
@@ -5,7 +5,7 @@ set -e
 PACKAGENAME=builder
 
 sudo ln -s /opt/codebender/$PACKAGENAME/Symfony/web /var/www/$PACKAGENAME
-sudo cp /opt/codebender/$PACKAGENAME/apache-config /etc/apache2/sites-available/codebender-$PACKAGENAME
+sudo cp /opt/codebender/$PACKAGENAME/apache-config-2.4 /etc/apache2/sites-available/codebender-$PACKAGENAME
 cd /etc/apache2/sites-enabled
 sudo ln -s ../sites-available/codebender-$PACKAGENAME 00-codebender.conf
 sudo service apache2 restart
\ No newline at end of file

From 34e641a8532637d6453f55863c8ad19add648b0e Mon Sep 17 00:00:00 2001
From: Fotis Papadopoulos <fot2803@hotmail.com>
Date: Fri, 23 Oct 2015 16:15:54 +0300
Subject: [PATCH 04/10] Added separate installation/configuration scripts for
 Travis (still PHP 5.5.9)

---
 .travis.yml                      | 20 ++++----------
 apache-config-2.2                |  9 ++++++
 scripts/travis_apache_install.sh | 11 ++++++++
 scripts/travis_install.sh        | 47 ++++++++++++++++++++++++++++++++
 4 files changed, 73 insertions(+), 14 deletions(-)
 create mode 100644 apache-config-2.2
 create mode 100644 scripts/travis_apache_install.sh
 create mode 100644 scripts/travis_install.sh

diff --git a/.travis.yml b/.travis.yml
index 2810d41..2936568 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,6 @@
 language: php
 php:
-#  - 5.5
-#  - 5.4
-  - 5.3
-
-#before_install:
-#  - sudo apt-get update
+  - 5.5.9
 
 env:
   global:
@@ -15,14 +10,14 @@ env:
     - secure: "XRsqGDqdu5uhdj2lF4SZ6qv6Y0PdcRPcvE13XvVGnIYRZaITelP3eJNSvLPO+Q5k4mBmKCz8t+ws/OVRRwSAXYaKe0Z8ZXgEcNyo1nEwGekC35mTuG1FFfB/pbuBp5/OWjw6bgz2tEHhKuFIbHytpT9zJQYy+D07rzOYeUsZjOY="
 
 before_script:
-  - sudo chmod +x scripts/install.sh
-  - scripts/install.sh
+  - sudo chmod +x scripts/travis_install.sh
+  - scripts/travis_install.sh
   - cd /opt/codebender/builder/Symfony
   - sudo chmod -R 777 app/cache app/logs
-  - echo 'error_reporting =  E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
+  - echo 'error_reporting =  E_ALL' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
   - cd /opt/codebender/builder
-  - sudo chmod +x scripts/apache_install.sh
-  - scripts/apache_install.sh
+  - sudo chmod +x scripts/travis_apache_install.sh
+  - scripts/travis_apache_install.sh
   - cd /opt/codebender/builder/Symfony
 
 script:
@@ -37,6 +32,3 @@ after_script:
 
 notifications:
   irc: "chat.freenode.net#codebender.cc"
-#  email:
-#    recipients:
-#      - girder@codebender.cc
diff --git a/apache-config-2.2 b/apache-config-2.2
new file mode 100644
index 0000000..60dee98
--- /dev/null
+++ b/apache-config-2.2
@@ -0,0 +1,9 @@
+<VirtualHost *:80>
+	DocumentRoot /var/www
+	<Directory /var/www/>
+		Options -Indexes FollowSymLinks MultiViews
+		AllowOverride All
+		Order allow,deny
+		Allow from all
+	</Directory>
+</VirtualHost>
diff --git a/scripts/travis_apache_install.sh b/scripts/travis_apache_install.sh
new file mode 100644
index 0000000..08635eb
--- /dev/null
+++ b/scripts/travis_apache_install.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -x
+set -e
+
+PACKAGENAME=builder
+
+sudo ln -s /opt/codebender/$PACKAGENAME/Symfony/web /var/www/$PACKAGENAME
+sudo cp /opt/codebender/$PACKAGENAME/apache-config-2.2 /etc/apache2/sites-available/codebender-$PACKAGENAME
+cd /etc/apache2/sites-enabled
+sudo ln -s ../sites-available/codebender-$PACKAGENAME 00-codebender.conf
+sudo service apache2 restart
diff --git a/scripts/travis_install.sh b/scripts/travis_install.sh
new file mode 100644
index 0000000..852f039
--- /dev/null
+++ b/scripts/travis_install.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+set -x
+set -e
+
+PACKAGENAME=builder
+
+echo "Configuring environment for Linux (Ubuntu 12.04)"
+
+# Make sure we have up-to-date stuff
+sudo apt-get update
+
+# Install dependencies
+sudo apt-get install -y apache2 libapache2-mod-php5 php-pear php5-curl php5-sqlite php5-mysql acl curl git
+# Enable Apache configs
+sudo a2enmod rewrite
+sudo a2enmod alias
+# Restart Apache
+sudo service apache2 restart
+
+HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1`
+
+sudo mkdir -p /opt/codebender
+sudo cp -r . /opt/codebender/$PACKAGENAME
+sudo chown -R `whoami`:$HTTPDUSER /opt/codebender/$PACKAGENAME
+cd /opt/codebender/$PACKAGENAME
+
+#Set permissions for app/cache and app/logs
+
+rm -rf Symfony/app/cache/*
+rm -rf Symfony/app/logs/*
+
+# Need to create cache and logs directories, as they do not pre-exist in new deployments
+mkdir -p `pwd`/Symfony/app/cache/
+mkdir -p `pwd`/Symfony/app/logs/
+
+cd Symfony
+
+set +x
+cat app/config/parameters.yml.dist | grep -iv "compiler:" | grep -iv "library:" > app/config/parameters.yml
+echo "    compiler: '$COMPILER_URL'" >> app/config/parameters.yml
+
+echo "    library: '$LIBRARY_URL'" >> app/config/parameters.yml
+set -x
+
+
+curl -s http://getcomposer.org/installer | php
+php composer.phar install

From 856e78bb1c2aacd138426eaf94d3118b0a2ae1cf Mon Sep 17 00:00:00 2001
From: Fotis Papadopoulos <fot2803@hotmail.com>
Date: Fri, 23 Oct 2015 16:20:12 +0300
Subject: [PATCH 05/10] Updated scripts' execution permissions

---
 scripts/apache_install.sh        | 0
 scripts/install.sh               | 0
 scripts/travis_apache_install.sh | 0
 scripts/travis_install.sh        | 0
 4 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 scripts/apache_install.sh
 mode change 100644 => 100755 scripts/install.sh
 mode change 100644 => 100755 scripts/travis_apache_install.sh
 mode change 100644 => 100755 scripts/travis_install.sh

diff --git a/scripts/apache_install.sh b/scripts/apache_install.sh
old mode 100644
new mode 100755
diff --git a/scripts/install.sh b/scripts/install.sh
old mode 100644
new mode 100755
diff --git a/scripts/travis_apache_install.sh b/scripts/travis_apache_install.sh
old mode 100644
new mode 100755
diff --git a/scripts/travis_install.sh b/scripts/travis_install.sh
old mode 100644
new mode 100755

From c8327e9203a87cece4957157dcca11a60f285995 Mon Sep 17 00:00:00 2001
From: Fotis Papadopoulos <fot2803@hotmail.com>
Date: Fri, 23 Oct 2015 16:36:38 +0300
Subject: [PATCH 06/10] Updated a unit test (coverage increase)

---
 .../Tests/Controller/DefaultControllerUnitTest.php       | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php b/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php
index fd418ea..32e2d31 100644
--- a/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php
+++ b/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php
@@ -240,9 +240,10 @@ public function testCompileFalseCompilationWithStepIncluded() {
 
         $controller->expects($this->at(0))->method('get')->with('codebender_builder.handler')
             ->willReturn($apiHandler);
-        $controller->expects($this->at(1))->method('addUserIdProjectIdIfNotInRequest')->with(['files' => []])
-            ->willReturn(['files' => []]);
-        $controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with([])
+        $controller->expects($this->at(1))->method('addUserIdProjectIdIfNotInRequest')
+            ->with(['files' => [], 'libraries' => []])
+            ->willReturn(['files' => [], 'libraries' => []]);
+        $controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with([], [])
             ->willReturn(['libraries' => []]);
 
         $container->expects($this->once())->method('getParameter')->with('compiler')
@@ -251,7 +252,7 @@ public function testCompileFalseCompilationWithStepIncluded() {
             ->with('http://compiler/url', '{"files":[],"libraries":[]}')
             ->willReturn('{"success":false,"message":"someError","step":5}');
 
-        $functionResponse = $function->invoke($controller, ['files' => []]);
+        $functionResponse = $function->invoke($controller, ['files' => [], 'libraries' => []]);
 
         $this->assertEquals('{"success":false,"message":"someError","step":5,"additionalCode":[]}', $functionResponse);
     }

From 9d44773dc42675c613394650d1248ceaeb35d8b5 Mon Sep 17 00:00:00 2001
From: Fotis Papadopoulos <fpapadopou@gmail.com>
Date: Sat, 24 Oct 2015 19:22:36 +0300
Subject: [PATCH 07/10] Removed diff markers

---
 scripts/apache_install.sh | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/scripts/apache_install.sh b/scripts/apache_install.sh
index fa2f065..4d68ce8 100755
--- a/scripts/apache_install.sh
+++ b/scripts/apache_install.sh
@@ -4,12 +4,8 @@ set -e
 
 PACKAGENAME=builder
 
-<<<<<<< HEAD
 sudo ln -s /opt/codebender/$PACKAGENAME/Symfony/web /var/www/$PACKAGENAME
 sudo cp /opt/codebender/$PACKAGENAME/apache-config-2.4 /etc/apache2/sites-available/codebender-$PACKAGENAME
-=======
-sudo cp /opt/codebender/$PACKAGENAME/apache-config /etc/apache2/sites-available/codebender-$PACKAGENAME
->>>>>>> 1062d777a61b66db589845a8fb1a2c46aeb6fe56
 cd /etc/apache2/sites-enabled
 sudo ln -s ../sites-available/codebender-$PACKAGENAME 00-codebender.conf
 sudo service apache2 restart

From 1ae65f32766350029ed66b672a4a3810ca85becd Mon Sep 17 00:00:00 2001
From: Pavlos Ratis <dastergon@codebender.cc>
Date: Wed, 11 Nov 2015 15:22:46 +0200
Subject: [PATCH 08/10] enable Ubuntu 14.04 beta in travis

---
 .travis.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 2936568..e921ff1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,5 @@
+sudo: required
+dist: trusty
 language: php
 php:
   - 5.5.9

From a304b7282e69c3ca6de71d8528568014e290be04 Mon Sep 17 00:00:00 2001
From: Pavlos Ratis <dastergon@codebender.cc>
Date: Wed, 11 Nov 2015 15:23:47 +0200
Subject: [PATCH 09/10] remove php-specific-config from travis.yml

At beta stage, travis-ci does not include preinstalled PHP environment
so I am currently installing php from install scripts
---
 .travis.yml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e921ff1..79aff25 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,5 @@
 sudo: required
 dist: trusty
-language: php
-php:
-  - 5.5.9
 
 env:
   global:

From 46f3c560082c64bbb5896be9e0ebd0143c214d92 Mon Sep 17 00:00:00 2001
From: Pavlos Ratis <dastergon@codebender.cc>
Date: Wed, 11 Nov 2015 15:45:17 +0200
Subject: [PATCH 10/10] add error_reporting attribute to php5 cli

Since we don't use phpenv I move the attribute to /etc/php5/cli/conf.d
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 79aff25..a5c0337 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,7 +13,7 @@ before_script:
   - scripts/travis_install.sh
   - cd /opt/codebender/builder/Symfony
   - sudo chmod -R 777 app/cache app/logs
-  - echo 'error_reporting =  E_ALL' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
+  - echo 'error_reporting =  E_ALL' >> /etc/php5/cli/conf.d/travis.ini
   - cd /opt/codebender/builder
   - sudo chmod +x scripts/travis_apache_install.sh
   - scripts/travis_apache_install.sh