diff --git a/.travis.yml b/.travis.yml index 2810d41..ebfd784 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,28 +1,23 @@ language: php php: -# - 5.5 -# - 5.4 - - 5.3 - -#before_install: -# - sudo apt-get update + - 5.5.9 env: global: # eratosthenes library management system url (encrypted) - secure: "ZYn4o229W7hq1uzj/Tii9h/a3iJlr9Li4TBaTNFXm6JY2H49lA57L1DIFUaTleTUx2Ibs2+kUrV3NFQ9Mo/ThO67gV5Q1XEMjxgFzAKt4AuWJ5TNbHxs3GBTjYc+129QCKSd0WdzrRDqEC2nZ9GjI+j7lS39DrjAMGg4wEp9b0U=" # codebender compiler url (encrypted) - - secure: "XRsqGDqdu5uhdj2lF4SZ6qv6Y0PdcRPcvE13XvVGnIYRZaITelP3eJNSvLPO+Q5k4mBmKCz8t+ws/OVRRwSAXYaKe0Z8ZXgEcNyo1nEwGekC35mTuG1FFfB/pbuBp5/OWjw6bgz2tEHhKuFIbHytpT9zJQYy+D07rzOYeUsZjOY=" + - secure: "hzL7akuLe+HCsi6G7Z1UliNR8ekzGlWv1cS/iweeXnxjISYU5ALrvpeOHNcfiC/xTZJsJXq+KYwZpVa/Ps7AVwfLgnUkQGD8OA7AmXbqgIv/xao24u4NNd+xAEB9LSr/eWexQhRJniE+JHgZ53yrAefJBIwmeD0YhvU1IdrzMdE=" 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/Symfony/app/SymfonyRequirements.php b/Symfony/app/SymfonyRequirements.php index fb70f80..dd7c278 100644 --- a/Symfony/app/SymfonyRequirements.php +++ b/Symfony/app/SymfonyRequirements.php @@ -77,7 +77,7 @@ public function getTestMessage() } /** - * Returns the help text for resolving the problem + * Returns the help text for resolving the problem. * * @return string The help text */ @@ -119,14 +119,14 @@ class PhpIniRequirement extends Requirement * * @param string $cfgName The configuration name used for ini_get() * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, - or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement - * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. - This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. - Example: You require a config to be true but PHP later removes this config and defaults it to true internally. - * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) - * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) - * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) - * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) + * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement */ public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false) { @@ -221,13 +221,13 @@ public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText * * @param string $cfgName The configuration name used for ini_get() * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, - or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement - * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. - This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. - Example: You require a config to be true but PHP later removes this config and defaults it to true internally. - * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) - * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) - * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) */ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) { @@ -239,13 +239,13 @@ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = * * @param string $cfgName The configuration name used for ini_get() * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, - or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement - * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. - This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. - Example: You require a config to be true but PHP later removes this config and defaults it to true internally. - * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) - * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) - * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) */ public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) { @@ -530,11 +530,22 @@ function_exists('simplexml_import_dom'), /* optional recommendations follow */ - $this->addRecommendation( - file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'), - 'Requirements file should be up-to-date', - 'Your requirements file is outdated. Run composer install and re-check your configuration.' - ); + if (file_exists(__DIR__.'/../vendor/composer')) { + require_once __DIR__.'/../vendor/autoload.php'; + + try { + $r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); + + $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); + } catch (\ReflectionException $e) { + $contents = ''; + } + $this->addRecommendation( + file_get_contents(__FILE__) === $contents, + 'Requirements file should be up-to-date', + 'Your requirements file is outdated. Run composer install and re-check your configuration.' + ); + } $this->addRecommendation( version_compare($installedPhpVersion, '5.3.4', '>='), @@ -578,8 +589,8 @@ function_exists('simplexml_import_dom'), $this->addRecommendation( class_exists('DomDocument'), - 'PHP-XML module should be installed', - 'Install and enable the PHP-XML module.' + 'PHP-DOM and PHP-XML modules should be installed', + 'Install and enable the PHP-DOM and the PHP-XML modules.' ); $this->addRecommendation( @@ -614,15 +625,15 @@ class_exists('Locale'), 'Install and enable the intl extension (used for validators).' ); - if (class_exists('Collator')) { + if (extension_loaded('intl')) { + // in some WAMP server installations, new Collator() returns null $this->addRecommendation( null !== new Collator('fr_FR'), 'intl extension should be correctly configured', 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.' ); - } - if (class_exists('Locale')) { + // check for compatible ICU versions (only done when you have the intl extension) if (defined('INTL_ICU_VERSION')) { $version = INTL_ICU_VERSION; } else { @@ -641,6 +652,14 @@ class_exists('Locale'), 'intl ICU version should be at least 4+', 'Upgrade your intl extension with a newer ICU version (4+).' ); + + $this->addPhpIniRecommendation( + 'intl.error_level', + create_function('$cfgValue', 'return (int) $cfgValue === 0;'), + true, + 'intl.error_level should be 0 in php.ini', + 'Set "intl.error_level" to "0" in php.ini* to inhibit the messages when an error occurs in ICU functions.' + ); } $accelerator = diff --git a/Symfony/composer.json b/Symfony/composer.json index 4a7dc45..d3f8a53 100644 --- a/Symfony/composer.json +++ b/Symfony/composer.json @@ -21,10 +21,13 @@ "incenteev/composer-parameter-handler": "~2.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*", + "phpunit/phpunit": "4.8.*", "satooshi/php-coveralls": "dev-master", "sebastian/phpcpd": "*", - "phpmd/phpmd" : "2.0.*" + "phpmd/phpmd" : "2.0.*", + "phpunit/php-token-stream": "~1.3", + "phpunit/php-code-coverage": "~2.1", + "phpunit/phpunit-mock-objects": "~2.3" }, "scripts": { "post-install-cmd": [ diff --git a/Symfony/composer.lock b/Symfony/composer.lock index 5bb39dc..f621bad 100644 --- a/Symfony/composer.lock +++ b/Symfony/composer.lock @@ -1,23 +1,24 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "ce4b4421faaedd6eaee28ab488e8e9b8", + "hash": "8da382063ac73510d47c6eb7d7276a74", + "content-hash": "7b2f337d4ac8d2924492f84e61509511", "packages": [ { "name": "doctrine/annotations", - "version": "v1.2.0", + "version": "v1.2.7", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd" + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd", - "reference": "d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", "shasum": "" }, "require": { @@ -44,17 +45,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -63,11 +53,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Docblock Annotations Parser", @@ -77,20 +73,20 @@ "docblock", "parser" ], - "time": "2014-07-06 15:52:21" + "time": "2015-08-31 12:32:49" }, { "name": "doctrine/cache", - "version": "v1.3.0", + "version": "v1.4.2", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "e16d7adf45664a50fa86f515b6d5e7f670130449" + "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/e16d7adf45664a50fa86f515b6d5e7f670130449", - "reference": "e16d7adf45664a50fa86f515b6d5e7f670130449", + "url": "https://api.github.com/repos/doctrine/cache/zipball/8c434000f420ade76a07c64cbe08ca47e5c101ca", + "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca", "shasum": "" }, "require": { @@ -101,12 +97,13 @@ }, "require-dev": { "phpunit/phpunit": ">=3.7", + "predis/predis": "~1.0", "satooshi/php-coveralls": "~0.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.5.x-dev" } }, "autoload": { @@ -119,17 +116,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -138,11 +124,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Caching library offering an object-oriented API for many cache backends", @@ -151,25 +143,28 @@ "cache", "caching" ], - "time": "2013-10-25 19:04:14" + "time": "2015-08-31 12:36:41" }, { "name": "doctrine/collections", - "version": "v1.2", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "b99c5c46c87126201899afe88ec490a25eedd6a2" + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/b99c5c46c87126201899afe88ec490a25eedd6a2", - "reference": "b99c5c46c87126201899afe88ec490a25eedd6a2", + "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", "shasum": "" }, "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, "type": "library", "extra": { "branch-alias": { @@ -186,17 +181,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -205,11 +189,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Collections Abstraction library", @@ -219,20 +209,20 @@ "collections", "iterator" ], - "time": "2014-02-03 23:07:43" + "time": "2015-04-14 22:21:58" }, { "name": "doctrine/common", - "version": "v2.4.2", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b" + "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/5db6ab40e4c531f14dad4ca96a394dfce5d4255b", - "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b", + "url": "https://api.github.com/repos/doctrine/common/zipball/0009b8f0d4a917aabc971fb089eba80e872f83f9", + "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9", "shasum": "" }, "require": { @@ -249,7 +239,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4.x-dev" + "dev-master": "2.6.x-dev" } }, "autoload": { @@ -262,17 +252,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -281,11 +260,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Common Library for Doctrine projects", @@ -297,20 +282,20 @@ "persistence", "spl" ], - "time": "2014-05-21 19:28:51" + "time": "2015-08-31 13:00:22" }, { "name": "doctrine/dbal", - "version": "v2.4.2", + "version": "v2.4.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "fec965d330c958e175c39e61c3f6751955af32d0" + "reference": "a370e5b95e509a7809d11f3d280acfc9310d464b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/fec965d330c958e175c39e61c3f6751955af32d0", - "reference": "fec965d330c958e175c39e61c3f6751955af32d0", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/a370e5b95e509a7809d11f3d280acfc9310d464b", + "reference": "a370e5b95e509a7809d11f3d280acfc9310d464b", "shasum": "" }, "require": { @@ -322,7 +307,7 @@ "symfony/console": "~2.0" }, "suggest": { - "symfony/console": "Allows use of the command line interface" + "symfony/console": "For helpful console commands such as SQL execution and import of files." }, "type": "library", "autoload": { @@ -335,17 +320,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -353,6 +327,14 @@ { "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" } ], "description": "Database Abstraction Layer", @@ -363,7 +345,7 @@ "persistence", "queryobject" ], - "time": "2014-01-01 16:43:57" + "time": "2015-01-12 21:57:01" }, { "name": "doctrine/doctrine-bundle", @@ -439,22 +421,30 @@ }, { "name": "doctrine/inflector", - "version": "v1.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "54b8333d2a5682afdc690060c1cf384ba9f47f08" + "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/54b8333d2a5682afdc690060c1cf384ba9f47f08", - "reference": "54b8333d2a5682afdc690060c1cf384ba9f47f08", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/0bcb2e79d8571787f18b7eb036ed3d004908e604", + "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604", "shasum": "" }, "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-0": { "Doctrine\\Common\\Inflector\\": "lib/" @@ -465,17 +455,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -484,41 +463,52 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Common String Manipulations with regard to casing and singular/plural rules.", "homepage": "http://www.doctrine-project.org", "keywords": [ "inflection", - "pluarlize", - "singuarlize", + "pluralize", + "singularize", "string" ], - "time": "2013-01-10 21:49:15" + "time": "2014-12-20 21:24:13" }, { "name": "doctrine/lexer", - "version": "v1.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "2f708a85bb3aab5d99dab8be435abd73e0b18acb" + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/2f708a85bb3aab5d99dab8be435abd73e0b18acb", - "reference": "2f708a85bb3aab5d99dab8be435abd73e0b18acb", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", "shasum": "" }, "require": { "php": ">=5.3.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-0": { "Doctrine\\Common\\Lexer\\": "lib/" @@ -529,20 +519,17 @@ "MIT" ], "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", @@ -551,20 +538,20 @@ "lexer", "parser" ], - "time": "2013-01-12 18:59:04" + "time": "2014-09-09 13:34:57" }, { "name": "doctrine/orm", - "version": "v2.4.4", + "version": "v2.4.8", "source": { "type": "git", "url": "https://github.com/doctrine/doctrine2.git", - "reference": "fc19c3b53dcd00e6584db40669fdd699c4671f97" + "reference": "5aedac1e5c5caaeac14798822c70325dc242d467" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/fc19c3b53dcd00e6584db40669fdd699c4671f97", - "reference": "fc19c3b53dcd00e6584db40669fdd699c4671f97", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/5aedac1e5c5caaeac14798822c70325dc242d467", + "reference": "5aedac1e5c5caaeac14798822c70325dc242d467", "shasum": "" }, "require": { @@ -601,17 +588,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -619,6 +595,14 @@ { "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" } ], "description": "Object-Relational-Mapper for PHP", @@ -627,21 +611,20 @@ "database", "orm" ], - "time": "2014-07-11 03:05:53" + "time": "2015-08-31 13:19:01" }, { "name": "incenteev/composer-parameter-handler", - "version": "v2.1.0", - "target-dir": "Incenteev/ParameterHandler", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/Incenteev/ParameterHandler.git", - "reference": "143272a0a09c62616a3c8011fc165a10c6b35241" + "reference": "84a205fe80a46101607bafbc423019527893ddd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/143272a0a09c62616a3c8011fc165a10c6b35241", - "reference": "143272a0a09c62616a3c8011fc165a10c6b35241", + "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/84a205fe80a46101607bafbc423019527893ddd0", + "reference": "84a205fe80a46101607bafbc423019527893ddd0", "shasum": "" }, "require": { @@ -660,8 +643,8 @@ } }, "autoload": { - "psr-0": { - "Incenteev\\ParameterHandler": "" + "psr-4": { + "Incenteev\\ParameterHandler\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -679,7 +662,7 @@ "keywords": [ "parameters management" ], - "time": "2013-12-07 10:10:39" + "time": "2015-06-03 08:27:03" }, { "name": "jdorn/sql-formatter", @@ -733,16 +716,16 @@ }, { "name": "kriswallsmith/assetic", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/kriswallsmith/assetic.git", - "reference": "735cffd3982c6e8cdebe292d5db39d077f65890f" + "reference": "02105abcd35fb32933bc566e4c3bec84c612e9c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/735cffd3982c6e8cdebe292d5db39d077f65890f", - "reference": "735cffd3982c6e8cdebe292d5db39d077f65890f", + "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/02105abcd35fb32933bc566e4c3bec84c612e9c1", + "reference": "02105abcd35fb32933bc566e4c3bec84c612e9c1", "shasum": "" }, "require": { @@ -800,33 +783,41 @@ "compression", "minification" ], - "time": "2013-07-19 00:03:27" + "time": "2014-12-12 05:37:00" }, { "name": "monolog/monolog", - "version": "1.10.0", + "version": "1.17.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "25b16e801979098cb2f120e697bfce454b18bf23" + "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/25b16e801979098cb2f120e697bfce454b18bf23", - "reference": "25b16e801979098cb2f120e697bfce454b18bf23", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bee7f0dc9c3e0b69a6039697533dca1e845c8c24", + "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24", "shasum": "" }, "require": { "php": ">=5.3.0", "psr/log": "~1.0" }, + "provide": { + "psr/log-implementation": "1.0.0" + }, "require-dev": { - "aws/aws-sdk-php": "~2.4, >2.4.8", + "aws/aws-sdk-php": "^2.4.9", "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", - "phpunit/phpunit": "~3.7.0", - "raven/raven": "~0.5", - "ruflin/elastica": "0.90.*" + "jakub-onderka/php-parallel-lint": "0.9", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "raven/raven": "^0.13", + "ruflin/elastica": ">=0.90 <3.0", + "swiftmailer/swiftmailer": "~5.3", + "videlalvaro/php-amqplib": "~2.4" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -834,14 +825,16 @@ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", "ext-mongo": "Allow sending log messages to a MongoDB server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "php-console/php-console": "Allow sending log messages to Google Chrome", "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.16.x-dev" } }, "autoload": { @@ -857,8 +850,7 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be", - "role": "Developer" + "homepage": "http://seld.be" } ], "description": "Sends your logs to files, sockets, inboxes, databases and various web services", @@ -868,7 +860,7 @@ "logging", "psr-3" ], - "time": "2014-06-04 16:30:04" + "time": "2015-10-14 12:51:02" }, { "name": "psr/log", @@ -910,17 +902,17 @@ }, { "name": "sensio/distribution-bundle", - "version": "v2.3.4", + "version": "v2.3.22", "target-dir": "Sensio/Bundle/DistributionBundle", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "66df91b4bd637a83299d8072aed3658bfd3b3021" + "reference": "98bdda791e7c2dfb5fd55781e69a4b00e4f751a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/66df91b4bd637a83299d8072aed3658bfd3b3021", - "reference": "66df91b4bd637a83299d8072aed3658bfd3b3021", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/98bdda791e7c2dfb5fd55781e69a4b00e4f751a6", + "reference": "98bdda791e7c2dfb5fd55781e69a4b00e4f751a6", "shasum": "" }, "require": { @@ -944,9 +936,7 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "email": "fabien@symfony.com" } ], "description": "The base bundle for the Symfony Distributions", @@ -954,7 +944,7 @@ "configuration", "distribution" ], - "time": "2013-08-22 05:04:53" + "time": "2015-06-05 22:32:08" }, { "name": "sensio/framework-extra-bundle", @@ -1057,28 +1047,28 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v5.2.1", + "version": "v5.4.1", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "2b9af56cc676c338d52fca4c657e5bdff73bb7af" + "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/2b9af56cc676c338d52fca4c657e5bdff73bb7af", - "reference": "2b9af56cc676c338d52fca4c657e5bdff73bb7af", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/0697e6aa65c83edf97bb0f23d8763f94e3f11421", + "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421", "shasum": "" }, "require": { - "php": ">=5.2.4" + "php": ">=5.3.3" }, "require-dev": { - "mockery/mockery": "~0.9.1" + "mockery/mockery": "~0.9.1,<0.9.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.2-dev" + "dev-master": "5.4-dev" } }, "autoload": { @@ -1092,40 +1082,39 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "name": "Chris Corbyn" }, { - "name": "Chris Corbyn" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Swiftmailer, free feature-rich PHP mailer", "homepage": "http://swiftmailer.org", "keywords": [ + "email", "mail", "mailer" ], - "time": "2014-06-13 11:44:54" + "time": "2015-06-06 14:19:39" }, { "name": "symfony/assetic-bundle", - "version": "v2.3.0", + "version": "v2.3.1", "target-dir": "Symfony/Bundle/AsseticBundle", "source": { "type": "git", - "url": "https://github.com/symfony/AsseticBundle.git", - "reference": "146dd3cb46b302bd471560471c6aaa930483dac1" + "url": "https://github.com/symfony/assetic-bundle.git", + "reference": "099e0bb5d80e7039af20db384a41017fde521f21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/146dd3cb46b302bd471560471c6aaa930483dac1", - "reference": "146dd3cb46b302bd471560471c6aaa930483dac1", + "url": "https://api.github.com/repos/symfony/assetic-bundle/zipball/099e0bb5d80e7039af20db384a41017fde521f21", + "reference": "099e0bb5d80e7039af20db384a41017fde521f21", "shasum": "" }, "require": { - "kriswallsmith/assetic": "~1.1", + "kriswallsmith/assetic": "1.1.x", "php": ">=5.3.0", "symfony/framework-bundle": "~2.1" }, @@ -1144,7 +1133,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -1170,56 +1159,7 @@ "compression", "minification" ], - "time": "2013-05-16 05:32:23" - }, - { - "name": "symfony/icu", - "version": "v1.2.2", - "target-dir": "Symfony/Component/Icu", - "source": { - "type": "git", - "url": "https://github.com/symfony/Icu.git", - "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Icu/zipball/d4d85d6055b87f394d941b45ddd3a9173e1e3d2a", - "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a", - "shasum": "" - }, - "require": { - "ext-intl": "*", - "lib-icu": ">=4.4", - "php": ">=5.3.3", - "symfony/intl": "~2.3" - }, - "type": "library", - "autoload": { - "psr-0": { - "Symfony\\Component\\Icu\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Contains an excerpt of the ICU data and classes to load it.", - "homepage": "http://symfony.com", - "keywords": [ - "icu", - "intl" - ], - "time": "2014-07-25 09:58:17" + "time": "2013-11-25 16:34:50" }, { "name": "symfony/monolog-bundle", @@ -1227,12 +1167,12 @@ "target-dir": "Symfony/Bundle/MonologBundle", "source": { "type": "git", - "url": "https://github.com/symfony/MonologBundle.git", + "url": "https://github.com/symfony/monolog-bundle.git", "reference": "03ed73bc11367b3156cc21f22ac37c7f70fcd10a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/MonologBundle/zipball/03ed73bc11367b3156cc21f22ac37c7f70fcd10a", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/03ed73bc11367b3156cc21f22ac37c7f70fcd10a", "reference": "03ed73bc11367b3156cc21f22ac37c7f70fcd10a", "shasum": "" }, @@ -1283,17 +1223,16 @@ }, { "name": "symfony/swiftmailer-bundle", - "version": "v2.3.7", - "target-dir": "Symfony/Bundle/SwiftmailerBundle", + "version": "v2.3.8", "source": { "type": "git", - "url": "https://github.com/symfony/SwiftmailerBundle.git", - "reference": "e98defd402f72e8b54a029ba4d3ac4cb51dc3577" + "url": "https://github.com/symfony/swiftmailer-bundle.git", + "reference": "970b13d01871207e81d17b17ddda025e7e21e797" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/SwiftmailerBundle/zipball/e98defd402f72e8b54a029ba4d3ac4cb51dc3577", - "reference": "e98defd402f72e8b54a029ba4d3ac4cb51dc3577", + "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/970b13d01871207e81d17b17ddda025e7e21e797", + "reference": "970b13d01871207e81d17b17ddda025e7e21e797", "shasum": "" }, "require": { @@ -1307,6 +1246,9 @@ "symfony/http-kernel": "~2.1", "symfony/yaml": "~2.1" }, + "suggest": { + "psr/log": "Allows logging" + }, "type": "symfony-bundle", "extra": { "branch-alias": { @@ -1314,8 +1256,8 @@ } }, "autoload": { - "psr-0": { - "Symfony\\Bundle\\SwiftmailerBundle": "" + "psr-4": { + "Symfony\\Bundle\\SwiftmailerBundle\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1323,41 +1265,38 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony SwiftmailerBundle", "homepage": "http://symfony.com", - "time": "2014-04-05 17:15:52" + "time": "2014-12-01 17:44:50" }, { "name": "symfony/symfony", - "version": "v2.3.18", + "version": "v2.3.33", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "75e07e6bde6391a6f49c8546a43740c80ac1b06b" + "reference": "3b8a8ee48e8ad81cb5d9d85b909bbd28011423a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/75e07e6bde6391a6f49c8546a43740c80ac1b06b", - "reference": "75e07e6bde6391a6f49c8546a43740c80ac1b06b", + "url": "https://api.github.com/repos/symfony/symfony/zipball/3b8a8ee48e8ad81cb5d9d85b909bbd28011423a1", + "reference": "3b8a8ee48e8ad81cb5d9d85b909bbd28011423a1", "shasum": "" }, "require": { - "doctrine/common": "~2.2", + "doctrine/common": "~2.4", "php": ">=5.3.3", "psr/log": "~1.0", - "symfony/icu": "~1.0", - "twig/twig": "~1.12" + "twig/twig": "~1.20|~2.0" }, "replace": { "symfony/browser-kit": "self.version", @@ -1400,12 +1339,13 @@ }, "require-dev": { "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.2", - "doctrine/orm": "~2.2,>=2.2.3", - "ircmaxell/password-compat": "1.0.*", + "doctrine/dbal": "~2.4", + "doctrine/orm": "~2.4,>=2.4.5", + "ircmaxell/password-compat": "~1.0", "monolog/monolog": "~1.3", - "ocramius/proxy-manager": ">=0.3.1,<0.4-dev", - "propel/propel1": "1.6.*" + "ocramius/proxy-manager": "~0.3.1", + "propel/propel1": "~1.6", + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { @@ -1432,33 +1372,31 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "email": "fabien@symfony.com" }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], "description": "The Symfony PHP framework", - "homepage": "http://symfony.com", + "homepage": "https://symfony.com", "keywords": [ "framework" ], - "time": "2014-07-15 14:20:44" + "time": "2015-09-25 09:08:49" }, { "name": "twig/extensions", "version": "v1.0.1", "source": { "type": "git", - "url": "https://github.com/fabpot/Twig-extensions.git", + "url": "https://github.com/twigphp/Twig-extensions.git", "reference": "f91a82ec225e5bb108e01a0f93c9be04f84dcfa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Twig-extensions/zipball/f91a82ec225e5bb108e01a0f93c9be04f84dcfa0", + "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/f91a82ec225e5bb108e01a0f93c9be04f84dcfa0", "reference": "f91a82ec225e5bb108e01a0f93c9be04f84dcfa0", "shasum": "" }, @@ -1499,25 +1437,29 @@ }, { "name": "twig/twig", - "version": "v1.16.0", + "version": "v1.22.3", "source": { "type": "git", - "url": "https://github.com/fabpot/Twig.git", - "reference": "8ce37115802e257a984a82d38254884085060024" + "url": "https://github.com/twigphp/Twig.git", + "reference": "ebfc36b7e77b0c1175afe30459cf943010245540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Twig/zipball/8ce37115802e257a984a82d38254884085060024", - "reference": "8ce37115802e257a984a82d38254884085060024", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/ebfc36b7e77b0c1175afe30459cf943010245540", + "reference": "ebfc36b7e77b0c1175afe30459cf943010245540", "shasum": "" }, "require": { - "php": ">=5.2.4" + "php": ">=5.2.7" + }, + "require-dev": { + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16-dev" + "dev-master": "1.22-dev" } }, "autoload": { @@ -1543,7 +1485,7 @@ }, { "name": "Twig Team", - "homepage": "https://github.com/fabpot/Twig/graphs/contributors", + "homepage": "http://twig.sensiolabs.org/contributors", "role": "Contributors" } ], @@ -1552,22 +1494,76 @@ "keywords": [ "templating" ], - "time": "2014-07-05 12:19:05" + "time": "2015-10-13 07:07:02" } ], "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, { "name": "guzzle/guzzle", - "version": "v3.9.2", + "version": "v3.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle3.git", - "reference": "54991459675c1a2924122afbb0e5609ade581155" + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155", - "reference": "54991459675c1a2924122afbb0e5609ade581155", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", "shasum": "" }, "require": { @@ -1608,6 +1604,9 @@ "zendframework/zend-cache": "2.*,<2.3", "zendframework/zend-log": "2.*,<2.3" }, + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, "type": "library", "extra": { "branch-alias": { @@ -1635,7 +1634,7 @@ "homepage": "https://github.com/guzzle/guzzle/contributors" } ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ "client", @@ -1646,20 +1645,20 @@ "rest", "web service" ], - "time": "2014-08-11 04:32:36" + "time": "2015-03-18 18:23:50" }, { "name": "pdepend/pdepend", - "version": "2.0.0", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "b74f2bb68e86104cd97dfb8d74209692c9b465ce" + "reference": "dc582a3c0180664a8fbfc5a34efaf4cc13fccc60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/b74f2bb68e86104cd97dfb8d74209692c9b465ce", - "reference": "b74f2bb68e86104cd97dfb8d74209692c9b465ce", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/dc582a3c0180664a8fbfc5a34efaf4cc13fccc60", + "reference": "dc582a3c0180664a8fbfc5a34efaf4cc13fccc60", "shasum": "" }, "require": { @@ -1685,42 +1684,91 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2014-05-21 09:48:10" + "time": "2014-10-08 06:54:50" }, { - "name": "phpmd/phpmd", - "version": "2.0.0", + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/phpmd/phpmd.git", - "reference": "68ced5452910d3555a38720bd87f5f2356c5a003" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/68ced5452910d3555a38720bd87f5f2356c5a003", - "reference": "68ced5452910d3555a38720bd87f5f2356c5a003", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", "shasum": "" }, "require": { - "pdepend/pdepend": "2.0.*", - "php": ">=5.3.0", - "symfony/config": "@stable", - "symfony/dependency-injection": "@stable", - "symfony/filesystem": "@stable" + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" }, - "bin": [ - "src/bin/phpmd" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-0": { - "PHPMD\\": "src/main/php", - "PDepend\\": "vendor/pdepend/pdepend/src/main/php/" + "phpDocumentor": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "../../pdepend/pdepend/src/main/php", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpmd/phpmd", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpmd/phpmd.git", + "reference": "68ced5452910d3555a38720bd87f5f2356c5a003" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/68ced5452910d3555a38720bd87f5f2356c5a003", + "reference": "68ced5452910d3555a38720bd87f5f2356c5a003", + "shasum": "" + }, + "require": { + "pdepend/pdepend": "2.0.*", + "php": ">=5.3.0", + "symfony/config": "@stable", + "symfony/dependency-injection": "@stable", + "symfony/filesystem": "@stable" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "library", + "autoload": { + "psr-0": { + "PHPMD\\": "src/main/php", + "PDepend\\": "vendor/pdepend/pdepend/src/main/php/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "../../pdepend/pdepend/src/main/php", "src/main/php" ], "license": [ @@ -1729,48 +1777,109 @@ "description": "Official version of PHPMD handled with Composer.", "time": "2014-05-21 12:45:23" }, + { + "name": "phpspec/prophecy", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2015-08-13 10:07:40" + }, { "name": "phpunit/php-code-coverage", - "version": "1.2.17", + "version": "2.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6ef2bf3a1c47eca07ea95f0d8a902a6340390b34" + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6ef2bf3a1c47eca07ea95f0d8a902a6340390b34", - "reference": "6ef2bf3a1c47eca07ea95f0d8a902a6340390b34", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", "shasum": "" }, "require": { "php": ">=5.3.3", - "phpunit/php-file-iterator": ">=1.3.0@stable", - "phpunit/php-text-template": ">=1.2.0@stable", - "phpunit/php-token-stream": ">=1.1.3@stable" + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.0.5" + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1788,35 +1897,37 @@ "testing", "xunit" ], - "time": "2014-03-28 10:53:45" + "time": "2015-10-06 15:47:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.3.4", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, "autoload": { "classmap": [ - "File/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1833,20 +1944,20 @@ "filesystem", "iterator" ], - "time": "2013-10-10 15:34:57" + "time": "2015-06-21 13:08:43" }, { "name": "phpunit/php-text-template", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { @@ -1855,20 +1966,17 @@ "type": "library", "autoload": { "classmap": [ - "Text/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1877,20 +1985,20 @@ "keywords": [ "template" ], - "time": "2014-01-30 17:20:04" + "time": "2015-06-21 13:50:34" }, { "name": "phpunit/php-timer", - "version": "1.0.5", + "version": "1.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", "shasum": "" }, "require": { @@ -1899,13 +2007,10 @@ "type": "library", "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1921,49 +2026,48 @@ "keywords": [ "timer" ], - "time": "2013-08-02 07:42:54" + "time": "2015-06-21 08:01:12" }, { "name": "phpunit/php-token-stream", - "version": "1.2.2", + "version": "1.4.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.4-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", @@ -1971,62 +2075,61 @@ "keywords": [ "tokenizer" ], - "time": "2014-03-03 05:10:30" + "time": "2015-09-15 10:49:45" }, { "name": "phpunit/phpunit", - "version": "3.7.37", + "version": "4.8.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ae6cefd7cc84586a5ef27e04bae11ee940ec63dc" + "reference": "be067d6105286b74272facefc2697038f8807b77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ae6cefd7cc84586a5ef27e04bae11ee940ec63dc", - "reference": "ae6cefd7cc84586a5ef27e04bae11ee940ec63dc", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/be067d6105286b74272facefc2697038f8807b77", + "reference": "be067d6105286b74272facefc2697038f8807b77", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-dom": "*", "ext-json": "*", "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpunit/php-code-coverage": "~1.2", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.1", - "phpunit/php-timer": "~1.0", - "phpunit/phpunit-mock-objects": "~1.2", - "symfony/yaml": "~2.0" - }, - "require-dev": { - "pear-pear.php.net/pear": "1.9.4" + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": ">=1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" }, "suggest": { "phpunit/php-invoker": "~1.1" }, "bin": [ - "composer/bin/phpunit" + "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-master": "4.8.x-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ "BSD-3-Clause" ], @@ -2038,45 +2141,52 @@ } ], "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", + "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], - "time": "2014-04-30 12:24:19" + "time": "2015-10-14 13:49:40" }, { "name": "phpunit/phpunit-mock-objects", - "version": "1.2.3", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875" + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5794e3c5c5ba0fb037b11d8151add2a07fa82875", - "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.0.2", "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" }, "suggest": { "ext-soap": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -2093,7 +2203,7 @@ "mock", "xunit" ], - "time": "2013-01-13 10:24:48" + "time": "2015-10-02 06:51:40" }, { "name": "satooshi/php-coveralls", @@ -2101,12 +2211,12 @@ "source": { "type": "git", "url": "https://github.com/satooshi/php-coveralls.git", - "reference": "94389a0ebdb64857d6899b5e0254dffa99e5aa96" + "reference": "2fbf803803d179ab1082807308a67bbd5a760c70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/94389a0ebdb64857d6899b5e0254dffa99e5aa96", - "reference": "94389a0ebdb64857d6899b5e0254dffa99e5aa96", + "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/2fbf803803d179ab1082807308a67bbd5a760c70", + "reference": "2fbf803803d179ab1082807308a67bbd5a760c70", "shasum": "" }, "require": { @@ -2168,25 +2278,257 @@ "github", "test" ], - "time": "2014-07-09 10:45:38" + "time": "2014-11-11 15:35:34" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-02-22 15:13:53" + }, + { + "name": "sebastian/environment", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", + "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2015-08-03 06:14:51" + }, + { + "name": "sebastian/exporter", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-06-21 07:55:53" }, { "name": "sebastian/finder-facade", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "1e396fda3449fce9df032749fa4fa2619e0347e0" + "reference": "a520dcc3dd39160eea480daa3426f4fd419a327b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/1e396fda3449fce9df032749fa4fa2619e0347e0", - "reference": "1e396fda3449fce9df032749fa4fa2619e0347e0", + "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/a520dcc3dd39160eea480daa3426f4fd419a327b", + "reference": "a520dcc3dd39160eea480daa3426f4fd419a327b", "shasum": "" }, "require": { - "symfony/finder": ">=2.2.0", - "theseer/fdomdocument": ">=1.3.1" + "symfony/finder": "~2.3", + "theseer/fdomdocument": "~1.3" }, "type": "library", "autoload": { @@ -2207,28 +2549,79 @@ ], "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2013-05-28 06:10:03" + "time": "2015-06-04 08:11:58" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" }, { "name": "sebastian/phpcpd", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpcpd.git", - "reference": "a9462153f2dd90466a010179901d31fbff598365" + "reference": "d3ad100fdf15805495f6ff19f473f4314c99390c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/a9462153f2dd90466a010179901d31fbff598365", - "reference": "a9462153f2dd90466a010179901d31fbff598365", + "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/d3ad100fdf15805495f6ff19f473f4314c99390c", + "reference": "d3ad100fdf15805495f6ff19f473f4314c99390c", "shasum": "" }, "require": { "php": ">=5.3.3", - "phpunit/php-timer": ">=1.0.4", - "sebastian/finder-facade": ">=1.1.0", - "sebastian/version": ">=1.0.3", - "symfony/console": ">=2.2.0", + "phpunit/php-timer": "~1.0", + "sebastian/finder-facade": "~1.1", + "sebastian/version": "~1.0", + "symfony/console": "~2.2", "theseer/fdomdocument": "~1.4" }, "bin": [ @@ -2258,20 +2651,73 @@ ], "description": "Copy/Paste Detector (CPD) for PHP code.", "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2014-03-31 09:25:30" + "time": "2015-03-26 14:47:38" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", + "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-06-21 08:04:50" }, { "name": "sebastian/version", - "version": "1.0.3", + "version": "1.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", "shasum": "" }, "type": "library", @@ -2293,20 +2739,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2014-03-07 15:35:33" + "time": "2015-06-21 13:59:46" }, { "name": "theseer/fdomdocument", - "version": "1.5.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/theseer/fDOMDocument.git", - "reference": "137aa3b13bef05b4e301899cbabdaf7d501847d2" + "reference": "d9ad139d6c2e8edf5e313ffbe37ff13344cf0684" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/137aa3b13bef05b4e301899cbabdaf7d501847d2", - "reference": "137aa3b13bef05b4e301899cbabdaf7d501847d2", + "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/d9ad139d6c2e8edf5e313ffbe37ff13344cf0684", + "reference": "d9ad139d6c2e8edf5e313ffbe37ff13344cf0684", "shasum": "" }, "require": { @@ -2328,26 +2774,23 @@ { "name": "Arne Blankerts", "email": "arne@blankerts.de", - "role": "Developer" + "role": "lead" } ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2014-02-19 00:20:43" + "time": "2015-05-27 22:58:02" } ], - "aliases": [ - - ], + "aliases": [], "minimum-stability": "stable", "stability-flags": { "satooshi/php-coveralls": 20 }, "prefer-stable": false, + "prefer-lowest": false, "platform": { "php": ">=5.3.3" }, - "platform-dev": [ - - ] + "platform-dev": [] } diff --git a/Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php b/Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php index f0189bd..7d684d0 100644 --- a/Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php +++ b/Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php @@ -36,26 +36,26 @@ public function statusAction() public function handleRequestAction($authKey, $version) { if ($authKey !== $this->container->getParameter('authorizationKey')) { - return new Response(json_encode(array("success" => false, "message" => "Invalid authorization key."))); + return new Response(json_encode(["success" => false, "message" => "Invalid authorization key."])); } if ($version !== $this->container->getParameter('version')) { - return new Response(json_encode(array("success" => false, "message" => "Invalid api version."))); + return new Response(json_encode(["success" => false, "message" => "Invalid api version."])); } $request = $this->getRequest()->getContent(); if (empty($request)) { - return new Response(json_encode(array("success" => false, "message" => "Invalid input."))); + return new Response(json_encode(["success" => false, "message" => "Invalid input."])); } $contents = json_decode($request, true); if (json_last_error() !== JSON_ERROR_NONE) { - return new Response(json_encode(array("success" => false, "message" => "Wrong data."))); + return new Response(json_encode(["success" => false, "message" => "Wrong data."])); } if (!array_key_exists("data", $contents)) { - return new Response(json_encode(array("success" => false, "message" => "Insufficient data provided."))); + return new Response(json_encode(["success" => false, "message" => "Insufficient data provided."])); } if ($contents["type"] == "compiler") { @@ -66,7 +66,13 @@ public function handleRequestAction($authKey, $version) return new Response($this->getLibraryInfo(json_encode($contents["data"]))); } - return new Response(json_encode(array("success" => false, "message" => "Invalid request type (can handle only 'compiler' or 'library' requests)"))); + return new Response( + json_encode( + [ + "success" => false, + "message" => "Invalid request type (can handle only 'compiler' or 'library' requests)" + ] + )); } /** @@ -81,11 +87,11 @@ protected function compile($contents) { $apiHandler = $this->get('codebender_builder.handler'); - $files = $contents["files"]; + $contents = $this->addUserIdProjectIdIfNotInRequest($contents); - $this->checkForUserIdProjectId($files); + $files = $contents["files"]; - $userLibraries = array(); + $userLibraries = []; if (array_key_exists('libraries', $contents)) { $userLibraries = $contents['libraries']; @@ -102,7 +108,7 @@ protected function compile($contents) $decodedResponse = json_decode($data, true); if (json_last_error() !== JSON_ERROR_NONE) { - return json_encode(array("success" => false, "message"=> "Failed to get compiler response.")); + return json_encode(["success" => false, "message"=> "Failed to get compiler response."]); } if ($decodedResponse["success"] === false && !array_key_exists("step", $decodedResponse)) { @@ -146,15 +152,16 @@ protected function returnProvidedAndFetchedLibraries($projectFiles, $userLibrari $detectedHeaders = $apiHandler->readLibraries($projectFiles); // declare arrays - $notFoundHeaders = array(); - $foundHeaders = array(); - $librariesFromLibman = array(); + $notFoundHeaders = []; + $foundHeaders = []; + $librariesFromLibman = []; $providedLibraries = array_keys($userLibraries); $libraries = $userLibraries; foreach ($detectedHeaders as $header) { $existsInRequest = false; + // TODO We can do this in a better way foreach ($userLibraries as $library) { foreach ($library as $libraryContent) { if ($libraryContent["filename"] == $header.".h") { @@ -167,7 +174,7 @@ protected function returnProvidedAndFetchedLibraries($projectFiles, $userLibrari if ($existsInRequest === true) { continue; } - $requestContent = array("type" => "fetch", "library" => $header); + $requestContent = ["type" => "fetch", "library" => $header]; $data = $this->getLibraryInfo(json_encode($requestContent)); $data = json_decode($data, true); @@ -178,7 +185,7 @@ protected function returnProvidedAndFetchedLibraries($projectFiles, $userLibrari $foundHeaders[] = $header . ".h"; $librariesFromLibman[] = $header; - $filesToBeAdded = array(); + $filesToBeAdded = []; foreach ($data["files"] as $file) { if (in_array(pathinfo($file['filename'], PATHINFO_EXTENSION), array('cpp', 'h', 'c', 'S', 'inc'))) $filesToBeAdded[] = $file; @@ -186,41 +193,27 @@ protected function returnProvidedAndFetchedLibraries($projectFiles, $userLibrari $libraries[$header] = $filesToBeAdded; } - return array( + return [ 'libraries' => $libraries, 'providedLibraries' => $providedLibraries, 'fetchedLibraries' => $librariesFromLibman, 'detectedHeaders'=> $detectedHeaders, 'foundHeaders' => $foundHeaders, - 'notFoundHeaders' => $notFoundHeaders); + 'notFoundHeaders' => $notFoundHeaders + ]; } /** - * Checks if project id and user id txt files exist in the request files. - * If not, creates these files with null id + * Checks if project id and user id exist in the request. + * If not, adds the fields with null id * - * @param array $projectFiles + * @param array $requestContents + * @return array */ - protected function checkForUserIdProjectId(&$projectFiles) + protected function addUserIdProjectIdIfNotInRequest($requestContents) { - $foundProject = false; - $foundUser = false; - - foreach ($projectFiles as $file) { - if (preg_match('/(?<=user_)[\d]+/', $file['filename'])) { - $foundUser = true; - } - if (preg_match('/(?<=project_)[\d]+/', $file['filename'])) { - $foundProject = true; - } - } - - if (!$foundUser) { - $projectFiles[] = array('filename' => 'user_null.txt', 'content' => ''); - } - if (!$foundProject) { - $projectFiles[] = array('filename' => 'project_null.txt', 'content' => ''); - } + $nullDefaults = ['userId' => 'null', 'projectId' => 'null']; + return array_merge($nullDefaults, (array)$requestContents); } } diff --git a/Symfony/src/Codebender/BuilderBundle/Handler/DefaultHandler.php b/Symfony/src/Codebender/BuilderBundle/Handler/DefaultHandler.php index c7cf11c..f0b1971 100644 --- a/Symfony/src/Codebender/BuilderBundle/Handler/DefaultHandler.php +++ b/Symfony/src/Codebender/BuilderBundle/Handler/DefaultHandler.php @@ -53,7 +53,7 @@ function detectHeadersInFile($code) { $arrowsRegex = "/^\s*#\s*include\s*<\s*([a-zA-Z0-9_+]*)\.h\s*>/"; $quotesRegex = "/^\s*#\s*include\s*\"\s*([a-zA-Z0-9_+]*)\.h\s*\"/"; - $headers = array("arrows" => array(), "quotes" => array()); + $headers = ["arrows" => [], "quotes" => []]; foreach (explode("\n", $code) as $line) { if (preg_match($arrowsRegex, $line, $matches)) @@ -78,7 +78,7 @@ function detectHeadersInFile($code) { */ function readLibraries($sketchFiles) { // Scan files for headers and locate the corresponding include paths. - $headers = array("arrows" => array(), "quotes" => array()); + $headers = ["arrows" => [], "quotes" => []]; foreach ($sketchFiles as $file) { diff --git a/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerFunctionalTest.php b/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerFunctionalTest.php index f202c12..7cbf19b 100644 --- a/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerFunctionalTest.php +++ b/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerFunctionalTest.php @@ -40,9 +40,9 @@ public function testHandleRequestCompile() { ->request( 'POST', "/{$authorizationKey}/{$apiVersion}/", - $parameters = array(), - $files = array(), - $server = array(), + $parameters = [], + $files = [], + $server = [], $content = '{"type":"compiler","data":{"files":[{"filename":"project.ino","content":"void setup(){\n\n}\nvoid loop(){\n\n}\n"}],"format":"binary","version":"105","build":{"mcu":"atmega328p","f_cpu":"16000000L","core":"arduino","variant":"standard"}}}', $changeHistory = true); @@ -61,9 +61,9 @@ public function testHandleRequestLibraryFetching() { ->request( 'POST', "/{$authorizationKey}/{$apiVersion}/", - $parameters = array(), - $files = array(), - $server = array(), + $parameters = [], + $files = [], + $server = [], $content = '{"type":"library","data":{"type":"fetch","library":"Ethernet"}}', $changeHistory = true); @@ -83,9 +83,9 @@ public function testHandleRequestLibraryKeywords() { ->request( 'POST', "/{$authorizationKey}/{$apiVersion}/", - $parameters = array(), - $files = array(), - $server = array(), + $parameters = [], + $files = [], + $server = [], $content = '{"type":"library","data":{"type":"getKeywords","library":"Ethernet"}}', $changeHistory = true); diff --git a/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php b/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php index d774eef..66cfaa6 100644 --- a/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php +++ b/Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php @@ -18,7 +18,8 @@ public function testHandleRequestInvalidAuthKey() { $this->setUpController($controller, $container, $request, $apiHandler); - $container->expects($this->once())->method('getParameter')->with('authorizationKey')->will($this->returnValue('anAuthKey')); + $container->expects($this->once())->method('getParameter')->with('authorizationKey') + ->willReturn('anAuthKey'); $actionResponse = $controller->handleRequestAction('invalidAuthKey', 'v1'); @@ -29,8 +30,10 @@ public function testHandleRequestInvalidApiVersion() { $this->setUpController($controller, $container, $request, $apiHandler); - $container->expects($this->at(0))->method('getParameter')->with('authorizationKey')->will($this->returnValue('anAuthKey')); - $container->expects($this->at(1))->method('getParameter')->with('version')->will($this->returnValue('v2')); + $container->expects($this->at(0))->method('getParameter')->with('authorizationKey') + ->willReturn('anAuthKey'); + $container->expects($this->at(1))->method('getParameter')->with('version') + ->willReturn('v2'); $actionResponse = $controller->handleRequestAction('anAuthKey', 'v1'); @@ -41,11 +44,15 @@ public function testHandleRequestEmptyRequest() { $this->setUpController($controller, $container, $request, $apiHandler); - $container->expects($this->at(0))->method('getParameter')->with('authorizationKey')->will($this->returnValue('anAuthKey')); - $container->expects($this->at(1))->method('getParameter')->with('version')->will($this->returnValue('v1')); + $container->expects($this->at(0))->method('getParameter')->with('authorizationKey') + ->willReturn('anAuthKey'); + $container->expects($this->at(1))->method('getParameter')->with('version') + ->willreturn('v1'); - $controller->expects($this->once())->method('getRequest')->will($this->returnValue($request)); - $request->expects($this->once())->method('getContent')->will($this->returnValue('')); + $controller->expects($this->once())->method('getRequest') + ->willReturn($request); + $request->expects($this->once())->method('getContent') + ->willReturn(''); $actionResponse = $controller->handleRequestAction('anAuthKey', 'v1'); @@ -56,11 +63,15 @@ public function testHandleRequestInvalidJsonDecodesToFalse() { $this->setUpController($controller, $container, $request, $apiHandler); - $container->expects($this->at(0))->method('getParameter')->with('authorizationKey')->will($this->returnValue('anAuthKey')); - $container->expects($this->at(1))->method('getParameter')->with('version')->will($this->returnValue('v1')); + $container->expects($this->at(0))->method('getParameter')->with('authorizationKey') + ->willReturn('anAuthKey'); + $container->expects($this->at(1))->method('getParameter')->with('version') + ->willReturn('v1'); - $controller->expects($this->once())->method('getRequest')->will($this->returnValue($request)); - $request->expects($this->once())->method('getContent')->will($this->returnValue("notJson")); + $controller->expects($this->once())->method('getRequest') + ->willReturn($request); + $request->expects($this->once())->method('getContent') + ->willReturn("notJson"); $actionResponse = $controller->handleRequestAction('anAuthKey', 'v1'); @@ -71,11 +82,15 @@ public function testHandleRequestNoDataKeyInRequest() { $this->setUpController($controller, $container, $request, $apiHandler); - $container->expects($this->at(0))->method('getParameter')->with('authorizationKey')->will($this->returnValue('anAuthKey')); - $container->expects($this->at(1))->method('getParameter')->with('version')->will($this->returnValue('v1')); + $container->expects($this->at(0))->method('getParameter')->with('authorizationKey') + ->willReturn('anAuthKey'); + $container->expects($this->at(1))->method('getParameter')->with('version') + ->willReturn('v1'); - $controller->expects($this->once())->method('getRequest')->will($this->returnValue($request)); - $request->expects($this->once())->method('getContent')->will($this->returnValue('{"type":"compiler"}')); + $controller->expects($this->once())->method('getRequest') + ->willReturn($request); + $request->expects($this->once())->method('getContent') + ->willReturn('{"type":"compiler"}'); $actionResponse = $controller->handleRequestAction('anAuthKey', 'v1'); @@ -88,18 +103,23 @@ public function testHandleRequestCompileRequest() { // Override previous controller mock. More class member functions need to get mocked. $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController') ->disableOriginalConstructor() - ->setMethods(array('getRequest', 'compile', 'getLibraryInfo')) + ->setMethods(['getRequest', 'compile', 'getLibraryInfo']) ->getMock(); $controller->setContainer($container); - $container->expects($this->at(0))->method('getParameter')->with('authorizationKey')->will($this->returnValue('anAuthKey')); - $container->expects($this->at(1))->method('getParameter')->with('version')->will($this->returnValue('v1')); + $container->expects($this->at(0))->method('getParameter')->with('authorizationKey') + ->willReturn('anAuthKey'); + $container->expects($this->at(1))->method('getParameter')->with('version') + ->willReturn('v1'); - $controller->expects($this->once())->method('getRequest')->will($this->returnValue($request)); - $request->expects($this->once())->method('getContent')->will($this->returnValue('{"type":"compiler","data":[]}')); + $controller->expects($this->once())->method('getRequest') + ->willReturn($request); + $request->expects($this->once())->method('getContent') + ->willReturn('{"type":"compiler","data":[]}'); - $controller->expects($this->once())->method('compile')->with(array())->will($this->returnValue('someValue')); + $controller->expects($this->once())->method('compile')->with([]) + ->willReturn('someValue'); $actionResponse = $controller->handleRequestAction('anAuthKey', 'v1'); @@ -112,16 +132,20 @@ public function testHandleRequestLibraryRequest() { // Override previous controller mock. More class member functions need to get mocked. $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController') ->disableOriginalConstructor() - ->setMethods(array('getRequest', 'compile', 'getLibraryInfo')) + ->setMethods(['getRequest', 'compile', 'getLibraryInfo']) ->getMock(); $controller->setContainer($container); - $container->expects($this->at(0))->method('getParameter')->with('authorizationKey')->will($this->returnValue('anAuthKey')); - $container->expects($this->at(1))->method('getParameter')->with('version')->will($this->returnValue('v1')); + $container->expects($this->at(0))->method('getParameter')->with('authorizationKey') + ->willReturn('anAuthKey'); + $container->expects($this->at(1))->method('getParameter')->with('version') + ->willReturn('v1'); - $controller->expects($this->once())->method('getRequest')->will($this->returnValue($request)); - $request->expects($this->once())->method('getContent')->will($this->returnValue('{"type":"invalidType","data":[]}')); + $controller->expects($this->once())->method('getRequest') + ->willReturn($request); + $request->expects($this->once())->method('getContent') + ->willReturn('{"type":"invalidType","data":[]}'); $actionResponse = $controller->handleRequestAction('anAuthKey', 'v1'); @@ -134,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(array('get', 'getRequest', 'checkForUserIdProjectId', 'returnProvidedAndFetchedLibraries')) + ->setMethods(['get', 'getRequest', 'addUserIdProjectIdIfNotInRequest', 'returnProvidedAndFetchedLibraries']) ->getMock(); $controller->setContainer($container); @@ -144,14 +168,19 @@ public function testCompileNonJsonCompilerResponse() { */ $function = $this->getMethod('compile'); - $controller->expects($this->at(0))->method('get')->with('codebender_builder.handler')->will($this->returnValue($apiHandler)); - $controller->expects($this->at(1))->method('checkForUserIdProjectId')->with(array()); - $controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with(array())->will($this->returnValue(array('libraries' => array()))); + $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([]) + ->willReturn(['libraries' => []]); - $container->expects($this->once())->method('getParameter')->with('compiler')->will($this->returnValue('http://compiler/url')); - $apiHandler->expects($this->once())->method('postRawData')->with('http://compiler/url', '{"files":[],"libraries":[]}')->will($this->returnValue('nonJson')); + $container->expects($this->once())->method('getParameter')->with('compiler') + ->willReturn('http://compiler/url'); + $apiHandler->expects($this->once())->method('postRawData') + ->with('http://compiler/url', '{"files":[],"libraries":[]}')->willReturn('nonJson'); - $functionResponse = $function->invoke($controller, array('files' => array())); + $functionResponse = $function->invoke($controller, ['files' => []]); $this->assertContains('Failed to get compiler response', $functionResponse); } @@ -162,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(array('get', 'getRequest', 'checkForUserIdProjectId', 'returnProvidedAndFetchedLibraries')) + ->setMethods(['get', 'getRequest', 'addUserIdProjectIdIfNotInRequest', 'returnProvidedAndFetchedLibraries']) ->getMock(); $controller->setContainer($container); @@ -172,18 +201,25 @@ public function testCompileFalseCompilationWithoutStepIncluded() { */ $function = $this->getMethod('compile'); - $controller->expects($this->at(0))->method('get')->with('codebender_builder.handler')->will($this->returnValue($apiHandler)); - $controller->expects($this->at(1))->method('checkForUserIdProjectId')->with(array()); - $controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with(array())->will($this->returnValue(array('libraries' => array()))); + $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([]) + ->willReturn(['libraries' => []]); - $container->expects($this->once())->method('getParameter')->with('compiler')->will($this->returnValue('http://compiler/url')); + $container->expects($this->once())->method('getParameter')->with('compiler') + ->willReturn('http://compiler/url'); $apiHandler->expects($this->once())->method('postRawData') ->with('http://compiler/url', '{"files":[],"libraries":[]}') - ->will($this->returnValue('{"success":false,"message":"someError"}')); + ->willReturn('{"success":false,"message":"someError"}'); - $functionResponse = $function->invoke($controller, array('files' => array())); + $functionResponse = $function->invoke($controller, ['files' => []]); - $this->assertEquals('{"success":false,"message":"someError","step":"unknown","additionalCode":[]}', $functionResponse); + $this->assertEquals( + '{"success":false,"message":"someError","step":"unknown","additionalCode":[]}', + $functionResponse + ); } public function testCompileFalseCompilationWithStepIncluded() { @@ -192,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(array('get', 'getRequest', 'checkForUserIdProjectId', 'returnProvidedAndFetchedLibraries')) + ->setMethods(['get', 'getRequest', 'addUserIdProjectIdIfNotInRequest', 'returnProvidedAndFetchedLibraries']) ->getMock(); $controller->setContainer($container); @@ -202,16 +238,21 @@ public function testCompileFalseCompilationWithStepIncluded() { */ $function = $this->getMethod('compile'); - $controller->expects($this->at(0))->method('get')->with('codebender_builder.handler')->will($this->returnValue($apiHandler)); - $controller->expects($this->at(1))->method('checkForUserIdProjectId')->with(array()); - $controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with(array())->will($this->returnValue(array('libraries' => array()))); + $controller->expects($this->at(0))->method('get')->with('codebender_builder.handler') + ->willReturn($apiHandler); + $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')->will($this->returnValue('http://compiler/url')); + $container->expects($this->once())->method('getParameter')->with('compiler') + ->willReturn('http://compiler/url'); $apiHandler->expects($this->once())->method('postRawData') ->with('http://compiler/url', '{"files":[],"libraries":[]}') - ->will($this->returnValue('{"success":false,"message":"someError","step":5}')); + ->willReturn('{"success":false,"message":"someError","step":5}'); - $functionResponse = $function->invoke($controller, array('files' => array())); + $functionResponse = $function->invoke($controller, ['files' => [], 'libraries' => []]); $this->assertEquals('{"success":false,"message":"someError","step":5,"additionalCode":[]}', $functionResponse); } @@ -225,7 +266,7 @@ public function testGetLibraryInfo() { // Override previous controller mock. More class member functions need to get mocked. $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController') ->disableOriginalConstructor() - ->setMethods(array('get', 'getRequest')) + ->setMethods(['get', 'getRequest']) ->getMock(); $controller->setContainer($container); @@ -235,11 +276,15 @@ public function testGetLibraryInfo() { */ $function = $this->getMethod('getLibraryInfo'); - $controller->expects($this->once())->method('get')->with('codebender_builder.handler')->will($this->returnValue($apiHandler)); + $controller->expects($this->once())->method('get')->with('codebender_builder.handler') + ->willReturn($apiHandler); - $container->expects($this->once())->method('getParameter')->with('library_manager')->will($this->returnValue('http://library/manager')); + $container->expects($this->once())->method('getParameter')->with('library_manager') + ->will($this->returnValue('http://library/manager')); - $apiHandler->expects($this->once())->method('postRawData')->with('http://library/manager', 'library data')->will($this->returnValue('Whatever')); + $apiHandler->expects($this->once())->method('postRawData') + ->with('http://library/manager', 'library data') + ->willReturn('Whatever'); $functionResponse = $function->invoke($controller, 'library data'); @@ -252,7 +297,7 @@ public function testReturnProvidedAndFetchedLibrariesNoProvidedLibrariesNoProjec // Override previous controller mock. More class member functions need to get mocked. $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController') ->disableOriginalConstructor() - ->setMethods(array('get', 'getRequest')) + ->setMethods(['get', 'getRequest']) ->getMock(); $controller->setContainer($container); @@ -262,11 +307,13 @@ public function testReturnProvidedAndFetchedLibrariesNoProvidedLibrariesNoProjec */ $function = $this->getMethod('returnProvidedAndFetchedLibraries'); - $controller->expects($this->once())->method('get')->with('codebender_builder.handler')->will($this->returnValue($apiHandler)); + $controller->expects($this->once())->method('get')->with('codebender_builder.handler') + ->willReturn($apiHandler); - $apiHandler->expects($this->once())->method('readLibraries')->with(array())->will($this->returnValue(array())); + $apiHandler->expects($this->once())->method('readLibraries')->with([]) + ->willReturn(array()); - $functionResponse = $function->invokeArgs($controller, array(array(), array())); + $functionResponse = $function->invokeArgs($controller, [[], []]); $this->assertArrayHasKey('libraries', $functionResponse); $this->assertEmpty($functionResponse['libraries']); @@ -288,7 +335,7 @@ public function testReturnProvidedAndFetchedLibrariesNoProvidedLibrariesNeedToFe // Override previous controller mock. More class member functions need to get mocked. $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController') ->disableOriginalConstructor() - ->setMethods(array('get', 'getRequest', 'getLibraryInfo')) + ->setMethods(['get', 'getRequest', 'getLibraryInfo']) ->getMock(); $controller->setContainer($container); @@ -298,18 +345,20 @@ public function testReturnProvidedAndFetchedLibrariesNoProvidedLibrariesNeedToFe */ $function = $this->getMethod('returnProvidedAndFetchedLibraries'); - $controller->expects($this->once())->method('get')->with('codebender_builder.handler')->will($this->returnValue($apiHandler)); + $controller->expects($this->once())->method('get')->with('codebender_builder.handler') + ->willReturn($apiHandler); - $apiHandler->expects($this->once())->method('readLibraries')->with(array())->will($this->returnValue(array('header'))); + $apiHandler->expects($this->once())->method('readLibraries')->with([]) + ->willReturn(['header']); $controller->expects($this->once())->method('getLibraryInfo') ->with('{"type":"fetch","library":"header"}') - ->will($this->returnValue(json_encode(array('success' => true, 'files' => array(array('filename' => 'header.h', 'content' => '')))))); + ->willReturn(json_encode(['success' => true, 'files' => [['filename' => 'header.h', 'content' => '']]])); - $functionResponse = $function->invokeArgs($controller, array(array(), array())); - $this->assertEquals(array('header' => array(array('filename' => 'header.h', 'content' => ''))), $functionResponse['libraries']); - $this->assertEquals(array('header'), $functionResponse['fetchedLibraries']); - $this->assertEquals(array('header.h'), $functionResponse['foundHeaders']); + $functionResponse = $function->invokeArgs($controller, [[], []]); + $this->assertEquals(['header' => [['filename' => 'header.h', 'content' => '']]], $functionResponse['libraries']); + $this->assertEquals(['header'], $functionResponse['fetchedLibraries']); + $this->assertEquals(['header.h'], $functionResponse['foundHeaders']); } public function testReturnProvidedAndFetchedLibrariesNoProvidedRequestedFromLibmanNotFound() { @@ -318,7 +367,7 @@ public function testReturnProvidedAndFetchedLibrariesNoProvidedRequestedFromLibm // Override previous controller mock. More class member functions need to get mocked. $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController') ->disableOriginalConstructor() - ->setMethods(array('get', 'getRequest', 'getLibraryInfo')) + ->setMethods(['get', 'getRequest', 'getLibraryInfo']) ->getMock(); $controller->setContainer($container); @@ -328,18 +377,20 @@ public function testReturnProvidedAndFetchedLibrariesNoProvidedRequestedFromLibm */ $function = $this->getMethod('returnProvidedAndFetchedLibraries'); - $controller->expects($this->once())->method('get')->with('codebender_builder.handler')->will($this->returnValue($apiHandler)); + $controller->expects($this->once())->method('get')->with('codebender_builder.handler') + ->willReturn($apiHandler); - $apiHandler->expects($this->once())->method('readLibraries')->with(array())->will($this->returnValue(array('header'))); + $apiHandler->expects($this->once())->method('readLibraries')->with([]) + ->willReturn(['header']); $controller->expects($this->once())->method('getLibraryInfo') ->with('{"type":"fetch","library":"header"}') - ->will($this->returnValue(json_encode(array('success' => false)))); + ->willReturn(json_encode(['success' => false])); - $functionResponse = $function->invokeArgs($controller, array(array(), array())); - $this->assertEquals(array(), $functionResponse['libraries']); - $this->assertEquals(array(), $functionResponse['fetchedLibraries']); - $this->assertEquals(array('header.h'), $functionResponse['notFoundHeaders']); + $functionResponse = $function->invokeArgs($controller, [[], []]); + $this->assertEquals([], $functionResponse['libraries']); + $this->assertEquals([], $functionResponse['fetchedLibraries']); + $this->assertEquals(['header.h'], $functionResponse['notFoundHeaders']); } public function testReturnProvidedAndFetchedLibrariesWithProvidedLibrary() { @@ -348,7 +399,7 @@ public function testReturnProvidedAndFetchedLibrariesWithProvidedLibrary() { // Override previous controller mock. More class member functions need to get mocked. $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController') ->disableOriginalConstructor() - ->setMethods(array('get', 'getRequest', 'getLibraryInfo')) + ->setMethods(['get', 'getRequest', 'getLibraryInfo']) ->getMock(); $controller->setContainer($container); @@ -358,24 +409,25 @@ public function testReturnProvidedAndFetchedLibrariesWithProvidedLibrary() { */ $function = $this->getMethod('returnProvidedAndFetchedLibraries'); - $controller->expects($this->once())->method('get')->with('codebender_builder.handler')->will($this->returnValue($apiHandler)); + $controller->expects($this->once())->method('get')->with('codebender_builder.handler') + ->willReturn($apiHandler); - $apiHandler->expects($this->once())->method('readLibraries')->with(array())->will($this->returnValue(array('header'))); + $apiHandler->expects($this->once())->method('readLibraries')->with([])->willReturn(['header']); $functionResponse = $function->invokeArgs( $controller, - array( - array(), - array('personal_library' => array(array('filename' => 'header.h', 'content' => ''))) - ) + [ + [], + ['personal_library' => [['filename' => 'header.h', 'content' => '']]] + ] ); $controller->expects($this->never())->method('getLibraryInfo'); - $this->assertEquals(array('personal_library' => array(array('filename' => 'header.h', 'content' => ''))), + $this->assertEquals(['personal_library' => [['filename' => 'header.h', 'content' => '']]], $functionResponse['libraries']); - $this->assertEquals(array('personal_library'), $functionResponse['providedLibraries']); - $this->assertEquals(array('header.h'), $functionResponse['foundHeaders']); + $this->assertEquals(['personal_library'], $functionResponse['providedLibraries']); + $this->assertEquals(['header.h'], $functionResponse['foundHeaders']); } public function testcheckUserIdProjectIdHasNone() { @@ -384,20 +436,14 @@ public function testcheckUserIdProjectIdHasNone() { /* * Use ReflectionMethod class to make compile protected function accessible from current context */ - $function = $this->getMethod('checkForUserIdProjectId'); + $function = $this->getMethod('addUserIdProjectIdIfNotInRequest'); - $projectFiles = array(array('filename' => 'project.ino', 'content' =>'')); + $requestContent = ['files' => [['filename' => 'project.ino', 'content' =>'']]]; - /* - * The function accepts a reference of the parameter - * TODO: Find a way to replace the Reflection call-time pass-by-reference (removed in PHP 5.4) - */ - $functionResponse = $function->invoke($controller, &$projectFiles); + $functionResponse = $function->invoke($controller, $requestContent); - $this->assertEquals(3, count($projectFiles)); - foreach ($projectFiles as $file) { - $this->assertTrue(in_array($file['filename'], array('project.ino', 'project_null.txt', 'user_null.txt'))); - } + $this->assertEquals('null', $functionResponse['projectId']); + $this->assertEquals('null', $functionResponse['userId']); } public function testcheckUserIdProjectIdHasOnlyUserId() { @@ -406,20 +452,14 @@ public function testcheckUserIdProjectIdHasOnlyUserId() { /* * Use ReflectionMethod class to make compile protected function accessible from current context */ - $function = $this->getMethod('checkForUserIdProjectId'); + $function = $this->getMethod('addUserIdProjectIdIfNotInRequest'); - $projectFiles = array(array('filename' => 'project.ino', 'content' =>''), array('filename' => 'user_1.txt', 'content' => '')); + $requestContent = ['userId' => 1, 'files' => [['filename' => 'project.ino', 'content' =>'']]]; - /* - * The function accepts a reference of the parameter - * TODO: Find a way to replace the Reflection call-time pass-by-reference (removed in PHP 5.4) - */ - $functionResponse = $function->invoke($controller, &$projectFiles); + $functionResponse = $function->invoke($controller, $requestContent); - $this->assertEquals(3, count($projectFiles)); - foreach ($projectFiles as $file) { - $this->assertTrue(in_array($file['filename'], array('project.ino', 'project_null.txt', 'user_1.txt'))); - } + $this->assertEquals('null', $functionResponse['projectId']); + $this->assertEquals(1, $functionResponse['userId']); } public function testcheckUserIdProjectIdHasOnlyProjectId() { @@ -428,20 +468,14 @@ public function testcheckUserIdProjectIdHasOnlyProjectId() { /* * Use ReflectionMethod class to make compile protected function accessible from current context */ - $function = $this->getMethod('checkForUserIdProjectId'); + $function = $this->getMethod('addUserIdProjectIdIfNotInRequest'); - $projectFiles = array(array('filename' => 'project.ino', 'content' =>''), array('filename' => 'project_1.txt', 'content' => '')); + $projectFiles = ['projectId' => 1, 'files' => [['filename' => 'project.ino', 'content' =>'']]]; - /* - * The function accepts a reference of the parameter - * TODO: Find a way to replace the Reflection call-time pass-by-reference (removed in PHP 5.4) - */ - $functionResponse = $function->invoke($controller, &$projectFiles); + $functionResponse = $function->invoke($controller, $projectFiles); - $this->assertEquals(3, count($projectFiles)); - foreach ($projectFiles as $file) { - $this->assertTrue(in_array($file['filename'], array('project.ino', 'project_1.txt', 'user_null.txt'))); - } + $this->assertEquals(1, $functionResponse['projectId']); + $this->assertEquals('null', $functionResponse['userId']); } protected static function getMethod($name) { @@ -453,22 +487,22 @@ protected static function getMethod($name) { private function setUpController(&$controller, &$container, &$request, &$apiHandler) { $controller = $this->getMockBuilder('Codebender\BuilderBundle\Controller\DefaultController') ->disableOriginalConstructor() - ->setMethods(array('get', 'getRequest')) + ->setMethods(['get', 'getRequest']) ->getMock(); $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface') ->disableOriginalConstructor() - ->setMethods(array('getParameter')) + ->setMethods(['getParameter']) ->getMockForAbstractClass(); $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request') ->disableOriginalConstructor() - ->setMethods(array('getContent')) + ->setMethods(['getContent']) ->getMock(); $apiHandler = $this->getMockBuilder('Codebender\BuilderBundle\Handler\DefaultHandler') ->disableOriginalConstructor() - ->setMethods(array('postRawData', 'readLibraries')) + ->setMethods(['postRawData', 'readLibraries']) ->getMock(); $controller->setContainer($container); diff --git a/Symfony/src/Codebender/BuilderBundle/Tests/Handler/DefaultHandlerUnitTest.php b/Symfony/src/Codebender/BuilderBundle/Tests/Handler/DefaultHandlerUnitTest.php index 9c1325c..c16618b 100644 --- a/Symfony/src/Codebender/BuilderBundle/Tests/Handler/DefaultHandlerUnitTest.php +++ b/Symfony/src/Codebender/BuilderBundle/Tests/Handler/DefaultHandlerUnitTest.php @@ -21,51 +21,51 @@ public function testDetectHeadersInFile() { $code = "/*\nThis is a comment\n*/\n#include \n#include \"quotedHeader.h\"\nvoid setup(){\n\n}\n\nvoid loop(){\n\n}\n"; - $this->assertEquals(array('arrows' => array('header'), 'quotes' => array('quotedHeader')), $handler->detectHeadersInFile($code)); + $this->assertEquals(['arrows' => ['header'], 'quotes' => ['quotedHeader']], $handler->detectHeadersInFile($code)); } public function testDetectHeadersInFileEmptyInoProvided() { $handler = new DefaultHandler(); $code = ''; - $this->assertEquals(array('arrows' => array(), 'quotes' => array()), $handler->detectHeadersInFile($code)); + $this->assertEquals(['arrows' => [], 'quotes' => []], $handler->detectHeadersInFile($code)); } public function testReadLibraries() { $handler = $this->getMockBuilder('Codebender\BuilderBundle\Handler\DefaultHandler') - ->setMethods(array('detectHeadersInFile')) + ->setMethods(['detectHeadersInFile']) ->getMock(); - $inoFile = array('filename' => 'project.ino', 'content' => '#include \n#include \n#include \"quotedHeader.h\"\nvoid setup(){\n\n}\n\nvoid loop(){\n\n}\n'); - $headerFile = array('filename' => 'quotedHeader.h', 'content' => '#define PIN 5\n#define PIN2 10'); - $projectFiles = array( + $inoFile = ['filename' => 'project.ino', 'content' => '#include \n#include \n#include \"quotedHeader.h\"\nvoid setup(){\n\n}\n\nvoid loop(){\n\n}\n']; + $headerFile = ['filename' => 'quotedHeader.h', 'content' => '#define PIN 5\n#define PIN2 10']; + $projectFiles = [ $inoFile, $headerFile - ); + ]; $handler ->expects($this->once()) ->method('detectHeadersInFile') ->with($inoFile['content']) - ->will($this->returnValue(array('arrows' => array('header', 'Ethernet'), 'quotes' => array('quotedHeader')))); + ->willReturn(['arrows' => ['header', 'Ethernet'], 'quotes' => ['quotedHeader']]); $this->assertTrue(is_array($handler->readlibraries($projectFiles))); } public function testReadLibrariesNoIno() { $handler = $this->getMockBuilder('Codebender\BuilderBundle\Handler\DefaultHandler') - ->setMethods(array('detectHeadersInFile')) + ->setMethods(['detectHeadersInFile']) ->getMock(); - $headerFile = array('filename' => 'quotedHeader.h', 'content' => '#define PIN 5\n#define PIN2 10'); - $projectFiles = array( + $headerFile = ['filename' => 'quotedHeader.h', 'content' => '#define PIN 5\n#define PIN2 10']; + $projectFiles = [ $headerFile - ); + ]; $handler ->expects($this->never()) ->method('detectHeadersInFile'); - $this->assertEquals($handler->readlibraries($projectFiles), array()); + $this->assertEquals([], $handler->readlibraries($projectFiles)); } } diff --git a/apache-config b/apache-config-2.2 similarity index 100% rename from apache-config rename to apache-config-2.2 diff --git a/apache-config-2.4 b/apache-config-2.4 new file mode 100644 index 0000000..4a8b8f2 --- /dev/null +++ b/apache-config-2.4 @@ -0,0 +1,10 @@ + + DocumentRoot /opt/codebender/builder/Symfony/web + DirectoryIndex app.php + SetEnv APPLICATION_ENV "production" + + Options -Indexes +FollowSymLinks +MultiViews + Require all granted + AllowOverride All + + diff --git a/scripts/apache_install.sh b/scripts/apache_install.sh old mode 100644 new mode 100755 index f0bea8c..4d68ce8 --- 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 -sudo service apache2 restart \ No newline at end of file +sudo ln -s ../sites-available/codebender-$PACKAGENAME 00-codebender.conf +sudo service apache2 restart diff --git a/scripts/install.sh b/scripts/install.sh old mode 100644 new mode 100755 index 4be437b..219798c --- 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" +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,38 +46,14 @@ cd /opt/codebender/$PACKAGENAME rm -rf Symfony/app/cache/* rm -rf Symfony/app/logs/* -if [[ "$OSTYPE" == "linux-gnu" ]]; then - - if [[ ! $TRAVIS ]]; then - - sudo dd if=/dev/zero of=cache-fs bs=1024 count=0 seek=200000 - sudo dd if=/dev/zero of=logs-fs bs=1024 count=0 seek=200000 - - yes | sudo mkfs.ext4 cache-fs - yes | sudo mkfs.ext4 logs-fs - - mkdir -p `pwd`/Symfony/app/cache/ - mkdir -p `pwd`/Symfony/app/logs/ - - echo "`pwd`/cache-fs `pwd`/Symfony/app/cache/ ext4 loop,acl 0 0" | sudo tee -a /etc/fstab > /dev/null 2>&1 - echo "`pwd`/logs-fs `pwd`/Symfony/app/logs/ ext4 loop,acl 0 0" | sudo tee -a /etc/fstab > /dev/null 2>&1 - cat /etc/fstab - - sudo mount `pwd`/Symfony/app/cache/ - sudo mount `pwd`/Symfony/app/logs/ - - sudo rm -rf `pwd`/Symfony/app/cache/* - sudo rm -rf `pwd`/Symfony/app/logs/* - - 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 @@ -87,13 +62,9 @@ cd Symfony ## For reference, here's a command to replace a substring in a file ## cat kourades.sh | sed 's/kourades/skata/g' | tee skata.sh > /dev/null 2>&1 -cp app/config/parameters.yml.dist app/config/parameters.yml - set +x -cat app/config/parameters.yml | grep -v "compiler:" | tee app/config/parameters.yml > /dev/null +cat app/config/parameters.yml.dist | grep -iv "compiler:" | grep -iv "library_manager:" > app/config/parameters.yml echo " compiler: '$COMPILER_URL'" >> app/config/parameters.yml - -cat app/config/parameters.yml | grep -v "library_manager:" | tee app/config/parameters.yml > /dev/null echo " library_manager: '$LIBRARY_URL'" >> app/config/parameters.yml set -x diff --git a/scripts/travis_apache_install.sh b/scripts/travis_apache_install.sh new file mode 100755 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 100755 index 0000000..b735aff --- /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_manager:" > app/config/parameters.yml +echo " compiler: '$COMPILER_URL'" >> app/config/parameters.yml + +echo " library_manager: '$LIBRARY_URL'" >> app/config/parameters.yml +set -x + + +curl -s http://getcomposer.org/installer | php +php composer.phar install