diff --git a/app/config/app.php b/app/config/app.php index aa5a934..2534d17 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -78,9 +78,7 @@ return array( | */ - 'key' => 'BxihI0sqIe0oWk27hzF8QCGyaS81SOOO', - - 'cipher' => MCRYPT_RIJNDAEL_128, + 'key' => 'EtdaG6JmXDqr3p4RpoEmqrd0CYdHKFiY', /* |-------------------------------------------------------------------------- @@ -182,7 +180,6 @@ return array( 'Schema' => 'Illuminate\Support\Facades\Schema', 'Seeder' => 'Illuminate\Database\Seeder', 'Session' => 'Illuminate\Support\Facades\Session', - 'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait', 'SSH' => 'Illuminate\Support\Facades\SSH', 'Str' => 'Illuminate\Support\Str', 'URL' => 'Illuminate\Support\Facades\URL', diff --git a/app/config/database.php b/app/config/database.php index d9b4f5d..e6a32ce 100644 --- a/app/config/database.php +++ b/app/config/database.php @@ -55,9 +55,9 @@ return array( 'mysql' => array( 'driver' => 'mysql', 'host' => 'localhost', - 'database' => 'mentors', + 'database' => 'database', 'username' => 'root', - 'password' => 'kipsigei', + 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', @@ -66,8 +66,8 @@ return array( 'pgsql' => array( 'driver' => 'pgsql', 'host' => 'localhost', - 'database' => 'forge', - 'username' => 'forge', + 'database' => 'database', + 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'prefix' => '', diff --git a/app/config/mail.php b/app/config/mail.php index 76fd9e4..41b4c4b 100644 --- a/app/config/mail.php +++ b/app/config/mail.php @@ -11,7 +11,7 @@ return array( | sending of e-mail. You may specify which one you're using throughout | your application here. By default, Laravel is setup for SMTP mail. | - | Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log" + | Supported: "smtp", "mail", "sendmail" | */ @@ -35,9 +35,9 @@ return array( | SMTP Host Port |-------------------------------------------------------------------------- | - | This is the SMTP port used by your application to deliver e-mails to - | users of the application. Like the host we have set this value to - | stay compatible with the Mailgun e-mail application by default. + | This is the SMTP port used by your application to delivery e-mails to + | users of your application. Like the host we have set this value to + | stay compatible with the Mailgun e-mail applications by default. | */ diff --git a/app/config/queue.php b/app/config/queue.php old mode 100755 new mode 100644 index 940a4cd..6a879f7 --- a/app/config/queue.php +++ b/app/config/queue.php @@ -11,7 +11,7 @@ return array( | API, giving you convenient access to each back-end using the same | syntax for each one. Here you may set the default queue driver. | - | Supported: "sync", "beanstalkd", "sqs", "iron", "redis" + | Supported: "sync", "beanstalkd", "sqs", "iron" | */ @@ -55,7 +55,6 @@ return array( 'token' => 'your-token', 'project' => 'your-project-id', 'queue' => 'your-queue-name', - 'encrypt' => true, ), 'redis' => array( diff --git a/app/filters.php b/app/filters.php index fd0b4bc..2a780f7 100644 --- a/app/filters.php +++ b/app/filters.php @@ -35,17 +35,7 @@ App::after(function($request, $response) Route::filter('auth', function() { - if (Auth::guest()) - { - if (Request::ajax()) - { - return Response::make('Unauthorized', 401); - } - else - { - return Redirect::guest('login'); - } - } + if (Auth::guest()) return Redirect::guest('login'); }); diff --git a/app/models/User.php b/app/models/User.php index af00a49..3232050 100644 --- a/app/models/User.php +++ b/app/models/User.php @@ -1,14 +1,10 @@ getKey(); + } + + /** + * Get the password for the user. + * + * @return string + */ + public function getAuthPassword() + { + return $this->password; + } + + /** + * Get the e-mail address where password reminders are sent. + * + * @return string + */ + public function getReminderEmail() + { + return $this->email; + } } diff --git a/app/routes.php b/app/routes.php index 82092be..3e10dcf 100644 --- a/app/routes.php +++ b/app/routes.php @@ -15,5 +15,3 @@ Route::get('/', function() { return View::make('hello'); }); - -Route::resource('mentors', 'MentorController'); diff --git a/app/views/emails/auth/reminder.blade.php b/app/views/emails/auth/reminder.blade.php index aebea9e..d92f2b3 100644 --- a/app/views/emails/auth/reminder.blade.php +++ b/app/views/emails/auth/reminder.blade.php @@ -7,8 +7,7 @@

Password Reset

- To reset your password, complete this form: {{ URL::to('password/reset', array($token)) }}.
- This link will expire in {{ Config::get('auth.reminder.expire', 60) }} minutes. + To reset your password, complete this form: {{ URL::to('password/reset', array($token)) }}.
diff --git a/app/views/hello.php b/app/views/hello.php index 6ba4466..6484242 100644 --- a/app/views/hello.php +++ b/app/views/hello.php @@ -36,7 +36,7 @@
Laravel PHP Framework -

You have arrived. This is all you need to succeed.

+

You have arrived.

diff --git a/bootstrap/start.php b/bootstrap/start.php index 84559be..a55def1 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -26,7 +26,7 @@ $app = new Illuminate\Foundation\Application; $env = $app->detectEnvironment(array( - 'local' => array('homestead'), + 'local' => array('your-machine-name'), )); diff --git a/composer.json b/composer.json index 4f00769..bb5662a 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "keywords": ["framework", "laravel"], "license": "MIT", "require": { - "laravel/framework": "4.2.*" + "laravel/framework": "4.1.*" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index 0644b1a..46f9676 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a8c9bc04a5706bf54f2a6d2e62168e90", + "hash": "1629abbb640a9fe0280e95fc215de768", "packages": [ { "name": "classpreloader/classpreloader", @@ -89,37 +89,30 @@ }, { "name": "filp/whoops", - "version": "1.1.1", + "version": "1.0.10", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "ae05259236204ccf904a94e5b0d96df8d4351da5" + "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/ae05259236204ccf904a94e5b0d96df8d4351da5", - "reference": "ae05259236204ccf904a94e5b0d96df8d4351da5", + "url": "https://api.github.com/repos/filp/whoops/zipball/91e3fd4b0812017ffbeb24add55330664e1ea32a", + "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "mockery/mockery": "0.9.*" + "mockery/mockery": "dev-master", + "silex/silex": "1.0.*@dev" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, "autoload": { "psr-0": { "Whoops": "src/" - }, - "classmap": [ - "src/deprecated" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -143,7 +136,7 @@ "whoops", "zf2" ], - "time": "2014-05-13 05:05:11" + "time": "2013-12-04 14:19:30" }, { "name": "ircmaxell/password-compat", @@ -234,44 +227,44 @@ }, { "name": "laravel/framework", - "version": "v4.2.1", + "version": "v4.1.30", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "be75911bf8f7fe81a2db1dd2585324d080289dd5" + "reference": "1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/be75911bf8f7fe81a2db1dd2585324d080289dd5", - "reference": "be75911bf8f7fe81a2db1dd2585324d080289dd5", + "url": "https://api.github.com/repos/laravel/framework/zipball/1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab", + "reference": "1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab", "shasum": "" }, "require": { - "classpreloader/classpreloader": "~1.0", - "d11wtq/boris": "~1.0", - "filp/whoops": "1.1.*", - "ircmaxell/password-compat": "~1.0", - "jeremeamia/superclosure": "~1.0", - "monolog/monolog": "~1.6", - "nesbot/carbon": "~1.0", + "classpreloader/classpreloader": "1.0.*", + "d11wtq/boris": "1.0.*", + "filp/whoops": "1.0.10", + "ircmaxell/password-compat": "1.0.*", + "jeremeamia/superclosure": "1.0.*", + "monolog/monolog": "1.*", + "nesbot/carbon": "1.*", "patchwork/utf8": "1.1.*", - "php": ">=5.4.0", + "php": ">=5.3.0", "phpseclib/phpseclib": "0.3.*", "predis/predis": "0.8.*", - "stack/builder": "~1.0", - "swiftmailer/swiftmailer": "~5.1", - "symfony/browser-kit": "2.5.*", - "symfony/console": "2.5.*", - "symfony/css-selector": "2.5.*", - "symfony/debug": "2.5.*", - "symfony/dom-crawler": "2.5.*", - "symfony/finder": "2.5.*", - "symfony/http-foundation": "2.5.*", - "symfony/http-kernel": "2.5.*", - "symfony/process": "2.5.*", - "symfony/routing": "2.5.*", - "symfony/security-core": "2.5.*", - "symfony/translation": "2.5.*" + "stack/builder": "1.0.*", + "swiftmailer/swiftmailer": "~5.0", + "symfony/browser-kit": "2.4.*", + "symfony/console": "2.4.*", + "symfony/css-selector": "2.4.*", + "symfony/debug": "2.4.*", + "symfony/dom-crawler": "2.4.*", + "symfony/finder": "2.4.*", + "symfony/http-foundation": "2.4.*", + "symfony/http-kernel": "2.4.*", + "symfony/process": "2.4.*", + "symfony/routing": "2.4.*", + "symfony/security-core": "2.4.*", + "symfony/translation": "2.4.*" }, "replace": { "illuminate/auth": "self.version", @@ -304,11 +297,11 @@ "illuminate/workbench": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "~2.6", - "iron-io/iron_mq": "~1.5", - "mockery/mockery": "~0.9", - "pda/pheanstalk": "~2.1", - "phpunit/phpunit": "~4.0" + "aws/aws-sdk-php": "2.6.*", + "iron-io/iron_mq": "1.5.*", + "mockery/mockery": "0.9.*", + "pda/pheanstalk": "2.1.*", + "phpunit/phpunit": "4.0.*" }, "suggest": { "doctrine/dbal": "Allow renaming columns and dropping SQLite columns." @@ -316,7 +309,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -347,20 +340,20 @@ "framework", "laravel" ], - "time": "2014-06-01 18:14:55" + "time": "2014-06-01 18:30:26" }, { "name": "monolog/monolog", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "65026b610f8c19e61d7242f600530677b0466aac" + "reference": "25b16e801979098cb2f120e697bfce454b18bf23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/65026b610f8c19e61d7242f600530677b0466aac", - "reference": "65026b610f8c19e61d7242f600530677b0466aac", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/25b16e801979098cb2f120e697bfce454b18bf23", + "reference": "25b16e801979098cb2f120e697bfce454b18bf23", "shasum": "" }, "require": { @@ -388,7 +381,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -415,7 +408,7 @@ "logging", "psr-3" ], - "time": "2014-04-24 13:29:03" + "time": "2014-06-04 16:30:04" }, { "name": "nesbot/carbon", @@ -509,16 +502,16 @@ }, { "name": "patchwork/utf8", - "version": "v1.1.23", + "version": "v1.1.24", "source": { "type": "git", "url": "https://github.com/nicolas-grekas/Patchwork-UTF8.git", - "reference": "c1edbc82aed49ff2bdef0a0f659bf69e3f7b14cc" + "reference": "40f552c019956f446553b19f7de2da2f9c74d730" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nicolas-grekas/Patchwork-UTF8/zipball/c1edbc82aed49ff2bdef0a0f659bf69e3f7b14cc", - "reference": "c1edbc82aed49ff2bdef0a0f659bf69e3f7b14cc", + "url": "https://api.github.com/repos/nicolas-grekas/Patchwork-UTF8/zipball/40f552c019956f446553b19f7de2da2f9c74d730", + "reference": "40f552c019956f446553b19f7de2da2f9c74d730", "shasum": "" }, "require": { @@ -556,7 +549,7 @@ "utf-8", "utf8" ], - "time": "2014-05-22 13:59:09" + "time": "2014-06-17 08:23:06" }, { "name": "phpseclib/phpseclib", @@ -790,16 +783,16 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "043e336b871f17a117f76ef8e190eddfc04c8d48" + "reference": "2b9af56cc676c338d52fca4c657e5bdff73bb7af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/043e336b871f17a117f76ef8e190eddfc04c8d48", - "reference": "043e336b871f17a117f76ef8e190eddfc04c8d48", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/2b9af56cc676c338d52fca4c657e5bdff73bb7af", + "reference": "2b9af56cc676c338d52fca4c657e5bdff73bb7af", "shasum": "" }, "require": { @@ -840,21 +833,21 @@ "mail", "mailer" ], - "time": "2014-05-08 08:11:19" + "time": "2014-06-13 11:44:54" }, { "name": "symfony/browser-kit", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/BrowserKit", "source": { "type": "git", "url": "https://github.com/symfony/BrowserKit.git", - "reference": "cc1716dafa04277a0c987aee5bce8c3cf8939de3" + "reference": "5c80003d5772de6120b5429f4b2f6e22957d4a07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/cc1716dafa04277a0c987aee5bce8c3cf8939de3", - "reference": "cc1716dafa04277a0c987aee5bce8c3cf8939de3", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/5c80003d5772de6120b5429f4b2f6e22957d4a07", + "reference": "5c80003d5772de6120b5429f4b2f6e22957d4a07", "shasum": "" }, "require": { @@ -871,7 +864,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -897,38 +890,36 @@ ], "description": "Symfony BrowserKit Component", "homepage": "http://symfony.com", - "time": "2014-05-12 09:28:39" + "time": "2014-05-12 09:27:48" }, { "name": "symfony/console", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c" + "reference": "24f723436e62598c9dddee2a8573d6992504dc5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", - "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", + "url": "https://api.github.com/repos/symfony/Console/zipball/24f723436e62598c9dddee2a8573d6992504dc5d", + "reference": "24f723436e62598c9dddee2a8573d6992504dc5d", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "psr/log": "~1.0", "symfony/event-dispatcher": "~2.1" }, "suggest": { - "psr/log": "For using the console logger", "symfony/event-dispatcher": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -954,21 +945,21 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2014-05-22 08:54:24" + "time": "2014-05-14 21:48:29" }, { "name": "symfony/css-selector", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/CssSelector", "source": { "type": "git", "url": "https://github.com/symfony/CssSelector.git", - "reference": "bcdd62af59bd3137ede467946a06d41f8644048c" + "reference": "268d0a51166edaf84dfcf043c57f273685cb7c93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/bcdd62af59bd3137ede467946a06d41f8644048c", - "reference": "bcdd62af59bd3137ede467946a06d41f8644048c", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/268d0a51166edaf84dfcf043c57f273685cb7c93", + "reference": "268d0a51166edaf84dfcf043c57f273685cb7c93", "shasum": "" }, "require": { @@ -977,7 +968,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1007,21 +998,21 @@ ], "description": "Symfony CssSelector Component", "homepage": "http://symfony.com", - "time": "2014-05-12 09:28:39" + "time": "2014-05-12 09:27:48" }, { "name": "symfony/debug", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/Debug", "source": { "type": "git", "url": "https://github.com/symfony/Debug.git", - "reference": "7fd8006e4604ef99c95050ca2b5c7c5b41f5c704" + "reference": "6e721ae2cd7bde0f8dfa9c3186808a6c4140469c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/7fd8006e4604ef99c95050ca2b5c7c5b41f5c704", - "reference": "7fd8006e4604ef99c95050ca2b5c7c5b41f5c704", + "url": "https://api.github.com/repos/symfony/Debug/zipball/6e721ae2cd7bde0f8dfa9c3186808a6c4140469c", + "reference": "6e721ae2cd7bde0f8dfa9c3186808a6c4140469c", "shasum": "" }, "require": { @@ -1038,7 +1029,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1064,21 +1055,21 @@ ], "description": "Symfony Debug Component", "homepage": "http://symfony.com", - "time": "2014-05-25 14:44:21" + "time": "2014-04-30 06:22:28" }, { "name": "symfony/dom-crawler", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/DomCrawler", "source": { "type": "git", "url": "https://github.com/symfony/DomCrawler.git", - "reference": "6cda499120860286fe3d3d2fd631dacb7ae17f92" + "reference": "77881ef11c064a490515a9fb1729b695c632ffe5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/6cda499120860286fe3d3d2fd631dacb7ae17f92", - "reference": "6cda499120860286fe3d3d2fd631dacb7ae17f92", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/77881ef11c064a490515a9fb1729b695c632ffe5", + "reference": "77881ef11c064a490515a9fb1729b695c632ffe5", "shasum": "" }, "require": { @@ -1093,7 +1084,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1119,7 +1110,7 @@ ], "description": "Symfony DomCrawler Component", "homepage": "http://symfony.com", - "time": "2014-05-31 02:02:56" + "time": "2014-05-31 02:02:48" }, { "name": "symfony/event-dispatcher", @@ -1231,17 +1222,17 @@ }, { "name": "symfony/finder", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/Finder", "source": { "type": "git", "url": "https://github.com/symfony/Finder.git", - "reference": "307aad2c541bbdf43183043645e186ef2cd6b973" + "reference": "46295af1b1e24304b35d5f20f1bf1ec0c2c4934a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/307aad2c541bbdf43183043645e186ef2cd6b973", - "reference": "307aad2c541bbdf43183043645e186ef2cd6b973", + "url": "https://api.github.com/repos/symfony/Finder/zipball/46295af1b1e24304b35d5f20f1bf1ec0c2c4934a", + "reference": "46295af1b1e24304b35d5f20f1bf1ec0c2c4934a", "shasum": "" }, "require": { @@ -1250,7 +1241,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1276,21 +1267,21 @@ ], "description": "Symfony Finder Component", "homepage": "http://symfony.com", - "time": "2014-05-22 13:47:45" + "time": "2014-05-22 13:46:01" }, { "name": "symfony/http-foundation", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/HttpFoundation", "source": { "type": "git", "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "044085422005aa3258fb3f710a7bf0202011f259" + "reference": "138498f3d64981cfafcb5eec3b2b96fce44a178e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/044085422005aa3258fb3f710a7bf0202011f259", - "reference": "044085422005aa3258fb3f710a7bf0202011f259", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/138498f3d64981cfafcb5eec3b2b96fce44a178e", + "reference": "138498f3d64981cfafcb5eec3b2b96fce44a178e", "shasum": "" }, "require": { @@ -1302,7 +1293,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1331,27 +1322,27 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "http://symfony.com", - "time": "2014-05-26 19:02:40" + "time": "2014-05-22 16:21:00" }, { "name": "symfony/http-kernel", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "432a828e796a575d4a325a0fdf14132a615d2c53" + "reference": "084a126a36ed011b098158d4d28daa9883ecc8f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/432a828e796a575d4a325a0fdf14132a615d2c53", - "reference": "432a828e796a575d4a325a0fdf14132a615d2c53", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/084a126a36ed011b098158d4d28daa9883ecc8f7", + "reference": "084a126a36ed011b098158d4d28daa9883ecc8f7", "shasum": "" }, "require": { "php": ">=5.3.3", "psr/log": "~1.0", - "symfony/debug": "~2.5", + "symfony/debug": "~2.3", "symfony/event-dispatcher": "~2.1", "symfony/http-foundation": "~2.4" }, @@ -1378,7 +1369,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1404,21 +1395,21 @@ ], "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", - "time": "2014-05-31 18:45:50" + "time": "2014-05-31 18:42:13" }, { "name": "symfony/process", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/Process", "source": { "type": "git", "url": "https://github.com/symfony/Process.git", - "reference": "5d7d78e23894544740219e006320678cfa4cd45b" + "reference": "a7118cb290c62068b3c8ecfbf8b2eda8421fb841" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/5d7d78e23894544740219e006320678cfa4cd45b", - "reference": "5d7d78e23894544740219e006320678cfa4cd45b", + "url": "https://api.github.com/repos/symfony/Process/zipball/a7118cb290c62068b3c8ecfbf8b2eda8421fb841", + "reference": "a7118cb290c62068b3c8ecfbf8b2eda8421fb841", "shasum": "" }, "require": { @@ -1427,7 +1418,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1453,21 +1444,21 @@ ], "description": "Symfony Process Component", "homepage": "http://symfony.com", - "time": "2014-05-23 09:02:52" + "time": "2014-05-22 13:46:01" }, { "name": "symfony/routing", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/Routing", "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56" + "reference": "74229f66e16bce6d2415ca44d4756f8e7ea880f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", - "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", + "url": "https://api.github.com/repos/symfony/Routing/zipball/74229f66e16bce6d2415ca44d4756f8e7ea880f8", + "reference": "74229f66e16bce6d2415ca44d4756f8e7ea880f8", "shasum": "" }, "require": { @@ -1489,7 +1480,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1521,21 +1512,21 @@ "uri", "url" ], - "time": "2014-04-23 14:08:54" + "time": "2014-04-23 14:04:21" }, { "name": "symfony/security-core", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/Security/Core", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "de6e3aa1362d77f6bf91f17039cd403807ee5c27" + "reference": "1fbe80d10b7a5bcb619abe3e4cfede795d9958dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/de6e3aa1362d77f6bf91f17039cd403807ee5c27", - "reference": "de6e3aa1362d77f6bf91f17039cd403807ee5c27", + "url": "https://api.github.com/repos/symfony/security-core/zipball/1fbe80d10b7a5bcb619abe3e4cfede795d9958dc", + "reference": "1fbe80d10b7a5bcb619abe3e4cfede795d9958dc", "shasum": "" }, "require": { @@ -1559,7 +1550,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1585,21 +1576,21 @@ ], "description": "Symfony Security Component - Core Library", "homepage": "http://symfony.com", - "time": "2014-04-23 14:08:54" + "time": "2014-04-23 14:04:21" }, { "name": "symfony/translation", - "version": "v2.5.0", + "version": "v2.4.6", "target-dir": "Symfony/Component/Translation", "source": { "type": "git", "url": "https://github.com/symfony/Translation.git", - "reference": "5f23265dcf8927a84be832608069c9edca3cf5f4" + "reference": "9a3941444487ea57acd38f5c61bee1e0c3f69293" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/5f23265dcf8927a84be832608069c9edca3cf5f4", - "reference": "5f23265dcf8927a84be832608069c9edca3cf5f4", + "url": "https://api.github.com/repos/symfony/Translation/zipball/9a3941444487ea57acd38f5c61bee1e0c3f69293", + "reference": "9a3941444487ea57acd38f5c61bee1e0c3f69293", "shasum": "" }, "require": { @@ -1616,7 +1607,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1642,7 +1633,7 @@ ], "description": "Symfony Translation Component", "homepage": "http://symfony.com", - "time": "2014-05-22 13:47:45" + "time": "2014-05-22 13:46:01" } ], "packages-dev": [ diff --git a/readme.md b/readme.md index 40ea7ee..d113789 100644 --- a/readme.md +++ b/readme.md @@ -1,10 +1,6 @@ ## Laravel PHP Framework -[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework) -[![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework) -[![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework) -[![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework) -[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework) +[![Latest Stable Version](https://poser.pugx.org/laravel/framework/version.png)](https://packagist.org/packages/laravel/framework) [![Total Downloads](https://poser.pugx.org/laravel/framework/d/total.png)](https://packagist.org/packages/laravel/framework) [![Build Status](https://travis-ci.org/laravel/framework.png)](https://travis-ci.org/laravel/framework) [![License](https://poser.pugx.org/laravel/framework/license.png)](https://packagist.org/packages/laravel/framework) Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching. diff --git a/vendor/autoload.php b/vendor/autoload.php index 12afaae..5e4c3ab 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit72c82083eb743a8ff678afeb7e958c8c::getLoader(); +return ComposerAutoloaderInit4e1d2aaddcd2f75f0f3175deecdcb335::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 5a213fc..a2d0ff9 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -28,7 +28,6 @@ return array( 'ClassPreloader\\Parser\\DirVisitor' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Parser/DirVisitor.php', 'ClassPreloader\\Parser\\FileVisitor' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Parser/FileVisitor.php', 'ClassPreloader\\Parser\\NodeTraverser' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Parser/NodeTraverser.php', - 'CreateMentorsTable' => $baseDir . '/app/database/migrations/2014_06_04_041712_create_mentors_table.php', 'Crypt_AES' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/AES.php', 'Crypt_Base' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Base.php', 'Crypt_Blowfish' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php', @@ -59,12 +58,10 @@ return array( 'Illuminate\\Auth\\Reminders\\DatabaseReminderRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/DatabaseReminderRepository.php', 'Illuminate\\Auth\\Reminders\\PasswordBroker' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/PasswordBroker.php', 'Illuminate\\Auth\\Reminders\\RemindableInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/RemindableInterface.php', - 'Illuminate\\Auth\\Reminders\\RemindableTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/RemindableTrait.php', 'Illuminate\\Auth\\Reminders\\ReminderRepositoryInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/ReminderRepositoryInterface.php', 'Illuminate\\Auth\\Reminders\\ReminderServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/ReminderServiceProvider.php', 'Illuminate\\Auth\\UserInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/UserInterface.php', 'Illuminate\\Auth\\UserProviderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/UserProviderInterface.php', - 'Illuminate\\Auth\\UserTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/UserTrait.php', 'Illuminate\\Cache\\ApcStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcStore.php', 'Illuminate\\Cache\\ApcWrapper' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcWrapper.php', 'Illuminate\\Cache\\ArrayStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ArrayStore.php', @@ -92,7 +89,6 @@ return array( 'Illuminate\\Config\\Repository' => $vendorDir . '/laravel/framework/src/Illuminate/Config/Repository.php', 'Illuminate\\Console\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Application.php', 'Illuminate\\Console\\Command' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Command.php', - 'Illuminate\\Console\\ConfirmableTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php', 'Illuminate\\Container\\BindingResolutionException' => $vendorDir . '/laravel/framework/src/Illuminate/Container/Container.php', 'Illuminate\\Container\\Container' => $vendorDir . '/laravel/framework/src/Illuminate/Container/Container.php', 'Illuminate\\Cookie\\CookieJar' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/CookieJar.php', @@ -140,9 +136,6 @@ return array( 'Illuminate\\Database\\Eloquent\\Relations\\MorphToMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php', 'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php', 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', - 'Illuminate\\Database\\Eloquent\\ScopeInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/ScopeInterface.php', - 'Illuminate\\Database\\Eloquent\\SoftDeletingScope' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php', - 'Illuminate\\Database\\Eloquent\\SoftDeletingTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingTrait.php', 'Illuminate\\Database\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Grammar.php', 'Illuminate\\Database\\MigrationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php', 'Illuminate\\Database\\Migrations\\DatabaseMigrationRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php', @@ -244,17 +237,13 @@ return array( 'Illuminate\\Http\\RedirectResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php', 'Illuminate\\Http\\Request' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Request.php', 'Illuminate\\Http\\Response' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Response.php', - 'Illuminate\\Http\\ResponseTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Http/ResponseTrait.php', 'Illuminate\\Log\\LogServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Log/LogServiceProvider.php', 'Illuminate\\Log\\Writer' => $vendorDir . '/laravel/framework/src/Illuminate/Log/Writer.php', 'Illuminate\\Mail\\MailServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php', 'Illuminate\\Mail\\Mailer' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Mailer.php', 'Illuminate\\Mail\\Message' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Message.php', - 'Illuminate\\Mail\\Transport\\LogTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php', - 'Illuminate\\Mail\\Transport\\MailgunTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php', - 'Illuminate\\Mail\\Transport\\MandrillTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php', 'Illuminate\\Pagination\\BootstrapPresenter' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php', - 'Illuminate\\Pagination\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Factory.php', + 'Illuminate\\Pagination\\Environment' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Environment.php', 'Illuminate\\Pagination\\PaginationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php', 'Illuminate\\Pagination\\Paginator' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Paginator.php', 'Illuminate\\Pagination\\Presenter' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Presenter.php', @@ -324,8 +313,6 @@ return array( 'Illuminate\\Session\\CommandsServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CommandsServiceProvider.php', 'Illuminate\\Session\\Console\\SessionTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php', 'Illuminate\\Session\\CookieSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php', - 'Illuminate\\Session\\DatabaseSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php', - 'Illuminate\\Session\\ExistenceAwareInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php', 'Illuminate\\Session\\FileSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/FileSessionHandler.php', 'Illuminate\\Session\\Middleware' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Middleware.php', 'Illuminate\\Session\\SessionInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Session/SessionInterface.php', @@ -381,8 +368,6 @@ return array( 'Illuminate\\Support\\SerializableClosure' => $vendorDir . '/laravel/framework/src/Illuminate/Support/SerializableClosure.php', 'Illuminate\\Support\\ServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ServiceProvider.php', 'Illuminate\\Support\\Str' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Str.php', - 'Illuminate\\Support\\Traits\\MacroableTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Traits/MacroableTrait.php', - 'Illuminate\\Support\\ViewErrorBag' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ViewErrorBag.php', 'Illuminate\\Translation\\FileLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/FileLoader.php', 'Illuminate\\Translation\\LoaderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/LoaderInterface.php', 'Illuminate\\Translation\\TranslationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php', @@ -400,7 +385,7 @@ return array( 'Illuminate\\View\\Engines\\EngineInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/EngineInterface.php', 'Illuminate\\View\\Engines\\EngineResolver' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/EngineResolver.php', 'Illuminate\\View\\Engines\\PhpEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php', - 'Illuminate\\View\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/View/Factory.php', + 'Illuminate\\View\\Environment' => $vendorDir . '/laravel/framework/src/Illuminate/View/Environment.php', 'Illuminate\\View\\FileViewFinder' => $vendorDir . '/laravel/framework/src/Illuminate/View/FileViewFinder.php', 'Illuminate\\View\\View' => $vendorDir . '/laravel/framework/src/Illuminate/View/View.php', 'Illuminate\\View\\ViewFinderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php', @@ -416,8 +401,6 @@ return array( 'Jeremeamia\\SuperClosure\\Visitor\\ClosureFinderVisitor' => $vendorDir . '/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/Visitor/ClosureFinderVisitor.php', 'Jeremeamia\\SuperClosure\\Visitor\\MagicConstantVisitor' => $vendorDir . '/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/Visitor/MagicConstantVisitor.php', 'Math_BigInteger' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Math/BigInteger.php', - 'Mentor' => $baseDir . '/app/models/Mentor.php', - 'MentorController' => $baseDir . '/app/controllers/MentorController.php', 'Monolog\\ErrorHandler' => $vendorDir . '/monolog/monolog/src/Monolog/ErrorHandler.php', 'Monolog\\Formatter\\ChromePHPFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php', 'Monolog\\Formatter\\ElasticaFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php', @@ -679,6 +662,7 @@ return array( 'Patchwork\\TurkishUtf8' => $vendorDir . '/patchwork/utf8/class/Patchwork/TurkishUtf8.php', 'Patchwork\\Utf8' => $vendorDir . '/patchwork/utf8/class/Patchwork/Utf8.php', 'Patchwork\\Utf8\\Bootup' => $vendorDir . '/patchwork/utf8/class/Patchwork/Utf8/Bootup.php', + 'Patchwork\\Utf8\\WinFsStreamWrapper' => $vendorDir . '/patchwork/utf8/class/Patchwork/Utf8/WinFsStreamWrapper.php', 'Predis\\Autoloader' => $vendorDir . '/predis/predis/lib/Predis/Autoloader.php', 'Predis\\BasicClientInterface' => $vendorDir . '/predis/predis/lib/Predis/BasicClientInterface.php', 'Predis\\Client' => $vendorDir . '/predis/predis/lib/Predis/Client.php', @@ -981,13 +965,8 @@ return array( 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/HelperInterface.php', 'Symfony\\Component\\Console\\Helper\\HelperSet' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/HelperSet.php', 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/InputAwareHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProgressBar' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/ProgressBar.php', 'Symfony\\Component\\Console\\Helper\\ProgressHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php', - 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/QuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\Table' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/Table.php', 'Symfony\\Component\\Console\\Helper\\TableHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/TableHelper.php', - 'Symfony\\Component\\Console\\Helper\\TableSeparator' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/TableSeparator.php', - 'Symfony\\Component\\Console\\Helper\\TableStyle' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/TableStyle.php', 'Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/ArgvInput.php', 'Symfony\\Component\\Console\\Input\\ArrayInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/ArrayInput.php', 'Symfony\\Component\\Console\\Input\\Input' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/Input.php', @@ -997,7 +976,6 @@ return array( 'Symfony\\Component\\Console\\Input\\InputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/InputInterface.php', 'Symfony\\Component\\Console\\Input\\InputOption' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/InputOption.php', 'Symfony\\Component\\Console\\Input\\StringInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/StringInput.php', - 'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => $vendorDir . '/symfony/console/Symfony/Component/Console/Logger/ConsoleLogger.php', 'Symfony\\Component\\Console\\Output\\BufferedOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/BufferedOutput.php', 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/ConsoleOutput.php', 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/ConsoleOutputInterface.php', @@ -1005,9 +983,6 @@ return array( 'Symfony\\Component\\Console\\Output\\Output' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/Output.php', 'Symfony\\Component\\Console\\Output\\OutputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/OutputInterface.php', 'Symfony\\Component\\Console\\Output\\StreamOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/StreamOutput.php', - 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => $vendorDir . '/symfony/console/Symfony/Component/Console/Question/ChoiceQuestion.php', - 'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => $vendorDir . '/symfony/console/Symfony/Component/Console/Question/ConfirmationQuestion.php', - 'Symfony\\Component\\Console\\Question\\Question' => $vendorDir . '/symfony/console/Symfony/Component/Console/Question/Question.php', 'Symfony\\Component\\Console\\Shell' => $vendorDir . '/symfony/console/Symfony/Component/Console/Shell.php', 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tester/ApplicationTester.php', 'Symfony\\Component\\Console\\Tester\\CommandTester' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tester/CommandTester.php', @@ -1016,7 +991,6 @@ return array( 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorApplication2' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php', 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorCommand1' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php', 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorCommand2' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php', - 'Symfony\\Component\\Console\\Tests\\Fixtures\\DummyOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php', 'Symfony\\Component\\CssSelector\\CssSelector' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/CssSelector.php', 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExceptionInterface.php', 'Symfony\\Component\\CssSelector\\Exception\\ExpressionErrorException' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php', @@ -1068,24 +1042,16 @@ return array( 'Symfony\\Component\\Debug\\Debug' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Debug.php', 'Symfony\\Component\\Debug\\DebugClassLoader' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php', 'Symfony\\Component\\Debug\\ErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/ErrorHandler.php', - 'Symfony\\Component\\Debug\\ErrorHandlerCanary' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/ErrorHandler.php', 'Symfony\\Component\\Debug\\ExceptionHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php', 'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php', 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/ContextErrorException.php', 'Symfony\\Component\\Debug\\Exception\\DummyException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php', 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php', 'Symfony\\Component\\Debug\\Exception\\FlattenException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php', - 'Symfony\\Component\\Debug\\Exception\\OutOfMemoryException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/OutOfMemoryException.php', 'Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php', - 'Symfony\\Component\\Debug\\Exception\\UndefinedMethodException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/UndefinedMethodException.php', 'Symfony\\Component\\Debug\\FatalErrorHandler\\ClassNotFoundFatalErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php', 'Symfony\\Component\\Debug\\FatalErrorHandler\\FatalErrorHandlerInterface' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.php', 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedFunctionFatalErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php', - 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedMethodFatalErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php', - 'Symfony\\Component\\Debug\\Tests\\Fixtures\\CaseMismatch' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/casemismatch.php', - 'Symfony\\Component\\Debug\\Tests\\Fixtures\\NotPSR0' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/reallyNotPsr0.php', - 'Symfony\\Component\\Debug\\Tests\\Fixtures\\NotPSR0bis' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/notPsr0Bis.php', - 'Symfony\\Component\\Debug\\Tests\\Fixtures\\PSR4CaseMismatch' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/psr4/Psr4CaseMismatch.php', 'Symfony\\Component\\Debug\\Tests\\Fixtures\\RequiredTwice' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/RequiredTwice.php', 'Symfony\\Component\\Debug\\Tests\\MockExceptionHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/MockExceptionHandler.php', 'Symfony\\Component\\DomCrawler\\Crawler' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php', @@ -1257,8 +1223,6 @@ return array( 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorsLoggerListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\EsiListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/EsiListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php', @@ -1295,7 +1259,6 @@ return array( 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php', 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php', 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php', @@ -1447,7 +1410,6 @@ return array( 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php', 'Symfony\\Component\\Security\\Core\\Encoder\\BCryptPasswordEncoder' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php', 'Symfony\\Component\\Security\\Core\\Encoder\\BasePasswordEncoder' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderAwareInterface' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php', 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactory' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php', 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php', 'Symfony\\Component\\Security\\Core\\Encoder\\MessageDigestPasswordEncoder' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php', @@ -1551,7 +1513,6 @@ return array( 'TestCase' => $baseDir . '/app/tests/TestCase.php', 'User' => $baseDir . '/app/models/User.php', 'Whoops\\Exception\\ErrorException' => $vendorDir . '/filp/whoops/src/Whoops/Exception/ErrorException.php', - 'Whoops\\Exception\\Formatter' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Formatter.php', 'Whoops\\Exception\\Frame' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Frame.php', 'Whoops\\Exception\\FrameCollection' => $vendorDir . '/filp/whoops/src/Whoops/Exception/FrameCollection.php', 'Whoops\\Exception\\Inspector' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Inspector.php', @@ -1559,16 +1520,12 @@ return array( 'Whoops\\Handler\\Handler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/Handler.php', 'Whoops\\Handler\\HandlerInterface' => $vendorDir . '/filp/whoops/src/Whoops/Handler/HandlerInterface.php', 'Whoops\\Handler\\JsonResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php', - 'Whoops\\Handler\\PlainTextHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PlainTextHandler.php', 'Whoops\\Handler\\PrettyPageHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php', - 'Whoops\\Handler\\SoapResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/SoapResponseHandler.php', 'Whoops\\Handler\\XmlResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php', - 'Whoops\\Module' => $vendorDir . '/filp/whoops/src/deprecated/Zend/Module.php', + 'Whoops\\Module' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/Module.php', 'Whoops\\Provider\\Phalcon\\WhoopsServiceProvider' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Phalcon/WhoopsServiceProvider.php', 'Whoops\\Provider\\Silex\\WhoopsServiceProvider' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Silex/WhoopsServiceProvider.php', - 'Whoops\\Provider\\Zend\\ExceptionStrategy' => $vendorDir . '/filp/whoops/src/deprecated/Zend/ExceptionStrategy.php', - 'Whoops\\Provider\\Zend\\RouteNotFoundStrategy' => $vendorDir . '/filp/whoops/src/deprecated/Zend/RouteNotFoundStrategy.php', + 'Whoops\\Provider\\Zend\\ExceptionStrategy' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php', + 'Whoops\\Provider\\Zend\\RouteNotFoundStrategy' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php', 'Whoops\\Run' => $vendorDir . '/filp/whoops/src/Whoops/Run.php', - 'Whoops\\Util\\Misc' => $vendorDir . '/filp/whoops/src/Whoops/Util/Misc.php', - 'Whoops\\Util\\TemplateHelper' => $vendorDir . '/filp/whoops/src/Whoops/Util/TemplateHelper.php', ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 097d560..73f21c2 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit72c82083eb743a8ff678afeb7e958c8c +class ComposerAutoloaderInit4e1d2aaddcd2f75f0f3175deecdcb335 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit72c82083eb743a8ff678afeb7e958c8c return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit72c82083eb743a8ff678afeb7e958c8c', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit4e1d2aaddcd2f75f0f3175deecdcb335', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit72c82083eb743a8ff678afeb7e958c8c', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit4e1d2aaddcd2f75f0f3175deecdcb335', 'loadClassLoader')); $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); @@ -49,14 +49,14 @@ class ComposerAutoloaderInit72c82083eb743a8ff678afeb7e958c8c $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $file) { - composerRequire72c82083eb743a8ff678afeb7e958c8c($file); + composerRequire4e1d2aaddcd2f75f0f3175deecdcb335($file); } return $loader; } } -function composerRequire72c82083eb743a8ff678afeb7e958c8c($file) +function composerRequire4e1d2aaddcd2f75f0f3175deecdcb335($file) { require $file; } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index cd80d07..963a1a2 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,18 +1,18 @@ [ { "name": "symfony/translation", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", "target-dir": "Symfony/Component/Translation", "source": { "type": "git", "url": "https://github.com/symfony/Translation.git", - "reference": "5f23265dcf8927a84be832608069c9edca3cf5f4" + "reference": "9a3941444487ea57acd38f5c61bee1e0c3f69293" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/5f23265dcf8927a84be832608069c9edca3cf5f4", - "reference": "5f23265dcf8927a84be832608069c9edca3cf5f4", + "url": "https://api.github.com/repos/symfony/Translation/zipball/9a3941444487ea57acd38f5c61bee1e0c3f69293", + "reference": "9a3941444487ea57acd38f5c61bee1e0c3f69293", "shasum": "" }, "require": { @@ -26,11 +26,11 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2014-05-22 13:47:45", + "time": "2014-05-22 13:46:01", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -60,18 +60,18 @@ }, { "name": "symfony/security-core", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", "target-dir": "Symfony/Component/Security/Core", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "de6e3aa1362d77f6bf91f17039cd403807ee5c27" + "reference": "1fbe80d10b7a5bcb619abe3e4cfede795d9958dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/de6e3aa1362d77f6bf91f17039cd403807ee5c27", - "reference": "de6e3aa1362d77f6bf91f17039cd403807ee5c27", + "url": "https://api.github.com/repos/symfony/security-core/zipball/1fbe80d10b7a5bcb619abe3e4cfede795d9958dc", + "reference": "1fbe80d10b7a5bcb619abe3e4cfede795d9958dc", "shasum": "" }, "require": { @@ -92,11 +92,11 @@ "symfony/http-foundation": "", "symfony/validator": "For using the user password constraint" }, - "time": "2014-04-23 14:08:54", + "time": "2014-04-23 14:04:21", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -125,48 +125,26 @@ "homepage": "http://symfony.com" }, { - "name": "symfony/routing", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", - "target-dir": "Symfony/Component/Routing", + "name": "psr/log", + "version": "1.0.0", + "version_normalized": "1.0.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56" + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", - "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", "shasum": "" }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "psr/log": "~1.0", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/yaml": "~2.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/yaml": "For using the YAML loader" - }, - "time": "2014-04-23 14:08:54", + "time": "2012-12-21 11:40:51", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Routing\\": "" + "Psr\\Log\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -175,56 +153,54 @@ ], "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": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Symfony Routing Component", - "homepage": "http://symfony.com", + "description": "Common interface for logging libraries", "keywords": [ - "router", - "routing", - "uri", - "url" + "log", + "psr", + "psr-3" ] }, { - "name": "symfony/process", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", - "target-dir": "Symfony/Component/Process", + "name": "symfony/http-foundation", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", + "target-dir": "Symfony/Component/HttpFoundation", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "5d7d78e23894544740219e006320678cfa4cd45b" + "url": "https://github.com/symfony/HttpFoundation.git", + "reference": "138498f3d64981cfafcb5eec3b2b96fce44a178e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/5d7d78e23894544740219e006320678cfa4cd45b", - "reference": "5d7d78e23894544740219e006320678cfa4cd45b", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/138498f3d64981cfafcb5eec3b2b96fce44a178e", + "reference": "138498f3d64981cfafcb5eec3b2b96fce44a178e", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2014-05-23 09:02:52", + "require-dev": { + "symfony/expression-language": "~2.4" + }, + "time": "2014-05-22 16:21:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Process\\": "" - } + "Symfony\\Component\\HttpFoundation\\": "" + }, + "classmap": [ + "Symfony/Component/HttpFoundation/Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -242,30 +218,49 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony HttpFoundation Component", "homepage": "http://symfony.com" }, { - "name": "psr/log", - "version": "1.0.0", - "version_normalized": "1.0.0.0", + "name": "symfony/event-dispatcher", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", + "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "url": "https://github.com/symfony/EventDispatcher.git", + "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", + "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", "shasum": "" }, - "time": "2012-12-21 11:40:51", + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0", + "symfony/dependency-injection": "~2.0", + "symfony/stopwatch": "~2.2" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2014-04-29 10:13:57", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, "installation-source": "dist", "autoload": { "psr-0": { - "Psr\\Log\\": "" + "Symfony\\Component\\EventDispatcher\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -274,31 +269,33 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" } ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ] + "description": "Symfony EventDispatcher Component", + "homepage": "http://symfony.com" }, { "name": "symfony/debug", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", "target-dir": "Symfony/Component/Debug", "source": { "type": "git", "url": "https://github.com/symfony/Debug.git", - "reference": "7fd8006e4604ef99c95050ca2b5c7c5b41f5c704" + "reference": "6e721ae2cd7bde0f8dfa9c3186808a6c4140469c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/7fd8006e4604ef99c95050ca2b5c7c5b41f5c704", - "reference": "7fd8006e4604ef99c95050ca2b5c7c5b41f5c704", + "url": "https://api.github.com/repos/symfony/Debug/zipball/6e721ae2cd7bde0f8dfa9c3186808a6c4140469c", + "reference": "6e721ae2cd7bde0f8dfa9c3186808a6c4140469c", "shasum": "" }, "require": { @@ -312,11 +309,11 @@ "symfony/http-foundation": "", "symfony/http-kernel": "" }, - "time": "2014-05-25 14:44:21", + "time": "2014-04-30 06:22:28", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -345,42 +342,60 @@ "homepage": "http://symfony.com" }, { - "name": "symfony/http-foundation", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", - "target-dir": "Symfony/Component/HttpFoundation", + "name": "symfony/http-kernel", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", + "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "044085422005aa3258fb3f710a7bf0202011f259" + "url": "https://github.com/symfony/HttpKernel.git", + "reference": "084a126a36ed011b098158d4d28daa9883ecc8f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/044085422005aa3258fb3f710a7bf0202011f259", - "reference": "044085422005aa3258fb3f710a7bf0202011f259", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/084a126a36ed011b098158d4d28daa9883ecc8f7", + "reference": "084a126a36ed011b098158d4d28daa9883ecc8f7", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "psr/log": "~1.0", + "symfony/debug": "~2.3", + "symfony/event-dispatcher": "~2.1", + "symfony/http-foundation": "~2.4" }, "require-dev": { - "symfony/expression-language": "~2.4" + "symfony/browser-kit": "~2.2", + "symfony/class-loader": "~2.1", + "symfony/config": "~2.0", + "symfony/console": "~2.2", + "symfony/dependency-injection": "~2.0", + "symfony/finder": "~2.0", + "symfony/process": "~2.0", + "symfony/routing": "~2.2", + "symfony/stopwatch": "~2.2", + "symfony/templating": "~2.2" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "" }, - "time": "2014-05-26 19:02:40", + "time": "2014-05-31 18:42:13", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ] + "Symfony\\Component\\HttpKernel\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -398,49 +413,52 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony HttpFoundation Component", + "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com" }, { - "name": "symfony/event-dispatcher", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", - "target-dir": "Symfony/Component/EventDispatcher", + "name": "symfony/routing", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", + "target-dir": "Symfony/Component/Routing", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8" + "url": "https://github.com/symfony/Routing.git", + "reference": "74229f66e16bce6d2415ca44d4756f8e7ea880f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", - "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", + "url": "https://api.github.com/repos/symfony/Routing/zipball/74229f66e16bce6d2415ca44d4756f8e7ea880f8", + "reference": "74229f66e16bce6d2415ca44d4756f8e7ea880f8", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { + "doctrine/annotations": "~1.0", "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/dependency-injection": "~2.0", - "symfony/stopwatch": "~2.2" + "symfony/config": "~2.2", + "symfony/expression-language": "~2.4", + "symfony/yaml": "~2.0" }, "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/yaml": "For using the YAML loader" }, - "time": "2014-04-29 10:13:57", + "time": "2014-04-23 14:04:21", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" + "Symfony\\Component\\Routing\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -459,63 +477,45 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com" + "description": "Symfony Routing Component", + "homepage": "http://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ] }, { - "name": "symfony/http-kernel", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", - "target-dir": "Symfony/Component/HttpKernel", + "name": "symfony/process", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", + "target-dir": "Symfony/Component/Process", "source": { "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "432a828e796a575d4a325a0fdf14132a615d2c53" + "url": "https://github.com/symfony/Process.git", + "reference": "a7118cb290c62068b3c8ecfbf8b2eda8421fb841" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/432a828e796a575d4a325a0fdf14132a615d2c53", - "reference": "432a828e796a575d4a325a0fdf14132a615d2c53", + "url": "https://api.github.com/repos/symfony/Process/zipball/a7118cb290c62068b3c8ecfbf8b2eda8421fb841", + "reference": "a7118cb290c62068b3c8ecfbf8b2eda8421fb841", "shasum": "" }, "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/debug": "~2.5", - "symfony/event-dispatcher": "~2.1", - "symfony/http-foundation": "~2.4" - }, - "require-dev": { - "symfony/browser-kit": "~2.2", - "symfony/class-loader": "~2.1", - "symfony/config": "~2.0", - "symfony/console": "~2.2", - "symfony/dependency-injection": "~2.0", - "symfony/finder": "~2.0", - "symfony/process": "~2.0", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.2", - "symfony/templating": "~2.2" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "" + "php": ">=5.3.3" }, - "time": "2014-05-31 18:45:50", + "time": "2014-05-22 13:46:01", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" + "Symfony\\Component\\Process\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -534,33 +534,33 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony HttpKernel Component", + "description": "Symfony Process Component", "homepage": "http://symfony.com" }, { "name": "symfony/finder", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", "target-dir": "Symfony/Component/Finder", "source": { "type": "git", "url": "https://github.com/symfony/Finder.git", - "reference": "307aad2c541bbdf43183043645e186ef2cd6b973" + "reference": "46295af1b1e24304b35d5f20f1bf1ec0c2c4934a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/307aad2c541bbdf43183043645e186ef2cd6b973", - "reference": "307aad2c541bbdf43183043645e186ef2cd6b973", + "url": "https://api.github.com/repos/symfony/Finder/zipball/46295af1b1e24304b35d5f20f1bf1ec0c2c4934a", + "reference": "46295af1b1e24304b35d5f20f1bf1ec0c2c4934a", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2014-05-22 13:47:45", + "time": "2014-05-22 13:46:01", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -590,18 +590,18 @@ }, { "name": "symfony/dom-crawler", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", "target-dir": "Symfony/Component/DomCrawler", "source": { "type": "git", "url": "https://github.com/symfony/DomCrawler.git", - "reference": "6cda499120860286fe3d3d2fd631dacb7ae17f92" + "reference": "77881ef11c064a490515a9fb1729b695c632ffe5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/6cda499120860286fe3d3d2fd631dacb7ae17f92", - "reference": "6cda499120860286fe3d3d2fd631dacb7ae17f92", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/77881ef11c064a490515a9fb1729b695c632ffe5", + "reference": "77881ef11c064a490515a9fb1729b695c632ffe5", "shasum": "" }, "require": { @@ -613,11 +613,11 @@ "suggest": { "symfony/css-selector": "" }, - "time": "2014-05-31 02:02:56", + "time": "2014-05-31 02:02:48", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -647,28 +647,28 @@ }, { "name": "symfony/css-selector", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", "target-dir": "Symfony/Component/CssSelector", "source": { "type": "git", "url": "https://github.com/symfony/CssSelector.git", - "reference": "bcdd62af59bd3137ede467946a06d41f8644048c" + "reference": "268d0a51166edaf84dfcf043c57f273685cb7c93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/bcdd62af59bd3137ede467946a06d41f8644048c", - "reference": "bcdd62af59bd3137ede467946a06d41f8644048c", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/268d0a51166edaf84dfcf043c57f273685cb7c93", + "reference": "268d0a51166edaf84dfcf043c57f273685cb7c93", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2014-05-12 09:28:39", + "time": "2014-05-12 09:27:48", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -702,36 +702,34 @@ }, { "name": "symfony/console", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c" + "reference": "24f723436e62598c9dddee2a8573d6992504dc5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", - "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", + "url": "https://api.github.com/repos/symfony/Console/zipball/24f723436e62598c9dddee2a8573d6992504dc5d", + "reference": "24f723436e62598c9dddee2a8573d6992504dc5d", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "psr/log": "~1.0", "symfony/event-dispatcher": "~2.1" }, "suggest": { - "psr/log": "For using the console logger", "symfony/event-dispatcher": "" }, - "time": "2014-05-22 08:54:24", + "time": "2014-05-14 21:48:29", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -761,18 +759,18 @@ }, { "name": "symfony/browser-kit", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", "target-dir": "Symfony/Component/BrowserKit", "source": { "type": "git", "url": "https://github.com/symfony/BrowserKit.git", - "reference": "cc1716dafa04277a0c987aee5bce8c3cf8939de3" + "reference": "5c80003d5772de6120b5429f4b2f6e22957d4a07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/cc1716dafa04277a0c987aee5bce8c3cf8939de3", - "reference": "cc1716dafa04277a0c987aee5bce8c3cf8939de3", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/5c80003d5772de6120b5429f4b2f6e22957d4a07", + "reference": "5c80003d5772de6120b5429f4b2f6e22957d4a07", "shasum": "" }, "require": { @@ -786,11 +784,11 @@ "suggest": { "symfony/process": "" }, - "time": "2014-05-12 09:28:39", + "time": "2014-05-12 09:27:48", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -820,17 +818,17 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v5.2.0", - "version_normalized": "5.2.0.0", + "version": "v5.2.1", + "version_normalized": "5.2.1.0", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "043e336b871f17a117f76ef8e190eddfc04c8d48" + "reference": "2b9af56cc676c338d52fca4c657e5bdff73bb7af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/043e336b871f17a117f76ef8e190eddfc04c8d48", - "reference": "043e336b871f17a117f76ef8e190eddfc04c8d48", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/2b9af56cc676c338d52fca4c657e5bdff73bb7af", + "reference": "2b9af56cc676c338d52fca4c657e5bdff73bb7af", "shasum": "" }, "require": { @@ -839,7 +837,7 @@ "require-dev": { "mockery/mockery": "~0.9.1" }, - "time": "2014-05-08 08:11:19", + "time": "2014-06-13 11:44:54", "type": "library", "extra": { "branch-alias": { @@ -1074,17 +1072,17 @@ }, { "name": "patchwork/utf8", - "version": "v1.1.23", - "version_normalized": "1.1.23.0", + "version": "v1.1.24", + "version_normalized": "1.1.24.0", "source": { "type": "git", "url": "https://github.com/nicolas-grekas/Patchwork-UTF8.git", - "reference": "c1edbc82aed49ff2bdef0a0f659bf69e3f7b14cc" + "reference": "40f552c019956f446553b19f7de2da2f9c74d730" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nicolas-grekas/Patchwork-UTF8/zipball/c1edbc82aed49ff2bdef0a0f659bf69e3f7b14cc", - "reference": "c1edbc82aed49ff2bdef0a0f659bf69e3f7b14cc", + "url": "https://api.github.com/repos/nicolas-grekas/Patchwork-UTF8/zipball/40f552c019956f446553b19f7de2da2f9c74d730", + "reference": "40f552c019956f446553b19f7de2da2f9c74d730", "shasum": "" }, "require": { @@ -1096,7 +1094,7 @@ "ext-intl": "Use Intl for best performance", "ext-mbstring": "Use Mbstring for best performance" }, - "time": "2014-05-22 13:59:09", + "time": "2014-06-17 08:23:06", "type": "library", "installation-source": "dist", "autoload": { @@ -1175,17 +1173,17 @@ }, { "name": "monolog/monolog", - "version": "1.9.1", - "version_normalized": "1.9.1.0", + "version": "1.10.0", + "version_normalized": "1.10.0.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "65026b610f8c19e61d7242f600530677b0466aac" + "reference": "25b16e801979098cb2f120e697bfce454b18bf23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/65026b610f8c19e61d7242f600530677b0466aac", - "reference": "65026b610f8c19e61d7242f600530677b0466aac", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/25b16e801979098cb2f120e697bfce454b18bf23", + "reference": "25b16e801979098cb2f120e697bfce454b18bf23", "shasum": "" }, "require": { @@ -1210,11 +1208,11 @@ "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, - "time": "2014-04-24 13:29:03", + "time": "2014-06-04 16:30:04", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9.x-dev" + "dev-master": "1.10.x-dev" } }, "installation-source": "dist", @@ -1341,40 +1339,33 @@ }, { "name": "filp/whoops", - "version": "1.1.1", - "version_normalized": "1.1.1.0", + "version": "1.0.10", + "version_normalized": "1.0.10.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "ae05259236204ccf904a94e5b0d96df8d4351da5" + "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/ae05259236204ccf904a94e5b0d96df8d4351da5", - "reference": "ae05259236204ccf904a94e5b0d96df8d4351da5", + "url": "https://api.github.com/repos/filp/whoops/zipball/91e3fd4b0812017ffbeb24add55330664e1ea32a", + "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "mockery/mockery": "0.9.*" + "mockery/mockery": "dev-master", + "silex/silex": "1.0.*@dev" }, - "time": "2014-05-13 05:05:11", + "time": "2013-12-04 14:19:30", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, "installation-source": "dist", "autoload": { "psr-0": { "Whoops": "src/" - }, - "classmap": [ - "src/deprecated" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1578,45 +1569,45 @@ }, { "name": "laravel/framework", - "version": "v4.2.1", - "version_normalized": "4.2.1.0", + "version": "v4.1.30", + "version_normalized": "4.1.30.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "be75911bf8f7fe81a2db1dd2585324d080289dd5" + "reference": "1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/be75911bf8f7fe81a2db1dd2585324d080289dd5", - "reference": "be75911bf8f7fe81a2db1dd2585324d080289dd5", + "url": "https://api.github.com/repos/laravel/framework/zipball/1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab", + "reference": "1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab", "shasum": "" }, "require": { - "classpreloader/classpreloader": "~1.0", - "d11wtq/boris": "~1.0", - "filp/whoops": "1.1.*", - "ircmaxell/password-compat": "~1.0", - "jeremeamia/superclosure": "~1.0", - "monolog/monolog": "~1.6", - "nesbot/carbon": "~1.0", + "classpreloader/classpreloader": "1.0.*", + "d11wtq/boris": "1.0.*", + "filp/whoops": "1.0.10", + "ircmaxell/password-compat": "1.0.*", + "jeremeamia/superclosure": "1.0.*", + "monolog/monolog": "1.*", + "nesbot/carbon": "1.*", "patchwork/utf8": "1.1.*", - "php": ">=5.4.0", + "php": ">=5.3.0", "phpseclib/phpseclib": "0.3.*", "predis/predis": "0.8.*", - "stack/builder": "~1.0", - "swiftmailer/swiftmailer": "~5.1", - "symfony/browser-kit": "2.5.*", - "symfony/console": "2.5.*", - "symfony/css-selector": "2.5.*", - "symfony/debug": "2.5.*", - "symfony/dom-crawler": "2.5.*", - "symfony/finder": "2.5.*", - "symfony/http-foundation": "2.5.*", - "symfony/http-kernel": "2.5.*", - "symfony/process": "2.5.*", - "symfony/routing": "2.5.*", - "symfony/security-core": "2.5.*", - "symfony/translation": "2.5.*" + "stack/builder": "1.0.*", + "swiftmailer/swiftmailer": "~5.0", + "symfony/browser-kit": "2.4.*", + "symfony/console": "2.4.*", + "symfony/css-selector": "2.4.*", + "symfony/debug": "2.4.*", + "symfony/dom-crawler": "2.4.*", + "symfony/finder": "2.4.*", + "symfony/http-foundation": "2.4.*", + "symfony/http-kernel": "2.4.*", + "symfony/process": "2.4.*", + "symfony/routing": "2.4.*", + "symfony/security-core": "2.4.*", + "symfony/translation": "2.4.*" }, "replace": { "illuminate/auth": "self.version", @@ -1649,20 +1640,20 @@ "illuminate/workbench": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "~2.6", - "iron-io/iron_mq": "~1.5", - "mockery/mockery": "~0.9", - "pda/pheanstalk": "~2.1", - "phpunit/phpunit": "~4.0" + "aws/aws-sdk-php": "2.6.*", + "iron-io/iron_mq": "1.5.*", + "mockery/mockery": "0.9.*", + "pda/pheanstalk": "2.1.*", + "phpunit/phpunit": "4.0.*" }, "suggest": { "doctrine/dbal": "Allow renaming columns and dropping SQLite columns." }, - "time": "2014-06-01 18:14:55", + "time": "2014-06-01 18:30:26", "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "installation-source": "dist", diff --git a/vendor/filp/whoops/.travis.yml b/vendor/filp/whoops/.travis.yml index 1bbd767..076a66b 100644 --- a/vendor/filp/whoops/.travis.yml +++ b/vendor/filp/whoops/.travis.yml @@ -1,23 +1,6 @@ language: php - php: - # 5.3.0 is not supported by Travis - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm - + - 5.4 + - 5.3 before_script: - - composer self-update - # --prefer-source is required to avoid hitting GitHub API limit: - # https://github.com/composer/composer/issues/1314 - - composer install --no-interaction --prefer-source --dev - -script: - - phpunit --verbose --coverage-clover build/logs/clover.xml - -after_success: - - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;' - - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi;' + - composer install --dev diff --git a/vendor/filp/whoops/README.md b/vendor/filp/whoops/README.md index 4c65c2a..3ee890b 100644 --- a/vendor/filp/whoops/README.md +++ b/vendor/filp/whoops/README.md @@ -1,12 +1,8 @@ -# whoops +# whoops php errors for cool kids -[![Total Downloads](https://img.shields.io/packagist/dm/filp/whoops.svg)](https://packagist.org/packages/filp/whoops) -[![Latest Version](http://img.shields.io/packagist/v/filp/whoops.svg)](https://packagist.org/packages/filp/whoops) -[![Build Status](https://travis-ci.org/filp/whoops.svg?branch=master)](https://travis-ci.org/filp/whoops) -[![Dependency Status](https://depending.in/filp/whoops.png)](https://depending.in/filp/whoops) -[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/filp/whoops/badges/quality-score.png?s=6225c36f2a2dd1fdca11ecc7b10b29105c8c62bd)](https://scrutinizer-ci.com/g/filp/whoops) -[![Code Coverage](https://scrutinizer-ci.com/g/filp/whoops/badges/coverage.png?s=711feb2069144d252d111b211965ffb19a7d09a8)](https://scrutinizer-ci.com/g/filp/whoops) +[![Build Status](https://travis-ci.org/filp/whoops.png?branch=master)](https://travis-ci.org/filp/whoops) [![Total Downloads](https://poser.pugx.org/filp/whoops/downloads.png)](https://packagist.org/packages/filp/whoops) [![Latest Stable Version](https://poser.pugx.org/filp/whoops/v/stable.png)](https://packagist.org/packages/filp/whoops) + ----- @@ -22,40 +18,188 @@ powerful stacked error handling system. - Stand-alone library with (currently) no required dependencies - Simple API for dealing with exceptions, trace frames & their data - Includes a pretty rad error page for your webapp projects -- Includes the ability to [open referenced files directly in your editor and IDE](docs/Open%20Files%20In%20An%20Editor.md) -- Includes handlers for different response formats (JSON, XML, SOAP) +- **NEW** Includes the ability to open referenced files directly in your editor and IDE - Includes a Silex Service Provider for painless integration with [Silex](http://silex.sensiolabs.org/) - Includes a Phalcon Service Provider for painless integration with [Phalcon](http://phalconphp.com/) - Includes a Module for equally painless integration with [Zend Framework 2](http://framework.zend.com/) - Easy to extend and integrate with existing libraries -- Clean, well-structured & tested code-base +- Clean, well-structured & tested code-base (well, except `pretty-template.php`, for now...) ## Installing -If you use Laravel 4, you already have Whoops. There are also community-provided instructions on how to integrate Whoops into -[Silex](docs/Framework%20Integration.md#integrating-with-silex), -[Phalcon](docs/Framework%20Integration.md#integrating-with-phalcon), -[Laravel 3](https://gist.github.com/hugomrdias/5169713#file-start-php), -[CakePHP](https://github.com/oldskool/WhoopsCakephp), -[Zend Framework 2](https://github.com/ghislainf/zf2-whoops), -[Yii 1](https://github.com/igorsantos07/yii-whoops). -If you are not using any of these frameworks, here's a very simple way to install: +- Install [Composer](http://getcomposer.org) and place the executable somewhere in your `$PATH` (for the rest of this README, +I'll reference it as just `composer`) + +- Add `filp/whoops` to your project's `composer.json` file: + +```json +{ + "require": { + "filp/whoops": "1.*" + } +} +``` + +- Install/update your dependencies + +```bash +$ cd my_project +$ composer install +``` + +And you're good to go! Have a look at the **example files** in `examples/` to get a feel for how things work. +I promise it's really simple! + +## API Documentation + +Initial API documentation of the whoops library is available here: +https://github.com/filp/whoops/wiki/API-Documentation + +## Usage + +### Integrating with Silex + +**whoops** comes packaged with a Silex Service Provider: `Whoops\Provider\Silex\WhoopsServiceProvider`. Using it +in your existing Silex project is easy: + +```php + +require 'vendor/autoload.php'; + +use Silex\Application; + +// ... some awesome code here ... + +if($app['debug']) { + $app->register(new Whoops\Provider\Silex\WhoopsServiceProvider); +} + +// ... + +$app->run(); +``` + +And that's about it. By default, you'll get the pretty error pages if something goes awry in your development +environment, but you also have full access to the **whoops** library, obviously. For example, adding a new handler +into your app is as simple as extending `whoops`: + +```php +$app['whoops'] = $app->extend('whoops', function($whoops) { + $whoops->pushHandler(new DeleteWholeProjectHandler); + return $whoops; +}); +``` +### Integrating with Phalcon + +**whoops** comes packaged with a Phalcon Service Provider: `Whoops\Provider\Phalcon\WhoopsServiceProvider`. Using it +in your existing Phalcon project is easy. The provider uses the default Phalcon DI unless you pass a DI instance into the constructor. + +```php +new Whoops\Provider\Phalcon\WhoopsServiceProvider; + +// --- or --- + +$di = Phalcon\DI\FactoryDefault; +new Whoops\Provider\Phalcon\WhoopsServiceProvider($di); +``` + +### Integrating with Laravel 4/Illuminate + +If you're using Laravel 4, as of [this commit to laravel/framework](https://github.com/laravel/framework/commit/64f3a79aae254b71550a8097880f0b0e09062d24), you're already using Whoops! Yay! + +### Integrating with Laravel 3 + +User [@hugomrdias](https://github.com/hugomrdias) contributed a simple guide/example to help you integrate **whoops** with Laravel 3's IoC container, available at: + +https://gist.github.com/hugomrdias/5169713#file-start-php + +### Integrating with Zend Framework 2 -1. Use [Composer](http://getcomposer.org) to install Whoops into your project: +User [@zsilbi](https://github.com/zsilbi) contributed a provider for ZF2 integration, +available in the following location: - ```bash - composer require filp/whoops:1 - ``` +https://github.com/filp/whoops/tree/master/src/Whoops/Provider/Zend -1. Register the pretty handler in your code: +**Instructions:** - ```php - $whoops = new \Whoops\Run; - $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); - $whoops->register(); - ``` +- Add Whoops as a module to you app (/vendor/Whoops) +- Whoops must be the first module: -For more options, have a look at the **example files** in `examples/` to get a feel for how things work. Also take a look at the [API Documentation](docs/API%20Documentation.md) and the list of available handers below. +```php +'modules' => array( + 'Whoops', + 'Application' + ) +``` + +- Move Module.php from /Whoops/Provider/Zend/Module.php to /Whoops/Module.php +- Use optional configurations in your controller config: + +```php +return array( + 'view_manager' => array( + 'display_not_found_reason' => true, + 'display_exceptions' => true, + 'json_exceptions' => array( + 'display' => true, + 'ajax_only' => true, + 'show_trace' => true + ) + ), +); +``` + +- NOTE: ob_clean(); is used to remove previous output, so you may use ob_start(); at the beginning of your app (index.php) + +### Opening referenced files with your favorite editor or IDE + +When using the pretty error page feature, whoops comes with the ability to +open referenced files directly in your IDE or editor. + +```php +setEditor('sublime'); +``` + +The following editors are currently supported by default. + +- `sublime` - Sublime Text 2 +- `emacs` - Emacs +- `textmate` - Textmate +- `macvim` - MacVim +- `xdebug` - xdebug (uses [xdebug.file_link_format](http://xdebug.org/docs/all_settings#file_link_format)) + +Adding your own editor is simple: + +```php + +$handler->setEditor(function($file, $line) { + return "whatever://open?file=$file&line=$line"; +}); + +``` + +You can add PhpStorm support with [PhpStormOpener](https://github.com/pinepain/PhpStormOpener#phpstormopener) (Mac OS X only): +```php + +$handler->setEditor( + function ($file, $line) { + // if your development server is not local it's good to map remote files to local + $translations = array('^' . __DIR__ => '~/Development/PhpStormOpener'); // change to your path + + foreach ($translations as $from => $to) { + $file = preg_replace('#' . $from . '#', $to, $file, 1); + } + + return "pstorm://$file:$line"; + } +); + +``` ### Available Handlers @@ -64,12 +208,41 @@ For more options, have a look at the **example files** in `examples/` to get a f - [`PrettyPageHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/PrettyPageHandler.php) - Shows a pretty error page when something goes pants-up - [`CallbackHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/CallbackHandler.php) - Wraps a closure or other callable as a handler. You do not need to use this handler explicitly, **whoops** will automatically wrap any closure or callable you pass to `Whoops\Run::pushHandler` - [`JsonResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/JsonResponseHandler.php) - Captures exceptions and returns information on them as a JSON string. Can be used to, for example, play nice with AJAX requests. -- [`XmlResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/XmlResponseHandler.php) - Captures exceptions and returns information on them as a XML string. Can be used to, for example, play nice with AJAX requests. -- [`SoapResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/SoapResponseHandler.php) - Captures exceptions and returns information on them as a SOAP string. Might be used for SOAP Webservices. + +## Contributing + +If you want to give me some feedback or make a suggestion, send me a message through +twitter: [@imfilp](https://twitter.com/imfilp) + +If you want to get your hands dirty, great! Here's a couple of steps/guidelines: + +- Fork/clone this repo, and update dev dependencies using Composer + +```bash +$ git clone git@github.com:filp/whoops.git +$ cd whoops +$ composer install --dev +``` + +- Create a new branch for your feature or fix + +```bash +$ git checkout -b feature/flames-on-the-side +``` + +- Add your changes & tests for those changes (in `tests/`). +- Remember to stick to the existing code style as best as possible. When in doubt, follow `PSR-2`. +- Send me a pull request! + +If you don't want to go through all this, but still found something wrong or missing, please +let me know, and/or **open a new issue report** so that I or others may take care of it. ## Authors -This library was primarily developed by [Filipe Dobreira](https://github.com/filp), and is currently maintained by [Denis Sokolov](https://github.com/denis-sokolov). A lot of awesome fixes and enhancements were also sent in by [various contributors](https://github.com/filp/whoops/contributors). +This library was primarily developed by [Filipe Dobreira](https://github.com/filp). + +A lot of awesome fixes and enhancements were also sent in by contributors, which you can find **[in this page right here](https://github.com/filp/whoops/contributors)**. [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/filp/whoops/trend.png)](https://bitdeli.com/free "Bitdeli Badge") + diff --git a/vendor/filp/whoops/composer.json b/vendor/filp/whoops/composer.json index 2c9b67e..ddae298 100644 --- a/vendor/filp/whoops/composer.json +++ b/vendor/filp/whoops/composer.json @@ -15,19 +15,12 @@ "php": ">=5.3.0" }, "require-dev": { - "mockery/mockery": "0.9.*" + "mockery/mockery": "dev-master", + "silex/silex": "1.0.*@dev" }, "autoload": { "psr-0": { "Whoops": "src/" - }, - "classmap": [ - "src/deprecated" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" } } } diff --git a/vendor/filp/whoops/examples/example-silex.php b/vendor/filp/whoops/examples/example-silex.php index ce9ac5d..86530a4 100644 --- a/vendor/filp/whoops/examples/example-silex.php +++ b/vendor/filp/whoops/examples/example-silex.php @@ -3,9 +3,10 @@ * Whoops - php errors for cool kids * @author Filipe Dobreira * - * NOTE: Requires silex/silex, can be installed with composer: + * NOTE: Requires silex/silex, can be installed with composer + * within this project using the --dev flag: * - * $ composer require silex/silex:* + * $ composer install --dev * * Run this example file with the PHP 5.4 web server with: * diff --git a/vendor/filp/whoops/phpunit.xml.dist b/vendor/filp/whoops/phpunit.xml.dist index 04bc278..a5abf9a 100644 --- a/vendor/filp/whoops/phpunit.xml.dist +++ b/vendor/filp/whoops/phpunit.xml.dist @@ -5,20 +5,11 @@ tests/Whoops/ - - tests/deprecated/ - - + src/Whoops/ - - ./docs - ./examples - ./tests - ./vendor - diff --git a/vendor/filp/whoops/src/Whoops/Exception/Frame.php b/vendor/filp/whoops/src/Whoops/Exception/Frame.php index bb99798..8895f26 100644 --- a/vendor/filp/whoops/src/Whoops/Exception/Frame.php +++ b/vendor/filp/whoops/src/Whoops/Exception/Frame.php @@ -49,7 +49,7 @@ class Frame implements Serializable // @todo: This can be made more reliable by checking if we've entered // eval() in a previous trace, but will need some more work on the upper // trace collector(s). - if(preg_match('/^(.*)\((\d+)\) : (?:eval\(\)\'d|assert) code$/', $file, $matches)) { + if(preg_match('/^(.*)\((\d+)\) : eval\(\)\'d code$/', $file, $matches)) { $file = $this->frame['file'] = $matches[1]; $this->frame['line'] = (int) $matches[2]; } @@ -161,7 +161,7 @@ class Frame implements Serializable /** * Returns the array containing the raw frame data from which * this Frame object was built - * + * * @return array */ public function getRawFrame() @@ -217,7 +217,7 @@ class Frame implements Serializable /** * Implements the Serializable interface, with special * steps to also save the existing comments. - * + * * @see Serializable::serialize * @return string */ @@ -234,7 +234,7 @@ class Frame implements Serializable /** * Unserializes the frame data, while also preserving * any existing comment data. - * + * * @see Serializable::unserialize * @param string $serializedFrame */ @@ -249,17 +249,4 @@ class Frame implements Serializable $this->frame = $frame; } - - /** - * Compares Frame against one another - * @param Frame $frame - * @return bool - */ - public function equals(Frame $frame) - { - if (!$this->getFile() || $this->getFile() === 'Unknown' || !$this->getLine()) { - return false; - } - return $frame->getFile() === $this->getFile() && $frame->getLine() === $this->getLine(); - } } diff --git a/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php b/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php index b3af9df..5708712 100644 --- a/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php +++ b/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php @@ -9,7 +9,6 @@ use Whoops\Exception\Frame; use UnexpectedValueException; use IteratorAggregate; use ArrayIterator; -use ArrayAccess; use Serializable; use Countable; @@ -17,7 +16,7 @@ use Countable; * Exposes a fluent interface for dealing with an ordered list * of stack-trace frames. */ -class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, Countable +class FrameCollection implements IteratorAggregate, Serializable, Countable { /** * @var array[] @@ -36,19 +35,19 @@ class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, C /** * Filters frames using a callable, returns the same FrameCollection - * + * * @param callable $callable * @return FrameCollection */ public function filter($callable) { $this->frames = array_filter($this->frames, $callable); - return $this; + return $this; } /** * Map the collection of frames - * + * * @param callable $callable * @return FrameCollection */ @@ -74,7 +73,7 @@ class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, C /** * Returns an array with all frames, does not affect * the internal array. - * + * * @todo If this gets any more complex than this, * have getIterator use this method. * @see FrameCollection::getIterator @@ -95,42 +94,6 @@ class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, C } /** - * @see ArrayAccess::offsetExists - * @param int $offset - */ - public function offsetExists($offset) - { - return isset($this->frames[$offset]); - } - - /** - * @see ArrayAccess::offsetGet - * @param int $offset - */ - public function offsetGet($offset) - { - return $this->frames[$offset]; - } - - /** - * @see ArrayAccess::offsetSet - * @param int $offset - */ - public function offsetSet($offset, $value) - { - throw new \Exception(__CLASS__ . ' is read only'); - } - - /** - * @see ArrayAccess::offsetUnset - * @param int $offset - */ - public function offsetUnset($offset) - { - throw new \Exception(__CLASS__ . ' is read only'); - } - - /** * @see Countable::count * @return int */ @@ -156,36 +119,4 @@ class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, C { $this->frames = unserialize($serializedFrames); } - - /** - * @param Frame[] $frames Array of Frame instances, usually from $e->getPrevious() - */ - public function prependFrames(array $frames) - { - $this->frames = array_merge($frames, $this->frames); - } - - /** - * Gets the innermost part of stack trace that is not the same as that of outer exception - * - * @param FrameCollection $parentFrames Outer exception frames to compare tail against - * @return Frame[] - */ - public function topDiff(FrameCollection $parentFrames) - { - $diff = $this->frames; - - $parentFrames = $parentFrames->getArray(); - $p = count($parentFrames)-1; - - for($i = count($diff)-1; $i >= 0 && $p >= 0; $i--) { - /** @var Frame $tailFrame */ - $tailFrame = $diff[$i]; - if($tailFrame->equals($parentFrames[$p])) { - unset($diff[$i]); - } - $p--; - } - return $diff; - } } diff --git a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php index ec7f4cc..2ecf757 100644 --- a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php +++ b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php @@ -5,6 +5,8 @@ */ namespace Whoops\Exception; +use Whoops\Exception\FrameCollection; +use Whoops\Exception\ErrorException; use Exception; class Inspector @@ -15,16 +17,11 @@ class Inspector private $exception; /** - * @var \Whoops\Exception\FrameCollection + * @var FrameCollection */ private $frames; /** - * @var \Whoops\Exception\Inspector - */ - private $previousExceptionInspector; - - /** * @param Exception $exception The exception to inspect */ public function __construct(Exception $exception) @@ -57,36 +54,9 @@ class Inspector } /** - * Does the wrapped Exception has a previous Exception? - * @return bool - */ - public function hasPreviousException() - { - return !!$this->previousExceptionInspector || !!$this->exception->getPrevious(); - } - - /** - * Returns an Inspector for a previous Exception, if any. - * @todo Clean this up a bit, cache stuff a bit better. - * @return Inspector - */ - public function getPreviousExceptionInspector() - { - if($this->previousExceptionInspector === null) { - $previousException = $this->exception->getPrevious(); - - if($previousException) { - $this->previousExceptionInspector = new Inspector($previousException); - } - } - - return $this->previousExceptionInspector; - } - - /** * Returns an iterator for the inspected exception's * frames. - * @return \Whoops\Exception\FrameCollection + * @return FrameCollection */ public function getFrames() { @@ -104,27 +74,11 @@ class Inspector array_unshift($frames, $firstFrame); } $this->frames = new FrameCollection($frames); - - if ($previousInspector = $this->getPreviousExceptionInspector()) { - // Keep outer frame on top of the inner one - $outerFrames = $this->frames; - $newFrames = clone $previousInspector->getFrames(); - // I assume it will always be set, but let's be safe - if (isset($newFrames[0])) { - $newFrames[0]->addComment( - $previousInspector->getExceptionMessage(), - 'Exception message:' - ); - } - $newFrames->prependFrames($outerFrames->topDiff($newFrames)); - $this->frames = $newFrames; - } } return $this->frames; } - /** * Given an exception, generates an array in the format * generated by Exception::getTrace() diff --git a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php index abf3350..abb4078 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php +++ b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php @@ -18,19 +18,16 @@ interface HandlerInterface /** * @param Run $run - * @return void */ public function setRun(Run $run); /** * @param Exception $exception - * @return void */ public function setException(Exception $exception); /** * @param Inspector $inspector - * @return void */ public function setInspector(Inspector $inspector); } diff --git a/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php b/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php index 611dd6e..a5e8d62 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php @@ -6,7 +6,7 @@ namespace Whoops\Handler; use Whoops\Handler\Handler; -use Whoops\Exception\Formatter; +use Whoops\Exception\Frame; /** * Catches an exception and converts it to a JSON @@ -27,7 +27,7 @@ class JsonResponseHandler extends Handler /** * @param bool|null $returnFrames - * @return bool|$this + * @return null|bool */ public function addTraceToOutput($returnFrames = null) { @@ -36,7 +36,6 @@ class JsonResponseHandler extends Handler } $this->returnFrames = (bool) $returnFrames; - return $this; } /** @@ -74,15 +73,34 @@ class JsonResponseHandler extends Handler return Handler::DONE; } + $exception = $this->getException(); + $response = array( - 'error' => Formatter::formatExceptionAsDataArray( - $this->getInspector(), - $this->addTraceToOutput() - ), + 'error' => array( + 'type' => get_class($exception), + 'message' => $exception->getMessage(), + 'file' => $exception->getFile(), + 'line' => $exception->getLine() + ) ); - if (\Whoops\Util\Misc::canSendHeaders()) { - header('Content-Type: application/json'); + if($this->addTraceToOutput()) { + $inspector = $this->getInspector(); + $frames = $inspector->getFrames(); + $frameData = array(); + + foreach($frames as $frame) { + /** @var Frame $frame */ + $frameData[] = array( + 'file' => $frame->getFile(), + 'line' => $frame->getLine(), + 'function' => $frame->getFunction(), + 'class' => $frame->getClass(), + 'args' => $frame->getArgs() + ); + } + + $response['error']['trace'] = $frameData; } echo json_encode($response); diff --git a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php index 326f586..33c215f 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php @@ -6,33 +6,14 @@ namespace Whoops\Handler; use Whoops\Handler\Handler; -use Whoops\Util\TemplateHelper; use InvalidArgumentException; -use RuntimeException; class PrettyPageHandler extends Handler { /** - * Search paths to be scanned for resources, in the reverse - * order they're declared. - * - * @var array - */ - private $searchPaths = array(); - - /** - * Fast lookup cache for known resource locations. - * - * @var array - */ - private $resourceCache = array(); - - /** - * The name of the custom css file. - * * @var string */ - private $customCss = null; + private $resourcesPath; /** * @var array[] @@ -40,14 +21,9 @@ class PrettyPageHandler extends Handler private $extraTables = array(); /** - * @var bool - */ - private $handleUnconditionally = false; - - /** * @var string */ - private $pageTitle = "Whoops! There was an error."; + private $pageTitle = 'Whoops! There was an error.'; /** * A string identifier for a known IDE/text editor, or a closure @@ -66,10 +42,10 @@ class PrettyPageHandler extends Handler * @var array */ protected $editors = array( - "sublime" => "subl://open?url=file://%file&line=%line", - "textmate" => "txmt://open?url=file://%file&line=%line", - "emacs" => "emacs://open?url=file://%file&line=%line", - "macvim" => "mvim://open/?url=file://%file&line=%line" + 'sublime' => 'subl://open?url=file://%file&line=%line', + 'textmate' => 'txmt://open?url=file://%file&line=%line', + 'emacs' => 'emacs://open?url=file://%file&line=%line', + 'macvim' => 'mvim://open/?url=file://%file&line=%line' ); /** @@ -83,9 +59,6 @@ class PrettyPageHandler extends Handler return str_replace(array('%f', '%l'), array($file, $line), ini_get('xdebug.file_link_format')); }; } - - // Add the default, local resource search path: - $this->searchPaths[] = __DIR__ . "/../Resources"; } /** @@ -93,86 +66,83 @@ class PrettyPageHandler extends Handler */ public function handle() { - if (!$this->handleUnconditionally()) { - // Check conditions for outputting HTML: - // @todo: Make this more robust - if(php_sapi_name() === 'cli') { - - // Help users who have been relying on an internal test value - // fix their code to the proper method - if (isset($_ENV['whoops-test'])) { - throw new \Exception( - 'Use handleUnconditionally instead of whoops-test' - .' environment variable' - ); - } + // Check conditions for outputting HTML: + // @todo: make this more robust + if(php_sapi_name() === 'cli' && !isset($_ENV['whoops-test'])) { + return Handler::DONE; + } - return Handler::DONE; - } + // Get the 'pretty-template.php' template file + // @todo: this can be made more dynamic &&|| cleaned-up + if(!($resources = $this->getResourcesPath())) { + $resources = __DIR__ . '/../Resources'; } - // @todo: Make this more dynamic - $helper = new TemplateHelper; + $templateFile = "$resources/pretty-template.php"; - $templateFile = $this->getResource("views/layout.html.php"); - $cssFile = $this->getResource("css/whoops.base.css"); - $zeptoFile = $this->getResource("js/zepto.min.js"); - $jsFile = $this->getResource("js/whoops.base.js"); - - if ($this->customCss) { - $customCssFile = $this->getResource($this->customCss); - } + // @todo: Make this more reliable, + // possibly by adding methods to append CSS & JS to the page + $cssFile = "$resources/pretty-page.css"; + // Prepare the $v global variable that will pass relevant + // information to the template $inspector = $this->getInspector(); $frames = $inspector->getFrames(); - // List of variables that will be passed to the layout template. - $vars = array( - "page_title" => $this->getPageTitle(), - - // @todo: Asset compiler - "stylesheet" => file_get_contents($cssFile), - "zepto" => file_get_contents($zeptoFile), - "javascript" => file_get_contents($jsFile), - - // Template paths: - "header" => $this->getResource("views/header.html.php"), - "frame_list" => $this->getResource("views/frame_list.html.php"), - "frame_code" => $this->getResource("views/frame_code.html.php"), - "env_details" => $this->getResource("views/env_details.html.php"), - - "title" => $this->getPageTitle(), - "name" => explode("\\", $inspector->getExceptionName()), - "message" => $inspector->getException()->getMessage(), - "frames" => $frames, - "has_frames" => !!count($frames), - "handler" => $this, - "handlers" => $this->getRun()->getHandlers(), - - "tables" => array( - "Server/Request Data" => $_SERVER, - "GET Data" => $_GET, - "POST Data" => $_POST, - "Files" => $_FILES, - "Cookies" => $_COOKIE, - "Session" => isset($_SESSION) ? $_SESSION: array(), - "Environment Variables" => $_ENV + $v = (object) array( + 'title' => $this->getPageTitle(), + 'name' => explode('\\', $inspector->getExceptionName()), + 'message' => $inspector->getException()->getMessage(), + 'frames' => $frames, + 'hasFrames' => !!count($frames), + 'handler' => $this, + 'handlers' => $this->getRun()->getHandlers(), + 'pageStyle' => file_get_contents($cssFile), + + 'tables' => array( + 'Server/Request Data' => $_SERVER, + 'GET Data' => $_GET, + 'POST Data' => $_POST, + 'Files' => $_FILES, + 'Cookies' => $_COOKIE, + 'Session' => isset($_SESSION) ? $_SESSION: array(), + 'Environment Variables' => $_ENV ) ); - if (isset($customCssFile)) { - $vars["stylesheet"] .= file_get_contents($customCssFile); - } - - // Add extra entries list of data tables: - // @todo: Consolidate addDataTable and addDataTableCallback $extraTables = array_map(function($table) { return $table instanceof \Closure ? $table() : $table; }, $this->getDataTables()); - $vars["tables"] = array_merge($extraTables, $vars["tables"]); - $helper->setVariables($vars); - $helper->render($templateFile); + // Add extra entries list of data tables: + $v->tables = array_merge($extraTables, $v->tables); + + call_user_func(function() use($templateFile, $v) { + // $e -> cleanup output, optionally preserving URIs as anchors: + $e = function($_, $allowLinks = false) { + $escaped = htmlspecialchars($_, ENT_QUOTES, 'UTF-8'); + + // convert URIs to clickable anchor elements: + if($allowLinks) { + $escaped = preg_replace( + '@([A-z]+?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', + "$1", $escaped + ); + } + + return $escaped; + }; + + // $slug -> sluggify string (i.e: Hello world! -> hello-world) + $slug = function($_) { + $_ = str_replace(" ", "-", $_); + $_ = preg_replace('/[^\w\d\-\_]/i', '', $_); + return strtolower($_); + }; + + require $templateFile; + }); + return Handler::QUIT; } @@ -223,7 +193,7 @@ class PrettyPageHandler extends Handler * Optionally accepts a 'label' parameter, to only return the data * table under that label. * @param string|null $label - * @return array[]|callable + * @return array[] */ public function getDataTables($label = null) { @@ -236,23 +206,6 @@ class PrettyPageHandler extends Handler } /** - * Allows to disable all attempts to dynamically decide whether to - * handle or return prematurely. - * Set this to ensure that the handler will perform no matter what. - * @param bool|null $value - * @return bool|null - */ - public function handleUnconditionally($value = null) - { - if(func_num_args() == 0) { - return $this->handleUnconditionally; - } - - $this->handleUnconditionally = (bool) $value; - } - - - /** * Adds an editor resolver, identified by a string * name, and that may be a string path, or a callable * resolver. If the callable returns a string, it will @@ -308,7 +261,7 @@ class PrettyPageHandler extends Handler * @throws InvalidArgumentException If editor resolver does not return a string * @param string $filePath * @param int $line - * @return false|string + * @return string|bool */ public function getEditorHref($filePath, $line) { @@ -340,8 +293,7 @@ class PrettyPageHandler extends Handler } /** - * @param string $title - * @return void + * @var string */ public function setPageTitle($title) { @@ -357,103 +309,25 @@ class PrettyPageHandler extends Handler } /** - * Adds a path to the list of paths to be searched for - * resources. - * - * @throws InvalidArgumnetException If $path is not a valid directory - * - * @param string $path - * @return void - */ - public function addResourcePath($path) - { - if(!is_dir($path)) { - throw new InvalidArgumentException( - "'$path' is not a valid directory" - ); - } - - array_unshift($this->searchPaths, $path); - } - - /** - * Adds a custom css file to be loaded. - * - * @param string $name - * @return void - */ - public function addCustomCss($name) - { - $this->customCss = $name; - } - - /** - * @return array - */ - public function getResourcePaths() - { - return $this->searchPaths; - } - - /** - * Finds a resource, by its relative path, in all available search paths. - * The search is performed starting at the last search path, and all the - * way back to the first, enabling a cascading-type system of overrides - * for all resources. - * - * @throws RuntimeException If resource cannot be found in any of the available paths - * - * @param string $resource - * @return string - */ - protected function getResource($resource) - { - // If the resource was found before, we can speed things up - // by caching its absolute, resolved path: - if(isset($this->resourceCache[$resource])) { - return $this->resourceCache[$resource]; - } - - // Search through available search paths, until we find the - // resource we're after: - foreach($this->searchPaths as $path) { - $fullPath = $path . "/$resource"; - - if(is_file($fullPath)) { - // Cache the result: - $this->resourceCache[$resource] = $fullPath; - return $fullPath; - } - } - - // If we got this far, nothing was found. - throw new RuntimeException( - "Could not find resource '$resource' in any resource paths." - . "(searched: " . join(", ", $this->searchPaths). ")" - ); - } - - /** - * @deprecated - * * @return string */ public function getResourcesPath() { - $allPaths = $this->getResourcePaths(); - - // Compat: return only the first path added - return end($allPaths) ?: null; + return $this->resourcesPath; } /** - * @deprecated - * - * @param string $resourcesPath - * @return void + * @throws InvalidArgumentException If argument is not a valid directory + * @param string $resourcesPath */ public function setResourcesPath($resourcesPath) { - $this->addResourcePath($resourcesPath); + if(!is_dir($resourcesPath)) { + throw new InvalidArgumentException( + "$resourcesPath is not a valid directory" + ); + } + + $this->resourcesPath = $resourcesPath; } } diff --git a/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php b/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php index 7624a73..d79331e 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php @@ -7,8 +7,8 @@ namespace Whoops\Handler; use SimpleXMLElement; +use Whoops\Exception\Frame; use Whoops\Handler\Handler; -use Whoops\Exception\Formatter; /** * Catches an exception and converts it to an XML @@ -24,7 +24,7 @@ class XmlResponseHandler extends Handler /** * @param bool|null $returnFrames - * @return bool|$this + * @return null|bool */ public function addTraceToOutput($returnFrames = null) { @@ -33,7 +33,6 @@ class XmlResponseHandler extends Handler } $this->returnFrames = (bool) $returnFrames; - return $this; } /** @@ -41,13 +40,36 @@ class XmlResponseHandler extends Handler */ public function handle() { + $exception = $this->getException(); + $response = array( - 'error' => Formatter::formatExceptionAsDataArray( - $this->getInspector(), - $this->addTraceToOutput() - ), + 'error' => array( + 'type' => get_class($exception), + 'message' => $exception->getMessage(), + 'file' => $exception->getFile(), + 'line' => $exception->getLine() + ) ); + if($this->addTraceToOutput()) { + $inspector = $this->getInspector(); + $frames = $inspector->getFrames(); + $frameData = array(); + + foreach($frames as $frame) { + /** @var Frame $frame */ + $frameData[] = array( + 'file' => $frame->getFile(), + 'line' => $frame->getLine(), + 'function' => $frame->getFunction(), + 'class' => $frame->getClass(), + 'args' => $frame->getArgs() + ); + } + + $response['error']['trace'] = array_flip($frameData); + } + echo $this->toXml($response); return Handler::QUIT; @@ -98,8 +120,18 @@ class XmlResponseHandler extends Handler { assert('is_array($data) || $node instanceof Traversable'); + // turn off compatibility mode as simple xml throws a wobbly if you don't. + $compatibilityMode = ini_get('zend.ze1_compatibility_mode'); + if ($compatibilityMode) { + ini_set('zend.ze1_compatibility_mode', 0); + } + $node = simplexml_load_string(""); + $xml = self::addDataToNode($node, $data)->asXML(); - return self::addDataToNode($node, $data)->asXML(); + if ($compatibilityMode) { + ini_set('zend.ze1_compatibility_mode', $compatibilityMode); + } + return $xml; } } diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php new file mode 100644 index 0000000..e0731de --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php @@ -0,0 +1,59 @@ + + */ + +namespace Whoops\Provider\Zend; + +use Whoops\Run; + +use Zend\Mvc\View\Http\ExceptionStrategy as BaseExceptionStrategy; +use Zend\Mvc\MvcEvent; +use Zend\Mvc\Application; + +class ExceptionStrategy extends BaseExceptionStrategy { + + protected $run; + + public function __construct(Run $run) { + $this->run = $run; + return $this; + } + + public function prepareExceptionViewModel(MvcEvent $event) { + // Do nothing if no error in the event + $error = $event->getError(); + if (empty($error)) { + return; + } + + // Do nothing if the result is a response object + $result = $event->getResult(); + if ($result instanceof Response) { + return; + } + + switch ($error) { + case Application::ERROR_CONTROLLER_NOT_FOUND: + case Application::ERROR_CONTROLLER_INVALID: + case Application::ERROR_ROUTER_NO_MATCH: + // Specifically not handling these + return; + + case Application::ERROR_EXCEPTION: + default: + $exception = $event->getParam('exception'); + if($exception) { + $response = $event->getResponse(); + if (!$response || $response->getStatusCode() === 200) { + header('HTTP/1.0 500 Internal Server Error', true, 500); + } + ob_clean(); + $this->run->handleException($event->getParam('exception')); + } + break; + } + } + +} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php new file mode 100644 index 0000000..44f14ca --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php @@ -0,0 +1,106 @@ + + * + * The Whoops directory should be added as a module to ZF2 (/vendor/Whoops) + * + * Whoops must be added as the first module + * For example: + * 'modules' => array( + * 'Whoops', + * 'Application', + * ), + * + * This file should be moved next to Whoops/Run.php (/vendor/Whoops/Module.php) + * + */ + +namespace Whoops; + +use Whoops\Run; +use Whoops\Provider\Zend\ExceptionStrategy; +use Whoops\Provider\Zend\RouteNotFoundStrategy; +use Whoops\Handler\JsonResponseHandler; +use Whoops\Handler\PrettyPageHandler; +use Zend\EventManager\EventInterface; +use Zend\Console\Request as ConsoleRequest; + +class Module +{ + protected $run; + + public function onBootstrap(EventInterface $event) + { + $prettyPageHandler = new PrettyPageHandler(); + + // Set editor + $config = $event->getApplication()->getServiceManager()->get('Config'); + if (isset($config['view_manager']['editor'])) { + $prettyPageHandler->setEditor($config['view_manager']['editor']); + } + + + $this->run = new Run(); + $this->run->register(); + $this->run->pushHandler($prettyPageHandler); + + $this->attachListeners($event); + } + + public function getAutoloaderConfig() + { + return array( + 'Zend\Loader\StandardAutoloader' => array( + 'namespaces' => array( + __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, + ), + ), + ); + } + + private function attachListeners(EventInterface $event) + { + $request = $event->getRequest(); + $application = $event->getApplication(); + $services = $application->getServiceManager(); + $events = $application->getEventManager(); + $config = $services->get('Config'); + + //Display exceptions based on configuration and console mode + if ($request instanceof ConsoleRequest || empty($config['view_manager']['display_exceptions'])) + return; + + $jsonHandler = new JsonResponseHandler(); + + if (!empty($config['view_manager']['json_exceptions']['show_trace'])) { + //Add trace to the JSON output + $jsonHandler->addTraceToOutput(true); + } + + if (!empty($config['view_manager']['json_exceptions']['ajax_only'])) { + //Only return JSON response for AJAX requests + $jsonHandler->onlyForAjaxRequests(true); + } + + if (!empty($config['view_manager']['json_exceptions']['display'])) { + //Turn on JSON handler + $this->run->pushHandler($jsonHandler); + } + + //Attach the Whoops ExceptionStrategy + $exceptionStrategy = new ExceptionStrategy($this->run); + $exceptionStrategy->attach($events); + + //Attach the Whoops RouteNotFoundStrategy + $routeNotFoundStrategy = new RouteNotFoundStrategy($this->run); + $routeNotFoundStrategy->attach($events); + + //Detach default ExceptionStrategy + $services->get('Zend\Mvc\View\Http\ExceptionStrategy')->detach($events); + + //Detach default RouteNotFoundStrategy + $services->get('Zend\Mvc\View\Http\RouteNotFoundStrategy')->detach($events); + } + +} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php new file mode 100644 index 0000000..6c0b3de --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php @@ -0,0 +1,64 @@ + + */ + +namespace Whoops\Provider\Zend; + +use Whoops\Run; + +use Zend\Mvc\View\Http\RouteNotFoundStrategy as BaseRouteNotFoundStrategy; +use Zend\Mvc\MvcEvent; +use Zend\Stdlib\ResponseInterface as Response; +use Zend\View\Model\ViewModel; + +class RouteNotFoundStrategy extends BaseRouteNotFoundStrategy { + + protected $run; + + public function __construct(Run $run) { + $this->run = $run; + } + + public function prepareNotFoundViewModel(MvcEvent $e) { + $vars = $e->getResult(); + if ($vars instanceof Response) { + // Already have a response as the result + return; + } + + $response = $e->getResponse(); + if ($response->getStatusCode() != 404) { + // Only handle 404 responses + return; + } + + if (!$vars instanceof ViewModel) { + $model = new ViewModel(); + if (is_string($vars)) { + $model->setVariable('message', $vars); + } else { + $model->setVariable('message', 'Page not found.'); + } + } else { + $model = $vars; + if ($model->getVariable('message') === null) { + $model->setVariable('message', 'Page not found.'); + } + } + // If displaying reasons, inject the reason + $this->injectNotFoundReason($model, $e); + + // If displaying exceptions, inject + $this->injectException($model, $e); + + // Inject controller if we're displaying either the reason or the exception + $this->injectController($model, $e); + + ob_clean(); + + throw new \Exception($model->getVariable('message') . ' ' . $model->getVariable('reason')); + } + +} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php new file mode 100644 index 0000000..13198a8 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php @@ -0,0 +1,20 @@ + + * + * Example controller configuration + */ + +return array( + 'view_manager' => array( + 'editor' => 'sublime', + 'display_not_found_reason' => true, + 'display_exceptions' => true, + 'json_exceptions' => array( + 'display' => true, + 'ajax_only' => true, + 'show_trace' => true + ) + ), +); diff --git a/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css b/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css new file mode 100644 index 0000000..56a073d --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css @@ -0,0 +1,319 @@ +.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;} +body { + font: 14px helvetica, arial, sans-serif; + color: #2B2B2B; + background-color: #D4D4D4; + padding:0; + margin: 0; + max-height: 100%; +} + a { + text-decoration: none; + } + +.container{ + height: 100%; + width: 100%; + position: fixed; + margin: 0; + padding: 0; + left: 0; + top: 0; +} + +.branding { + position: absolute; + top: 10px; + right: 20px; + color: #777777; + font-size: 10px; + z-index: 100; +} + .branding a { + color: #CD3F3F; + } + +header { + padding: 30px 20px; + color: white; + background: #272727; + box-sizing: border-box; + border-left: 5px solid #CD3F3F; +} + .exc-title { + margin: 0; + color: #616161; + text-shadow: 0 1px 2px rgba(0, 0, 0, .1); + } + .exc-title-primary { color: #CD3F3F; } + .exc-message { + font-size: 32px; + margin: 5px 0; + word-wrap: break-word; + } + +.stack-container { + height: 100%; + position: relative; +} + +.details-container { + height: 100%; + overflow: auto; + float: right; + width: 70%; + background: #DADADA; +} + .details { + padding: 10px; + padding-left: 5px; + border-left: 5px solid rgba(0, 0, 0, .1); + } + +.frames-container { + height: 100%; + overflow: auto; + float: left; + width: 30%; + background: #FFF; +} + .frame { + padding: 14px; + background: #F3F3F3; + border-right: 1px solid rgba(0, 0, 0, .2); + cursor: pointer; + } + .frame.active { + background-color: #4288CE; + color: #F3F3F3; + box-shadow: inset -2px 0 0 rgba(255, 255, 255, .1); + text-shadow: 0 1px 0 rgba(0, 0, 0, .2); + } + + .frame:not(.active):hover { + background: #BEE9EA; + } + + .frame-class, .frame-function, .frame-index { + font-weight: bold; + } + + .frame-index { + font-size: 11px; + color: #BDBDBD; + } + + .frame-class { + color: #4288CE; + } + .active .frame-class { + color: #BEE9EA; + } + + .frame-file { + font-family: consolas, monospace; + word-wrap:break-word; + } + + .frame-file .editor-link { + color: #272727; + } + + .frame-line { + font-weight: bold; + color: #4288CE; + } + + .active .frame-line { color: #BEE9EA; } + .frame-line:before { + content: ":"; + } + + .frame-code { + padding: 10px; + padding-left: 5px; + background: #BDBDBD; + display: none; + border-left: 5px solid #4288CE; + } + + .frame-code.active { + display: block; + } + + .frame-code .frame-file { + background: #C6C6C6; + color: #525252; + text-shadow: 0 1px 0 #E7E7E7; + padding: 10px 10px 5px 10px; + + border-top-right-radius: 6px; + border-top-left-radius: 6px; + + border: 1px solid rgba(0, 0, 0, .1); + border-bottom: none; + box-shadow: inset 0 1px 0 #DADADA; + } + + .code-block { + padding: 10px; + margin: 0; + box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); + } + + .linenums { + margin: 0; + margin-left: 10px; + } + + .frame-comments { + box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); + border: 1px solid rgba(0, 0, 0, .2); + border-top: none; + + border-bottom-right-radius: 6px; + border-bottom-left-radius: 6px; + + padding: 5px; + font-size: 12px; + background: #404040; + } + + .frame-comments.empty { + padding: 8px 15px; + } + + .frame-comments.empty:before { + content: "No comments for this stack frame."; + font-style: italic; + color: #828282; + } + + .frame-comment { + padding: 10px; + color: #D2D2D2; + } + .frame-comment a { + color: #BEE9EA; + font-weight: bold; + text-decoration: none; + } + .frame-comment a:hover { + color: #4bb1b1; + } + + .frame-comment:not(:last-child) { + border-bottom: 1px dotted rgba(0, 0, 0, .3); + } + + .frame-comment-context { + font-size: 10px; + font-weight: bold; + color: #86D2B6; + } + +.data-table-container label { + font-size: 16px; + font-weight: bold; + color: #4288CE; + margin: 10px 0; + padding: 10px 0; + + display: block; + margin-bottom: 5px; + padding-bottom: 5px; + border-bottom: 1px dotted rgba(0, 0, 0, .2); +} + .data-table { + width: 100%; + margin: 10px 0; + } + + .data-table tbody { + font: 13px consolas, monospace; + } + + .data-table thead { + display: none; + } + + .data-table tr { + padding: 5px 0; + } + + .data-table td:first-child { + width: 20%; + min-width: 130px; + overflow: hidden; + font-weight: bold; + color: #463C54; + padding-right: 5px; + + } + + .data-table td:last-child { + width: 80%; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; + } + + .data-table .empty { + color: rgba(0, 0, 0, .3); + font-style: italic; + } + +.handler { + padding: 10px; + font: 14px monospace; +} + +.handler.active { + color: #BBBBBB; + background: #989898; + font-weight: bold; +} + +/* prettify code style +Uses the Doxy theme as a base */ +pre .str, code .str { color: #BCD42A; } /* string */ +pre .kwd, code .kwd { color: #4bb1b1; font-weight: bold; } /* keyword*/ +pre .com, code .com { color: #888; font-weight: bold; } /* comment */ +pre .typ, code .typ { color: #ef7c61; } /* type */ +pre .lit, code .lit { color: #BCD42A; } /* literal */ +pre .pun, code .pun { color: #fff; font-weight: bold; } /* punctuation */ +pre .pln, code .pln { color: #e9e4e5; } /* plaintext */ +pre .tag, code .tag { color: #4bb1b1; } /* html/xml tag */ +pre .htm, code .htm { color: #dda0dd; } /* html tag */ +pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */ +pre .atn, code .atn { color: #ef7c61; font-weight: normal;} /* html/xml attribute name */ +pre .atv, code .atv { color: #bcd42a; } /* html/xml attribute value */ +pre .dec, code .dec { color: #606; } /* decimal */ +pre.prettyprint, code.prettyprint { + font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace;; + background: #333; + color: #e9e4e5; +} + pre.prettyprint { + white-space: pre-wrap; + } + + pre.prettyprint a, code.prettyprint a { + text-decoration:none; + } + + .linenums li { + color: #A5A5A5; + } + + .linenums li.current{ + background: rgba(255, 100, 100, .07); + padding-top: 4px; + padding-left: 1px; + } + .linenums li.current.active { + background: rgba(255, 100, 100, .17); + } diff --git a/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php b/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php new file mode 100644 index 0000000..e5ab982 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php @@ -0,0 +1,216 @@ + + + + + + <?php echo $e($v->title) ?> + + + + +
+ +
+ +
+ + + frames as $i => $frame): ?> + +
+
+ frames) - $i - 1) ?>. + getClass() ?: '') ?> + getFunction() ?: '') ?> +
+ + + getFile(true) ?: '<#unknown>') ?>getLine() ?> + +
+ + +
+ +
+ +
+
+

+ name as $i => $nameSection): ?> + name) - 1): ?> + + + + + +

+

+ message) ?> +

+
+
+ + +
+ frames as $i => $frame): ?> + + getLine(); ?> +
+
+ getFile(); ?> + handler->getEditorHref($filePath, (int) $line)): ?> + Open: + + ') ?> + + + ') ?> + +
+ getFileLines($line - 8, 10); + $range = array_map(function($line){ return empty($line) ? ' ' : $line;}, $range); + $start = key($range) + 1; + $code = join("\n", $range); + ?> +
+ + + getComments(); + ?> +
+ $comment): ?> + +
+ + +
+ +
+ +
+ +
+ + +
+
+ tables as $label => $data): ?> +
+ + + + + + + + + + $value): ?> + + + + + +
KeyValue
+ + empty + +
+ +
+ + +
+ + handlers as $i => $handler): ?> +
+ . +
+ +
+ +
+
+ +
+
+ + + + + + diff --git a/vendor/filp/whoops/src/Whoops/Run.php b/vendor/filp/whoops/src/Whoops/Run.php index 2073bf8..dacbf30 100644 --- a/vendor/filp/whoops/src/Whoops/Run.php +++ b/vendor/filp/whoops/src/Whoops/Run.php @@ -152,7 +152,7 @@ class Run /** * Silence particular errors in particular files * @param array|string $patterns List or a single regex pattern to match - * @param int $levels Defaults to E_STRICT | E_DEPRECATED + * @param integer $levels Defaults to E_STRICT | E_DEPRECATED * @return \Whoops\Run */ public function silenceErrorsInPaths($patterns, $levels = 10240) @@ -178,7 +178,7 @@ class Run * use 502, 503, or another 5xx family code. * * @param bool|int $code - * @return int|false + * @return bool */ public function sendHttpCode($code = null) { @@ -239,7 +239,9 @@ class Run // Just in case there are no handlers: $handlerResponse = null; - foreach (array_reverse($this->handlerStack) as $handler) { + for($i = count($this->handlerStack) - 1; $i >= 0; $i--) { + $handler = $this->handlerStack[$i]; + $handler->setRun($this); $handler->setInspector($inspector); $handler->setException($exception); @@ -255,11 +257,8 @@ class Run } } - $willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit(); - $output = ob_get_clean(); - // If we're allowed to, send output generated by handlers directly // to the output, otherwise, and if the script doesn't quit, return // it so that it may be used by the caller @@ -267,15 +266,37 @@ class Run // @todo Might be able to clean this up a bit better // If we're going to quit execution, cleanup all other output // buffers before sending our own output: - if($willQuit) { + if($handlerResponse == Handler::QUIT && $this->allowQuit()) { while (ob_get_level() > 0) ob_end_clean(); } - $this->writeToOutputNow($output); + if($this->sendHttpCode() && isset($_SERVER["REQUEST_URI"]) && !headers_sent()) { + $httpCode = $this->sendHttpCode(); + + if (function_exists('http_response_code')) { + http_response_code($httpCode); + } else { + // http_response_code is added in 5.4. + // For compatibility with 5.3 we use the third argument in header call + // First argument must be a real header. + // If it is empty, PHP will ignore the third argument. + // If it is invalid, such as a single space, Apache will handle it well, + // but the PHP development server will hang. + // Setting a full status line would require us to hardcode + // string values for all different status code, and detect the protocol. + // which is an extra error-prone complexity. + header('X-Ignore-This: 1', true, $httpCode); + } + } + + echo $output; } - if($willQuit) { - exit(1); + // Handlers are done! Check if we got here because of Handler::QUIT + // ($handlerResponse will be the response from the last queried handler) + // and if so, try to quit execution. + if($handlerResponse == Handler::QUIT && $this->allowQuit()) { + exit; } return $output; @@ -292,7 +313,7 @@ class Run * @param string $file * @param int $line * - * @return bool|null + * @return bool */ public function handleError($level, $message, $file = null, $line = null) { @@ -340,41 +361,10 @@ class Run /** * In certain scenarios, like in shutdown handler, we can not throw exceptions - * @var bool + * @var boolean */ private $canThrowExceptions = true; - /** - * Echo something to the browser - * @param string $output - * @return $this - */ - private function writeToOutputNow($output) - { - if($this->sendHttpCode() && \Whoops\Util\Misc::canSendHeaders()) { - $httpCode = $this->sendHttpCode(); - - if (function_exists('http_response_code')) { - http_response_code($httpCode); - } else { - // http_response_code is added in 5.4. - // For compatibility with 5.3 we use the third argument in header call - // First argument must be a real header. - // If it is empty, PHP will ignore the third argument. - // If it is invalid, such as a single space, Apache will handle it well, - // but the PHP development server will hang. - // Setting a full status line would require us to hardcode - // string values for all different status code, and detect the protocol. - // which is an extra error-prone complexity. - header('X-Ignore-This: 1', true, $httpCode); - } - } - - echo $output; - - return $this; - } - private static function isLevelFatal($level) { return in_array( diff --git a/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php b/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php index 04f4bd3..136d115 100644 --- a/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php +++ b/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php @@ -62,44 +62,6 @@ class FrameCollectionTest extends TestCase } /** - * @covers Whoops\Exception\FrameCollection::offsetExists - */ - public function testArrayAccessExists() - { - $collection = $this->getFrameCollectionInstance(); - $this->assertTrue(isset($collection[0])); - } - - /** - * @covers Whoops\Exception\FrameCollection::offsetGet - */ - public function testArrayAccessGet() - { - $collection = $this->getFrameCollectionInstance(); - $this->assertInstanceOf('Whoops\\Exception\\Frame', $collection[0]); - } - - /** - * @covers Whoops\Exception\FrameCollection::offsetSet - * @expectedException Exception - */ - public function testArrayAccessSet() - { - $collection = $this->getFrameCollectionInstance(); - $collection[0] = 'foo'; - } - - /** - * @covers Whoops\Exception\FrameCollection::offsetUnset - * @expectedException Exception - */ - public function testArrayAccessUnset() - { - $collection = $this->getFrameCollectionInstance(); - unset($collection[0]); - } - - /** * @covers Whoops\Exception\FrameCollection::filter * @covers Whoops\Exception\FrameCollection::count */ @@ -161,18 +123,6 @@ class FrameCollectionTest extends TestCase } /** - * @covers Whoops\Exception\FrameCollection::getArray - */ - public function testGetArrayImmutable() - { - $frames = $this->getFrameCollectionInstance(); - $arr = $frames->getArray(); - $arr[0] = 'foobar'; - $newCopy = $frames->getArray(); - $this->assertFalse($arr[0] === $newCopy); - } - - /** * @covers Whoops\Exception\FrameCollection::getIterator */ public function testCollectionIsIterable() @@ -197,26 +147,4 @@ class FrameCollectionTest extends TestCase $this->assertInstanceOf('Whoops\\Exception\\Frame', $frame); } } - - - /** - * @covers Whoops\Exception\FrameCollection::topDiff - */ - public function testTopDiff(){ - $commonFrameTail = $this->getFrameDataList(3); - - $diffFrame = array('line' => $this->frameIdCounter) + $this->getFrameData(); - - $frameCollection1 = new FrameCollection(array_merge(array( - $diffFrame - ), $commonFrameTail)); - - $frameCollection2 = new FrameCollection(array_merge(array( - $this->getFrameData() - ), $commonFrameTail)); - - $diff = $frameCollection1->topDiff($frameCollection2); - - $this->assertCount(1, $diff); - } } diff --git a/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php b/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php index 3d26bb7..a4558be 100644 --- a/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php +++ b/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php @@ -206,13 +206,4 @@ class FrameTest extends TestCase $this->assertEquals($comments[0]["comment"], $commentText); $this->assertEquals($comments[0]["context"], $commentContext); } - - /** - * @covers Whoops\Exception\Frame::equals - */ - public function testEquals(){ - $frame1 = $this->getFrameInstance(array('line' => 1, 'file' => 'test-file.php')); - $frame2 = $this->getFrameInstance(array('line' => 1, 'file' => 'test-file.php')); - $this->assertTrue ($frame1->equals($frame2)); - } } diff --git a/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php b/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php index 9302a97..7c78740 100644 --- a/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php +++ b/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php @@ -7,19 +7,19 @@ namespace Whoops\Exception; use Whoops\Exception\Inspector; use Whoops\TestCase; +use RuntimeException; use Exception; +use Mockery as m; class InspectorTest extends TestCase { /** - * @param string $message - * @param int $code - * @param Exception $previous + * @param string $message * @return Exception */ - protected function getException($message = null, $code = 0, Exception $previous = null) + protected function getException($message = null) { - return new Exception($message, $code, $previous); + return m::mock('Exception', array($message)); } /** @@ -32,19 +32,6 @@ class InspectorTest extends TestCase } /** - * @covers Whoops\Exception\Inspector::getFrames - */ - public function testCorrectNestedFrames($value='') - { - // Create manually to have a different line number from the outer - $inner = new Exception('inner'); - $outer = $this->getException('outer', 0, $inner); - $inspector = $this->getInspectorInstance($outer); - $frames = $inspector->getFrames(); - $this->assertSame($outer->getLine(), $frames[0]->getLine()); - } - - /** * @covers Whoops\Exception\Inspector::getExceptionName */ public function testReturnsCorrectExceptionName() @@ -77,29 +64,4 @@ class InspectorTest extends TestCase $this->assertInstanceOf('Whoops\\Exception\\FrameCollection', $inspector->getFrames()); } - - /** - * @covers Whoops\Exception\Inspector::hasPreviousException - * @covers Whoops\Exception\Inspector::getPreviousExceptionInspector - */ - public function testPreviousException() - { - $previousException = $this->getException("I'm here first!"); - $exception = $this->getException("Oh boy", null, $previousException); - $inspector = $this->getInspectorInstance($exception); - - $this->assertTrue($inspector->hasPreviousException()); - $this->assertEquals($previousException, $inspector->getPreviousExceptionInspector()->getException()); - } - - /** - * @covers Whoops\Exception\Inspector::hasPreviousException - */ - public function testNegativeHasPreviousException() - { - $exception = $this->getException("Oh boy"); - $inspector = $this->getInspectorInstance($exception); - - $this->assertFalse($inspector->hasPreviousException()); - } } diff --git a/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php index dcb70ae..548d4f7 100644 --- a/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php +++ b/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php @@ -92,5 +92,5 @@ class JsonResponseHandlerTest extends TestCase $this->assertArrayHasKey('function', $traceFrame); $this->assertArrayHasKey('class', $traceFrame); $this->assertArrayHasKey('args', $traceFrame); - } + } } diff --git a/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php index 0b55b15..0df881b 100644 --- a/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php +++ b/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php @@ -17,9 +17,7 @@ class PrettyPageHandlerTest extends TestCase */ private function getHandler() { - $handler = new PrettyPageHandler; - $handler->handleUnconditionally(); - return $handler; + return new PrettyPageHandler; } /** @@ -64,29 +62,26 @@ class PrettyPageHandlerTest extends TestCase } /** - * @covers Whoops\Handler\PrettyPageHandler::addResourcePath - * @covers Whoops\Handler\PrettyPageHandler::getResourcePaths + * @covers Whoops\Handler\PrettyPageHandler::setResourcesPath + * @covers Whoops\Handler\PrettyPageHandler::getResourcesPath */ - public function testGetSetResourcePaths() + public function testGetSetResourcesPath() { $path = __DIR__; // guaranteed to be valid! $handler = $this->getHandler(); - $handler->addResourcePath($path); - $allPaths = $handler->getResourcePaths(); - - $this->assertCount(2, $allPaths); - $this->assertEquals($allPaths[0], $path); + $handler->setResourcesPath($path); + $this->assertEquals($path, $handler->getResourcesPath()); } /** - * @covers Whoops\Handler\PrettyPageHandler::addResourcePath + * @covers Whoops\Handler\PrettyPageHandler::setResourcesPath * @expectedException InvalidArgumentException */ public function testSetInvalidResourcesPath() { $path = __DIR__ . '/ZIMBABWE'; // guaranteed to be invalid! - $this->getHandler()->addResourcePath($path); + $this->getHandler()->setResourcesPath($path); } /** @@ -247,13 +242,6 @@ class PrettyPageHandlerTest extends TestCase public function testEditorXdebug() { - if (!extension_loaded('xdebug')) { - // Even though this test only uses ini_set and ini_get, - // without xdebug active, those calls do not work. - // In particular, ini_get after ini_setting returns false. - return $this->markTestSkipped('The xdebug extension is not loaded.'); - } - $originalValue = ini_get('xdebug.file_link_format'); ini_set('xdebug.file_link_format', '%f:%l'); diff --git a/vendor/filp/whoops/tests/Whoops/Handler/XmlResponseHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/XmlResponseHandlerTest.php index 8fc5cdc..91dec35 100644 --- a/vendor/filp/whoops/tests/Whoops/Handler/XmlResponseHandlerTest.php +++ b/vendor/filp/whoops/tests/Whoops/Handler/XmlResponseHandlerTest.php @@ -70,7 +70,7 @@ class XmlResponseHandlerTest extends TestCase /** * See if passed string is a valid XML document * @param string $data - * @return bool + * @return boolean */ private function isValidXml($data) { diff --git a/vendor/filp/whoops/tests/Whoops/RunTest.php b/vendor/filp/whoops/tests/Whoops/RunTest.php index 063b1b5..54bde25 100755 --- a/vendor/filp/whoops/tests/Whoops/RunTest.php +++ b/vendor/filp/whoops/tests/Whoops/RunTest.php @@ -23,10 +23,7 @@ class RunTest extends TestCase */ protected function getException($message = null) { - // HHVM does not support mocking exceptions - // Since we do not use any additional features of Mockery for exceptions, - // we can just use native Exceptions instead. - return new \Exception($message); + return m::mock('Exception', array($message)); } /** @@ -294,7 +291,7 @@ class RunTest extends TestCase ; try { - trigger_error('foo', E_USER_NOTICE); + trigger_error(E_USER_NOTICE, 'foo'); $this->fail('Should not continue after error thrown'); } catch (\ErrorException $e) { // Do nothing @@ -350,7 +347,7 @@ class RunTest extends TestCase }) ; - $run->silenceErrorsInPaths('@^'.preg_quote(__FILE__, '@').'$@', E_USER_NOTICE); + $run->silenceErrorsInPaths('@^'.preg_quote(__FILE__).'$@', E_USER_NOTICE); trigger_error('Test', E_USER_NOTICE); $this->assertTrue(true); } diff --git a/vendor/filp/whoops/tests/bootstrap.php b/vendor/filp/whoops/tests/bootstrap.php index 582067d..d88d772 100644 --- a/vendor/filp/whoops/tests/bootstrap.php +++ b/vendor/filp/whoops/tests/bootstrap.php @@ -6,5 +6,6 @@ * Bootstraper for PHPUnit tests. */ error_reporting(E_ALL | E_STRICT); +$_ENV['whoops-test'] = true; $loader = require_once __DIR__ . '/../vendor/autoload.php'; $loader->add('Whoops\\', __DIR__); diff --git a/vendor/laravel/framework/.travis.yml b/vendor/laravel/framework/.travis.yml index dd30a9d..a49b2cb 100755 --- a/vendor/laravel/framework/.travis.yml +++ b/vendor/laravel/framework/.travis.yml @@ -1,21 +1,20 @@ language: php php: + - 5.3 - 5.4 - 5.5 - 5.6 - hhvm - - hhvm-nightly before_script: - - travis_retry composer self-update - - travis_retry composer install --prefer-source --no-interaction --dev + - composer self-update + - composer install --prefer-source --no-interaction --dev -script: vendor/bin/phpunit --verbose +script: phpunit matrix: allow_failures: - php: 5.6 - php: hhvm - - php: hhvm-nightly fast_finish: true diff --git a/vendor/laravel/framework/CONTRIBUTING.md b/vendor/laravel/framework/CONTRIBUTING.md index 9be4c34..dafb4b8 100755 --- a/vendor/laravel/framework/CONTRIBUTING.md +++ b/vendor/laravel/framework/CONTRIBUTING.md @@ -23,4 +23,4 @@ Laravel follows the [PSR-0](https://github.com/php-fig/fig-standards/blob/master - Namespace declarations should be on the same line as `=5.4.0", - "classpreloader/classpreloader": "~1.0", - "d11wtq/boris": "~1.0", - "ircmaxell/password-compat": "~1.0", - "filp/whoops": "1.1.*", - "jeremeamia/superclosure": "~1.0", - "monolog/monolog": "~1.6", - "nesbot/carbon": "~1.0", + "php": ">=5.3.0", + "classpreloader/classpreloader": "1.0.*", + "d11wtq/boris": "1.0.*", + "ircmaxell/password-compat": "1.0.*", + "filp/whoops": "1.0.10", + "jeremeamia/superclosure": "1.0.*", + "monolog/monolog": "1.*", + "nesbot/carbon": "1.*", "patchwork/utf8": "1.1.*", "phpseclib/phpseclib": "0.3.*", "predis/predis": "0.8.*", - "stack/builder": "~1.0", - "swiftmailer/swiftmailer": "~5.1", - "symfony/browser-kit": "2.5.*", - "symfony/console": "2.5.*", - "symfony/css-selector": "2.5.*", - "symfony/debug": "2.5.*", - "symfony/dom-crawler": "2.5.*", - "symfony/finder": "2.5.*", - "symfony/http-foundation": "2.5.*", - "symfony/http-kernel": "2.5.*", - "symfony/process": "2.5.*", - "symfony/routing": "2.5.*", - "symfony/security-core": "2.5.*", - "symfony/translation": "2.5.*" + "stack/builder": "1.0.*", + "swiftmailer/swiftmailer": "~5.0", + "symfony/browser-kit": "2.4.*", + "symfony/console": "2.4.*", + "symfony/css-selector": "2.4.*", + "symfony/debug": "2.4.*", + "symfony/dom-crawler": "2.4.*", + "symfony/finder": "2.4.*", + "symfony/http-foundation": "2.4.*", + "symfony/http-kernel": "2.4.*", + "symfony/process": "2.4.*", + "symfony/routing": "2.4.*", + "symfony/security-core": "2.4.*", + "symfony/translation": "2.4.*" }, "replace": { "illuminate/auth": "self.version", @@ -67,11 +67,11 @@ "illuminate/workbench": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "~2.6", - "iron-io/iron_mq": "~1.5", - "pda/pheanstalk": "~2.1", - "mockery/mockery": "~0.9", - "phpunit/phpunit": "~4.0" + "aws/aws-sdk-php": "2.6.*", + "iron-io/iron_mq": "1.5.*", + "pda/pheanstalk": "2.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "classmap": [ @@ -86,7 +86,7 @@ }, "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "suggest": { diff --git a/vendor/laravel/framework/src/Illuminate/Auth/composer.json b/vendor/laravel/framework/src/Illuminate/Auth/composer.json index 668ccf6..d409b2a 100755 --- a/vendor/laravel/framework/src/Illuminate/Auth/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Auth/composer.json @@ -8,19 +8,20 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/cookie": "4.2.*", - "illuminate/encryption": "4.2.*", - "illuminate/events": "4.2.*", - "illuminate/hashing": "4.2.*", - "illuminate/http": "4.2.*", - "illuminate/session": "4.2.*", - "illuminate/support": "4.2.*", - "nesbot/carbon": "~1.0" + "php": ">=5.3.0", + "illuminate/cookie": "4.1.*", + "illuminate/encryption": "4.1.*", + "illuminate/events": "4.1.*", + "illuminate/hashing": "4.1.*", + "illuminate/http": "4.1.*", + "illuminate/session": "4.1.*", + "illuminate/support": "4.1.*", + "nesbot/carbon": "1.*" }, "require-dev": { - "illuminate/console": "4.2.*", - "illuminate/routing": "4.2.*" + "illuminate/console": "4.1.*", + "illuminate/routing": "4.1.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": {"Illuminate\\Auth": ""} @@ -28,7 +29,7 @@ "target-dir": "Illuminate/Auth", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php index fba2594..c64cf09 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php @@ -59,8 +59,6 @@ class ClearCommand extends Command { $this->cache->flush(); $this->files->delete($this->laravel['config']['app.manifest'].'/services.json'); - - $this->laravel['events']->fire('cache:cleared'); $this->info('Application cache cleared!'); } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php index 907b215..3fd1575 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php @@ -66,7 +66,9 @@ class RedisStore extends TaggableStore implements StoreInterface { { $value = is_numeric($value) ? $value : serialize($value); - $this->connection()->setex($this->prefix.$key, $minutes * 60, $value); + $this->connection()->set($this->prefix.$key, $value); + + $this->connection()->expire($this->prefix.$key, $minutes * 60); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php index db93d67..1d4a042 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php @@ -4,14 +4,9 @@ use Closure; use DateTime; use ArrayAccess; use Carbon\Carbon; -use Illuminate\Support\Traits\MacroableTrait; class Repository implements ArrayAccess { - use MacroableTrait { - __call as macroCall; - } - /** * The cache store implementation. * @@ -27,6 +22,13 @@ class Repository implements ArrayAccess { protected $default = 60; /** + * An array of registered Cache macros. + * + * @var array + */ + protected $macros = array(); + + /** * Create a new cache repository instance. * * @param \Illuminate\Cache\StoreInterface $store @@ -62,22 +64,6 @@ class Repository implements ArrayAccess { } /** - * Retrieve an item from the cache and delete it. - * - * @param string $key - * @param mixed $default - * @return mixed - */ - public function pull($key, $default = null) - { - $value = $this->get($key, $default); - - $this->forget($key); - - return $value; - } - - /** * Store an item in the cache. * * @param string $key @@ -253,10 +239,26 @@ class Repository implements ArrayAccess { { if ($duration instanceof DateTime) { - return max(0, Carbon::instance($duration)->diffInMinutes()); + $duration = Carbon::instance($duration); + + return max(0, Carbon::now()->diffInMinutes($duration, false)); + } + else + { + return is_string($duration) ? intval($duration) : $duration; } + } - return is_string($duration) ? intval($duration) : $duration; + /** + * Register a macro with the Cache class. + * + * @param string $name + * @param callable $callback + * @return void + */ + public function macro($name, $callback) + { + $this->macros[$name] = $callback; } /** @@ -268,9 +270,9 @@ class Repository implements ArrayAccess { */ public function __call($method, $parameters) { - if (static::hasMacro($method)) + if (isset($this->macros[$method])) { - return $this->macroCall($method, $parameters); + return call_user_func_array($this->macros[$method], $parameters); } else { diff --git a/vendor/laravel/framework/src/Illuminate/Cache/composer.json b/vendor/laravel/framework/src/Illuminate/Cache/composer.json index 441833d..e3d36f2 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Cache/composer.json @@ -8,15 +8,16 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/support": "4.2.*", - "nesbot/carbon": "~1.0" + "php": ">=5.3.0", + "illuminate/support": "4.1.*", + "nesbot/carbon": "1.*" }, "require-dev": { - "illuminate/database": "4.2.*", - "illuminate/encryption": "4.2.*", - "illuminate/filesystem": "4.2.*", - "illuminate/redis": "4.2.*" + "phpunit/phpunit": "4.0.*", + "illuminate/database": "4.1.*", + "illuminate/encryption": "4.1.*", + "illuminate/filesystem": "4.1.*", + "illuminate/redis": "4.1.*" }, "autoload": { "psr-0": {"Illuminate\\Cache": ""} @@ -24,7 +25,7 @@ "target-dir": "Illuminate/Cache", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Config/composer.json b/vendor/laravel/framework/src/Illuminate/Config/composer.json index 921e1b6..74b9ff0 100755 --- a/vendor/laravel/framework/src/Illuminate/Config/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Config/composer.json @@ -8,9 +8,12 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/filesystem": "4.2.*", - "illuminate/support": "4.2.*" + "php": ">=5.3.0", + "illuminate/filesystem": "4.1.*", + "illuminate/support": "4.1.*" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": {"Illuminate\\Config": ""} @@ -18,7 +21,7 @@ "target-dir": "Illuminate/Config", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php index b8a3446..3035343 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/Command.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Command.php @@ -1,13 +1,9 @@ getHelperSet()->get('question'); + $dialog = $this->getHelperSet()->get('dialog'); - $question = new ConfirmationQuestion("{$question} ", $default); - - return $helper->ask($this->input, $this->output, $question); + return $dialog->askConfirmation($this->output, "$question", $default); } /** @@ -195,30 +189,9 @@ class Command extends \Symfony\Component\Console\Command\Command { */ public function ask($question, $default = null) { - $helper = $this->getHelperSet()->get('question'); - - $question = new Question("$question", $default); + $dialog = $this->getHelperSet()->get('dialog'); - return $helper->ask($this->input, $this->output, $question); - } - - /** - * Prompt the user for input with auto completion. - * - * @param string $question - * @param array $choices - * @param string $default - * @return string - */ - public function askWithCompletion($question, array $choices, $default = null) - { - $helper = $this->getHelperSet()->get('question'); - - $question = new Question("$question", $default); - - $question->setAutocompleterValues($choices); - - return $helper->ask($this->input, $this->output, $question); + return $dialog->ask($this->output, "$question", $default); } @@ -231,71 +204,47 @@ class Command extends \Symfony\Component\Console\Command\Command { */ public function secret($question, $fallback = true) { - $helper = $this->getHelperSet()->get('question'); - - $question = new Question("$question"); + $dialog = $this->getHelperSet()->get('dialog'); - $question->setHidden(true)->setHiddenFallback($fallback); - - return $helper->ask($this->input, $this->output, $question); + return $dialog->askHiddenResponse($this->output, "$question", $fallback); } /** * Give the user a single choice from an array of answers. * - * @param string $question - * @param array $choices - * @param string $default - * @param bool $multiple - * @param mixed $attempts + * @param string $question + * @param array $choices + * @param string $default + * @param mixed $attempts * @return bool */ - public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null) - { - $helper = $this->getHelperSet()->get('question'); - - $question = new ChoiceQuestion("$question", $choices, $default); - - $question->setMaxAttempts($attempts)->setMultiselect($multiple); - - return $helper->ask($this->input, $this->output, $question); - } - - /** - * Format input to textual table - * - * @param array $headers - * @param array $rows - * @param string $style - * @return void - */ - public function table(array $headers, array $rows, $style = 'default') + public function choice($question, array $choices, $default = null, $attempts = false) { - $table = new Table($this->output); + $dialog = $this->getHelperSet()->get('dialog'); - $table->setHeaders($headers)->setRows($rows)->setStyle($style)->render(); + return $dialog->select($this->output, "$question", $choices, $default, $attempts); } /** - * Write a string as information output. + * Write a string as standard output. * * @param string $string * @return void */ - public function info($string) + public function line($string) { - $this->output->writeln("$string"); + $this->output->writeln($string); } /** - * Write a string as standard output. + * Write a string as information output. * * @param string $string * @return void */ - public function line($string) + public function info($string) { - $this->output->writeln($string); + $this->output->writeln("$string"); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Console/composer.json b/vendor/laravel/framework/src/Illuminate/Console/composer.json index c35c6ce..1def930 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Console/composer.json @@ -8,8 +8,11 @@ } ], "require": { - "php": ">=5.4.0", - "symfony/console": "2.5.*" + "php": ">=5.3.0", + "symfony/console": "2.4.*" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -19,7 +22,7 @@ "target-dir": "Illuminate/Console", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Container/composer.json b/vendor/laravel/framework/src/Illuminate/Container/composer.json index a2445f1..67912c2 100755 --- a/vendor/laravel/framework/src/Illuminate/Container/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Container/composer.json @@ -8,7 +8,10 @@ } ], "require": { - "php": ">=5.4.0" + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -18,7 +21,7 @@ "target-dir": "Illuminate/Container", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php b/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php index c11f4c8..f5bd7ca 100755 --- a/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php +++ b/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php @@ -121,7 +121,7 @@ class CookieJar { /** * Remove a cookie from the queue. * - * @param string $name + * @param $cookieName */ public function unqueue($name) { diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json index aa9559d..5c6dd26 100755 --- a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json @@ -8,11 +8,15 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/encryption": "4.2.*", - "illuminate/support": "4.2.*", - "symfony/http-kernel": "2.5.*", - "symfony/http-foundation": "2.5.*" + "php": ">=5.3.0", + "illuminate/encryption": "4.1.*", + "illuminate/support": "4.1.*", + "symfony/http-kernel": "2.4.*", + "symfony/http-foundation": "2.4.*" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -22,7 +26,7 @@ "target-dir": "Illuminate/Cookie", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connection.php b/vendor/laravel/framework/src/Illuminate/Database/Connection.php index d5768d6..7dc8130 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connection.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connection.php @@ -828,7 +828,7 @@ class Connection implements ConnectionInterface { /** * Get the paginator environment instance. * - * @return \Illuminate\Pagination\Factory + * @return \Illuminate\Pagination\Environment */ public function getPaginator() { @@ -843,7 +843,7 @@ class Connection implements ConnectionInterface { /** * Set the pagination environment instance. * - * @param \Illuminate\Pagination\Factory|\Closure $paginator + * @param \Illuminate\Pagination\Environment|\Closure $paginator * @return void */ public function setPaginator($paginator) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php index 9ddf18b..8cddc06 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php @@ -12,17 +12,12 @@ class MySqlConnector extends Connector implements ConnectorInterface { { $dsn = $this->getDsn($config); - $options = $this->getOptions($config); - // We need to grab the PDO options that should be used while making the brand // new connection instance. The PDO options control various aspects of the // connection's behavior, and some might be specified by the developers. - $connection = $this->createConnection($dsn, $config, $options); + $options = $this->getOptions($config); - if (isset($config['unix_socket'])) - { - $connection->exec("use {$config['database']};"); - } + $connection = $this->createConnection($dsn, $config, $options); $collation = $config['collation']; @@ -55,35 +50,27 @@ class MySqlConnector extends Connector implements ConnectorInterface { */ protected function getDsn(array $config) { - return isset($config['unix_socket']) ? $this->getSocketDsn($config) : $this->getHostDsn($config); - } - - /** - * Get the DSN string for a socket configuration. - * - * @param array $config - * @return string - */ - protected function getSocketDsn(array $config) - { + // First we will create the basic DSN setup as well as the port if it is in + // in the configuration options. This will give us the basic DSN we will + // need to establish the PDO connections and return them back for use. extract($config); - return "mysql:unix_socket={$config['unix_socket']};dbname={$database}"; - } + $dsn = "mysql:host={$host};dbname={$database}"; - /** - * Get the DSN string for a host / port configuration. - * - * @param array $config - * @return string - */ - protected function getHostDsn(array $config) - { - extract($config); + if (isset($config['port'])) + { + $dsn .= ";port={$port}"; + } + + // Sometimes the developer may specify the specific UNIX socket that should + // be used. If that is the case we will add that option to the string we + // have created so that it gets utilized while the connection is made. + if (isset($config['unix_socket'])) + { + $dsn .= ";unix_socket={$config['unix_socket']}"; + } - return isset($config['port']) - ? "mysql:host={$host};port={$port};dbname={$database}" - : "mysql:host={$host};dbname={$database}"; + return $dsn; } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php index 035192f..b9c9533 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php @@ -1,13 +1,10 @@ confirmToProceed()) return; - $this->prepareDatabase(); // The pretend option can be used for "simulating" the migration and grabbing @@ -82,7 +77,7 @@ class MigrateCommand extends BaseCommand { // a migration and a seed at the same time, as it is only this command. if ($this->input->getOption('seed')) { - $this->call('db:seed', ['--force' => true]); + $this->call('db:seed'); } } @@ -115,8 +110,6 @@ class MigrateCommand extends BaseCommand { array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'), - array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), - array('path', null, InputOption::VALUE_OPTIONAL, 'The path to migration files.', null), array('package', null, InputOption::VALUE_OPTIONAL, 'The package to migrate.', null), diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php index ad71ae4..f627f84 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php @@ -1,13 +1,10 @@ confirmToProceed()) return; - $database = $this->input->getOption('database'); $this->call('migrate:reset', array('--database' => $database)); @@ -79,8 +74,6 @@ class RefreshCommand extends Command { return array( array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'), - array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), - array('seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'), array('seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder.'), diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php index f81fa90..223ee40 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php @@ -1,14 +1,11 @@ confirmToProceed()) return; - $this->migrator->setConnection($this->input->getOption('database')); $pretend = $this->input->getOption('pretend'); @@ -82,8 +77,6 @@ class ResetCommand extends Command { return array( array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'), - array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), - array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'), ); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php index c11198f..8e85488 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php @@ -1,14 +1,11 @@ confirmToProceed()) return; - $this->migrator->setConnection($this->input->getOption('database')); $pretend = $this->input->getOption('pretend'); @@ -77,8 +72,6 @@ class RollbackCommand extends Command { return array( array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'), - array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), - array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'), ); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php index 98e0097..c9197e6 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php @@ -1,14 +1,11 @@ confirmToProceed()) return; - $this->resolver->setDefaultConnection($this->getDatabase()); $this->getSeeder()->run(); @@ -92,8 +87,6 @@ class SeedCommand extends Command { array('class', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder', 'DatabaseSeeder'), array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to seed'), - - array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), ); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php index 3d92ac0..f930b8a 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php @@ -29,20 +29,6 @@ class Builder { protected $eagerLoad = array(); /** - * All of the registered builder macros. - * - * @var array - */ - protected $macros = array(); - - /** - * A replacement for the typical delete function. - * - * @var \Closure - */ - protected $onDelete; - - /** * The methods that should be returned from query builder. * * @var array @@ -251,7 +237,7 @@ class Builder { /** * Get a paginator for a grouped statement. * - * @param \Illuminate\Pagination\Factory $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param int $perPage * @param array $columns * @return \Illuminate\Pagination\Paginator @@ -266,7 +252,7 @@ class Builder { /** * Get a paginator for an ungrouped statement. * - * @param \Illuminate\Pagination\Factory $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param int $perPage * @param array $columns * @return \Illuminate\Pagination\Paginator @@ -286,29 +272,6 @@ class Builder { } /** - * Get a paginator only supporting simple next and previous links. - * - * This is more efficient on larger data-sets, etc. - * - * @param \Illuminate\Pagination\Factory $paginator - * @param int $perPage - * @param array $columns - * @return \Illuminate\Pagination\Paginator - */ - public function simplePaginate($perPage = null, $columns = array('*')) - { - $paginator = $this->query->getConnection()->getPaginator(); - - $page = $paginator->getCurrentPage(); - - $perPage = $perPage ?: $this->model->getPerPage(); - - $this->query->skip(($page - 1) * $perPage)->take($perPage + 1); - - return $paginator->make($this->get($columns)->all(), $perPage); - } - - /** * Update a record in the database. * * @param array $values @@ -367,13 +330,13 @@ class Builder { /** * Delete a record from the database. * - * @return mixed + * @return int */ public function delete() { - if (isset($this->onDelete)) + if ($this->model->isSoftDeleting()) { - return call_user_func($this->onDelete, $this); + return $this->softDelete(); } else { @@ -382,9 +345,21 @@ class Builder { } /** - * Run the default delete function on the builder. + * Soft delete the record in the database. * - * @return mixed + * @return int + */ + protected function softDelete() + { + $column = $this->model->getDeletedAtColumn(); + + return $this->update(array($column => $this->model->freshTimestampString())); + } + + /** + * Force a delete on a set of soft deleted models. + * + * @return int */ public function forceDelete() { @@ -392,14 +367,69 @@ class Builder { } /** - * Register a replacement for the default delete function. + * Restore the soft-deleted model instances. * - * @param \Closure $callback - * @return void + * @return int */ - public function onDelete(Closure $callback) + public function restore() { - $this->onDelete = $callback; + if ($this->model->isSoftDeleting()) + { + $column = $this->model->getDeletedAtColumn(); + + return $this->update(array($column => null)); + } + } + + /** + * Include the soft deleted models in the results. + * + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function withTrashed() + { + $column = $this->model->getQualifiedDeletedAtColumn(); + + foreach ((array) $this->query->wheres as $key => $where) + { + // If the where clause is a soft delete date constraint, we will remove it from + // the query and reset the keys on the wheres. This allows this developer to + // include deleted model in a relationship result set that is lazy loaded. + if ($this->isSoftDeleteConstraint($where, $column)) + { + unset($this->query->wheres[$key]); + + $this->query->wheres = array_values($this->query->wheres); + } + } + + return $this; + } + + /** + * Force the result set to only included soft deletes. + * + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function onlyTrashed() + { + $this->withTrashed(); + + $this->query->whereNotNull($this->model->getQualifiedDeletedAtColumn()); + + return $this; + } + + /** + * Determine if the given where clause is a soft delete constraint. + * + * @param array $where + * @param string $column + * @return bool + */ + protected function isSoftDeleteConstraint(array $where, $column) + { + return $where['type'] == 'Null' && $where['column'] == $column; } /** @@ -491,12 +521,14 @@ class Builder { */ public function getRelation($relation) { - // We want to run a relationship query without any constrains so that we will + $me = $this; + + // We want to do a relationship query without any constraints so that we will // not have to remove these where clauses manually which gets really hacky // and is error prone while we remove the developer's own where clauses. - $query = Relation::noConstraints(function() use ($relation) + $query = Relation::noConstraints(function() use ($me, $relation) { - return $this->getModel()->$relation(); + return $me->getModel()->$relation(); }); $nested = $this->nestedRelations($relation); @@ -563,7 +595,7 @@ class Builder { { if ($column instanceof Closure) { - $query = $this->model->newQueryWithoutScopes(); + $query = $this->model->newQuery(false); call_user_func($column, $query); @@ -703,9 +735,11 @@ class Builder { */ protected function getHasRelationQuery($relation) { - return Relation::noConstraints(function() use ($relation) + $me = $this; + + return Relation::noConstraints(function() use ($me, $relation) { - return $this->getModel()->$relation(); + return $me->getModel()->$relation(); }); } @@ -868,29 +902,6 @@ class Builder { } /** - * Extend the builder with a given callback. - * - * @param string $name - * @param \Closure $callback - * @return void - */ - public function macro($name, Closure $callback) - { - $this->macros[$name] = $callback; - } - - /** - * Get the given macro by name. - * - * @param string $name - * @return \Closure - */ - public function getMacro($name) - { - return array_get($this->macros, $name); - } - - /** * Dynamically handle calls into the query instance. * * @param string $method @@ -899,13 +910,7 @@ class Builder { */ public function __call($method, $parameters) { - if (isset($this->macros[$method])) - { - array_unshift($parameters, $this); - - return call_user_func_array($this->macros[$method], $parameters); - } - elseif (method_exists($this->model, $scope = 'scope'.ucfirst($method))) + if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { return $this->callScope($scope, $parameters); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php index 2192e93..2a982cb 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php @@ -4,7 +4,6 @@ use DateTime; use ArrayAccess; use Carbon\Carbon; use LogicException; -use JsonSerializable; use Illuminate\Events\Dispatcher; use Illuminate\Database\Eloquent\Relations\Pivot; use Illuminate\Database\Eloquent\Relations\HasOne; @@ -22,7 +21,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasManyThrough; use Illuminate\Database\ConnectionResolverInterface as Resolver; -abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterface, JsonSerializable { +abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterface { /** * The connection name for the model. @@ -165,6 +164,13 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa public $exists = false; /** + * Indicates if the model should soft delete. + * + * @var bool + */ + protected $softDelete = false; + + /** * Indicates whether attributes are snake cased on arrays. * * @var bool @@ -193,13 +199,6 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa protected static $booted = array(); /** - * The array of global scopes on the model. - * - * @var array - */ - protected static $globalScopes = array(); - - /** * Indicates if all mass assignment is enabled. * * @var bool @@ -235,6 +234,13 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa const UPDATED_AT = 'updated_at'; /** + * The name of the "deleted at" column. + * + * @var string + */ + const DELETED_AT = 'deleted_at'; + + /** * Create a new Eloquent model instance. * * @param array $attributes @@ -291,70 +297,6 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa static::$mutatorCache[$class][] = lcfirst($matches[1]); } } - - static::bootTraits(); - } - - /** - * Boot all of the bootable traits on the model. - * - * @return void - */ - protected static function bootTraits() - { - foreach (class_uses(get_called_class()) as $trait) - { - if (method_exists(get_called_class(), $method = 'boot'.class_basename($trait))) - { - forward_static_call([get_called_class(), $method]); - } - } - } - - /** - * Register a new global scope on the model. - * - * @param \Illuminate\Database\Eloquent\ScopeInterface $scope - * @return void - */ - public static function addGlobalScope(ScopeInterface $scope) - { - static::$globalScopes[get_called_class()][get_class($scope)] = $scope; - } - - /** - * Determine if a model has a global scope. - * - * @param \Illuminate\Database\Eloquent\ScopeInterface $scope - * @return bool - */ - public static function hasGlobalScope($scope) - { - return ! is_null(static::getGlobalScope($scope)); - } - - /** - * Get a global scope registered with the modal. - * - * @param \Illuminate\Database\Eloquent\ScopeInterface $scope - * @return \Illuminate\Database\Eloquent\ScopeInterface|null - */ - public static function getGlobalScope($scope) - { - return array_first(static::$globalScopes[get_called_class()], function($key, $value) use ($scope) - { - return $scope instanceof $value; - }); - } - - /** - * Get the global scopes for this class instance. - * - * @return array - */ - public function getGlobalScopes() - { - return array_get(static::$globalScopes, get_class($this), []); } /** @@ -1101,13 +1043,73 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** + * Force a hard delete on a soft deleted model. + * + * @return void + */ + public function forceDelete() + { + $softDelete = $this->softDelete; + + // We will temporarily disable false delete to allow us to perform the real + // delete operation against the model. We will then restore the deleting + // state to what this was prior to this given hard deleting operation. + $this->softDelete = false; + + $this->delete(); + + $this->softDelete = $softDelete; + } + + /** * Perform the actual delete query on this model instance. * * @return void */ protected function performDeleteOnModel() { - $this->newQuery()->where($this->getKeyName(), $this->getKey())->delete(); + $query = $this->newQuery()->where($this->getKeyName(), $this->getKey()); + + if ($this->softDelete) + { + $this->{static::DELETED_AT} = $time = $this->freshTimestamp(); + + $query->update(array(static::DELETED_AT => $this->fromDateTime($time))); + } + else + { + $query->delete(); + } + } + + /** + * Restore a soft-deleted model instance. + * + * @return bool|null + */ + public function restore() + { + if ($this->softDelete) + { + // If the restoring event does not return false, we will proceed with this + // restore operation. Otherwise, we bail out so the developer will stop + // the restore totally. We will clear the deleted timestamp and save. + if ($this->fireModelEvent('restoring') === false) + { + return false; + } + + $this->{static::DELETED_AT} = null; + + // Once we have saved the model, we will fire the "restored" event so this + // developer will do anything they need to after a restore operation is + // totally finished. Then we will return the result of the save call. + $result = $this->save(); + + $this->fireModelEvent('restored', false); + + return $result; + } } /** @@ -1199,6 +1201,28 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** + * Register a restoring model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function restoring($callback) + { + static::registerModelEvent('restoring', $callback); + } + + /** + * Register a restored model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function restored($callback) + { + static::registerModelEvent('restored', $callback); + } + + /** * Remove all of the event listeners for the model. * * @return void @@ -1340,7 +1364,7 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa */ public function save(array $options = array()) { - $query = $this->newQueryWithoutScopes(); + $query = $this->newQueryWithDeleted(); // If the "saving" event returns false we'll bail out of the save and return // false, indicating that the save failed. This gives an opportunities to @@ -1640,6 +1664,26 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** + * Get the name of the "deleted at" column. + * + * @return string + */ + public function getDeletedAtColumn() + { + return static::DELETED_AT; + } + + /** + * Get the fully qualified "deleted at" column. + * + * @return string + */ + public function getQualifiedDeletedAtColumn() + { + return $this->getTable().'.'.$this->getDeletedAtColumn(); + } + + /** * Get a fresh timestamp for the model. * * @return \Carbon\Carbon @@ -1662,86 +1706,79 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa /** * Get a new query builder for the model's table. * + * @param bool $excludeDeleted * @return \Illuminate\Database\Eloquent\Builder|static */ - public function newQuery() + public function newQuery($excludeDeleted = true) { - $builder = $this->newEloquentBuilder( - $this->newBaseQueryBuilder() - ); + $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder()); // Once we have the query builders, we will set the model instances so the // builder can easily access any information it may need from the model // while it is constructing and executing various queries against it. $builder->setModel($this)->with($this->with); - return $this->applyGlobalScopes($builder); + if ($excludeDeleted && $this->softDelete) + { + $builder->whereNull($this->getQualifiedDeletedAtColumn()); + } + + return $builder; } /** - * Get a new query instance without a given scope. + * Get a new query builder that includes soft deletes. * - * @param \Illuminate\Database\Eloquent\ScopeInterface $scope - * @return \Illuminate\Database\Eloquent\Builder + * @return \Illuminate\Database\Eloquent\Builder|static */ - public function newQueryWithoutScope($scope) + public function newQueryWithDeleted() { - $this->getGlobalScope($scope)->remove($builder = $this->newQuery(), $this); - - return $builder; + return $this->newQuery(false); } /** - * Get a new query builder that doesn't have any global scopes. + * Create a new Eloquent query builder for the model. * + * @param \Illuminate\Database\Query\Builder $query * @return \Illuminate\Database\Eloquent\Builder|static */ - public function newQueryWithoutScopes() + public function newEloquentBuilder($query) { - return $this->removeGlobalScopes($this->newQuery()); + return new Builder($query); } /** - * Apply all of the global scopes to an Eloquent builder. + * Determine if the model instance has been soft-deleted. * - * @param \Illuminate\Database\Eloquent\Builder $builder - * @return \Illuminate\Database\Eloquent\Builder + * @return bool */ - public function applyGlobalScopes($builder) + public function trashed() { - foreach ($this->getGlobalScopes() as $scope) - { - $scope->apply($builder, $this); - } - - return $builder; + return $this->softDelete && ! is_null($this->{static::DELETED_AT}); } /** - * Remove all of the global scopes from an Eloquent builder. + * Get a new query builder that includes soft deletes. * - * @param \Illuminate\Database\Eloquent\Builder $builder - * @return void + * @return \Illuminate\Database\Eloquent\Builder|static */ - public function removeGlobalScopes($builder) + public static function withTrashed() { - foreach ($this->getGlobalScopes() as $scope) - { - $scope->remove($builder, $this); - } - - return $builder; + return with(new static)->newQueryWithDeleted(); } /** - * Create a new Eloquent query builder for the model. + * Get a new query builder that only includes soft deletes. * - * @param \Illuminate\Database\Query\Builder $query * @return \Illuminate\Database\Eloquent\Builder|static */ - public function newEloquentBuilder($query) + public static function onlyTrashed() { - return new Builder($query); + $instance = new static; + + $column = $instance->getQualifiedDeletedAtColumn(); + + return $instance->newQueryWithDeleted()->whereNotNull($column); } /** @@ -1847,6 +1884,27 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** + * Determine if the model instance uses soft deletes. + * + * @return bool + */ + public function isSoftDeleting() + { + return $this->softDelete; + } + + /** + * Set the soft deleting property on the model. + * + * @param bool $enabled + * @return void + */ + public function setSoftDeleting($enabled) + { + $this->softDelete = $enabled; + } + + /** * Get the polymorphic relationship columns. * * @param string $name @@ -2122,16 +2180,6 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** - * Convert the object into something JSON serializable. - * - * @return array - */ - public function jsonSerialize() - { - return $this->toArray(); - } - - /** * Convert the model instance to an array. * * @return array @@ -2460,7 +2508,7 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa */ public function getDates() { - $defaults = array(static::CREATED_AT, static::UPDATED_AT); + $defaults = array(static::CREATED_AT, static::UPDATED_AT, static::DELETED_AT); return array_merge($this->dates, $defaults); } @@ -2620,23 +2668,14 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** - * Determine if the model or a given attribute has been modified. + * Determine if a given attribute is dirty. * - * @param string|null $attribute + * @param string $attribute * @return bool */ - public function isDirty($attribute = null) + public function isDirty($attribute) { - $dirty = $this->getDirty(); - - if (is_null($attribute)) - { - return count($dirty) > 0; - } - else - { - return array_key_exists($attribute, $dirty); - } + return array_key_exists($attribute, $this->getDirty()); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php index accd8e2..c3b0ba7 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php @@ -189,12 +189,16 @@ abstract class HasOneOrMany extends Relation { */ public function create(array $attributes) { + $foreign = array( + $this->getPlainForeignKey() => $this->getParentKey(), + ); + // Here we will set the raw attributes to avoid hitting the "fill" method so // that we do not have to worry about a mass accessor rules blocking sets // on the models. Otherwise, some of these attributes will not get set. - $instance = $this->related->newInstance($attributes); + $instance = $this->related->newInstance(); - $instance->setAttribute($this->getPlainForeignKey(), $this->getParentKey()); + $instance->setRawAttributes(array_merge($attributes, $foreign)); $instance->save(); diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php index f68b122..122d478 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php @@ -28,13 +28,6 @@ class MorphTo extends BelongsTo { */ protected $dictionary = array(); - /* - * Indicates if soft-deleted model instances should be fetched. - * - * @var bool - */ - protected $withTrashed = false; - /** * Create a new belongs to relationship instance. * @@ -157,11 +150,6 @@ class MorphTo extends BelongsTo { { $instance = $this->createModelByType($type); - if ($this->withTrashed && $instance->newQuery()->getMacro('withTrashed') !== null) - { - $instance = $instance->withTrashed(); - } - $key = $instance->getKeyName(); return $instance->whereIn($key, $this->gatherKeysByType($type)->all())->get(); @@ -205,16 +193,4 @@ class MorphTo extends BelongsTo { return $this->dictionary; } - /** - * Fetch soft-deleted model instances with query - * - * @return MorphTo - */ - public function withTrashed() - { - $this->withTrashed = true; - - return $this; - } - } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php index 47165f5..9739ddd 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php @@ -116,6 +116,16 @@ abstract class Relation { } /** + * Restore all of the soft deleted related models. + * + * @return int + */ + public function restore() + { + return $this->query->withTrashed()->restore(); + } + + /** * Run a raw update against the base query. * * @param array $attributes @@ -171,11 +181,11 @@ abstract class Relation { */ protected function getKeys(array $models, $key = null) { - return array_unique(array_values(array_map(function($value) use ($key) + return array_values(array_map(function($value) use ($key) { return $key ? $value->getAttribute($key) : $value->getKey(); - }, $models))); + }, $models)); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php index d4ae5c4..3a1ecb5 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php @@ -321,12 +321,11 @@ class Migrator { /** * Resolve the database connection instance. * - * @param string $connection * @return \Illuminate\Database\Connection */ - public function resolveConnection($connection) + public function resolveConnection() { - return $this->resolver->connection($connection); + return $this->resolver->connection($this->connection); } /** @@ -377,4 +376,4 @@ class Migrator { return $this->files; } -} \ No newline at end of file +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php index f582a2f..66a9365 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php @@ -34,13 +34,7 @@ class Builder { * * @var array */ - protected $bindings = array( - 'select' => [], - 'join' => [], - 'where' => [], - 'having' => [], - 'order' => [], - ); + protected $bindings = array(); /** * An aggregate function and column to be run. @@ -177,7 +171,6 @@ class Builder { '=', '<', '>', '<=', '>=', '<>', '!=', 'like', 'not like', 'between', 'ilike', '&', '|', '^', '<<', '>>', - 'rlike', 'regexp', 'not regexp', ); /** @@ -405,7 +398,7 @@ class Builder { if ( ! $value instanceof Expression) { - $this->addBinding($value, 'where'); + $this->bindings[] = $value; } return $this; @@ -452,7 +445,7 @@ class Builder { $this->wheres[] = compact('type', 'sql', 'boolean'); - $this->addBinding($bindings, 'where'); + $this->bindings = array_merge($this->bindings, $bindings); return $this; } @@ -484,7 +477,7 @@ class Builder { $this->wheres[] = compact('column', 'type', 'boolean', 'not'); - $this->addBinding($values, 'where'); + $this->bindings = array_merge($this->bindings, $values); return $this; } @@ -679,7 +672,7 @@ class Builder { $this->wheres[] = compact('type', 'column', 'values', 'boolean'); - $this->addBinding($values, 'where'); + $this->bindings = array_merge($this->bindings, $values); return $this; } @@ -853,7 +846,7 @@ class Builder { { $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value'); - $this->addBinding($value, 'where'); + $this->bindings[] = $value; return $this; } @@ -940,34 +933,20 @@ class Builder { * @param string $column * @param string $operator * @param string $value - * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ - public function having($column, $operator = null, $value = null, $boolean = 'and') + public function having($column, $operator = null, $value = null) { $type = 'basic'; - $this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean'); + $this->havings[] = compact('type', 'column', 'operator', 'value'); - $this->addBinding($value, 'having'); + $this->bindings[] = $value; return $this; } /** - * Add a "or having" clause to the query. - * - * @param string $column - * @param string $operator - * @param string $value - * @return \Illuminate\Database\Query\Builder|static - */ - public function orHaving($column, $operator = null, $value = null) - { - return $this->having($column, $operator, $value, 'or'); - } - - /** * Add a raw having clause to the query. * * @param string $sql @@ -981,7 +960,7 @@ class Builder { $this->havings[] = compact('type', 'sql', 'boolean'); - $this->addBinding($bindings, 'having'); + $this->bindings = array_merge($this->bindings, $bindings); return $this; } @@ -1049,7 +1028,7 @@ class Builder { $this->orders[] = compact('type', 'sql'); - $this->addBinding($bindings, 'order'); + $this->bindings = array_merge($this->bindings, $bindings); return $this; } @@ -1309,7 +1288,7 @@ class Builder { */ protected function runSelect() { - return $this->connection->select($this->toSql(), $this->getBindings()); + return $this->connection->select($this->toSql(), $this->bindings); } /** @@ -1385,7 +1364,7 @@ class Builder { { $name = $this->connection->getName(); - return md5($name.$this->toSql().serialize($this->getBindings())); + return md5($name.$this->toSql().serialize($this->bindings)); } /** @@ -1396,7 +1375,9 @@ class Builder { */ protected function getCacheCallback($columns) { - return function() use ($columns) { return $this->getFresh($columns); }; + $me = $this; + + return function() use ($me, $columns) { return $me->getFresh($columns); }; } /** @@ -1514,7 +1495,7 @@ class Builder { /** * Create a paginator for a grouped pagination statement. * - * @param \Illuminate\Pagination\Factory $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param int $perPage * @param array $columns * @return \Illuminate\Pagination\Paginator @@ -1529,7 +1510,7 @@ class Builder { /** * Build a paginator instance from a raw result array. * - * @param \Illuminate\Pagination\Factory $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param array $results * @param int $perPage * @return \Illuminate\Pagination\Paginator @@ -1549,7 +1530,7 @@ class Builder { /** * Create a paginator for an un-grouped pagination statement. * - * @param \Illuminate\Pagination\Factory $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param int $perPage * @param array $columns * @return \Illuminate\Pagination\Paginator @@ -1588,28 +1569,6 @@ class Builder { } /** - * Get a paginator only supporting simple next and previous links. - * - * This is more efficient on larger data-sets, etc. - * - * @param int $perPage - * @param array $columns - * @return \Illuminate\Pagination\Paginator - */ - public function simplePaginate($perPage = null, $columns = array('*')) - { - $paginator = $this->connection->getPaginator(); - - $page = $paginator->getCurrentPage(); - - $perPage = $perPage ?: $this->model->getPerPage(); - - $this->skip(($page - 1) * $perPage)->take($perPage + 1); - - return $paginator->make($this->get($columns), $perPage); - } - - /** * Backup certain fields for a pagination count. * * @return void @@ -1813,7 +1772,7 @@ class Builder { */ public function update(array $values) { - $bindings = array_values(array_merge($values, $this->getBindings())); + $bindings = array_values(array_merge($values, $this->bindings)); $sql = $this->grammar->compileUpdate($this, $values); @@ -1869,7 +1828,7 @@ class Builder { $sql = $this->grammar->compileDelete($this); - return $this->connection->delete($sql, $this->getBindings()); + return $this->connection->delete($sql, $this->bindings); } /** @@ -1906,7 +1865,7 @@ class Builder { { $this->wheres = array_merge((array) $this->wheres, (array) $wheres); - $this->bindings['where'] = array_values(array_merge($this->bindings['where'], (array) $bindings)); + $this->bindings = array_values(array_merge($this->bindings, (array) $bindings)); } /** @@ -1935,40 +1894,24 @@ class Builder { } /** - * Get the current query value bindings in a flattened array. + * Get the current query value bindings. * * @return array */ public function getBindings() { - return array_flatten($this->bindings); - } - - /** - * Get the raw array of bindings. - * - * @return array - */ - public function getRawBindings() - { return $this->bindings; } /** * Set the bindings on the query builder. * - * @param array $bindings - * @param string $type + * @param array $bindings * @return \Illuminate\Database\Query\Builder */ - public function setBindings(array $bindings, $type = 'where') + public function setBindings(array $bindings) { - if ( ! array_key_exists($type, $this->bindings)) - { - throw new \InvalidArgumentException("Invalid binding type: {$type}."); - } - - $this->bindings[$type] = $bindings; + $this->bindings = $bindings; return $this; } @@ -1976,25 +1919,12 @@ class Builder { /** * Add a binding to the query. * - * @param mixed $value - * @param string $type + * @param mixed $value * @return \Illuminate\Database\Query\Builder */ - public function addBinding($value, $type = 'where') + public function addBinding($value) { - if ( ! array_key_exists($type, $this->bindings)) - { - throw new \InvalidArgumentException("Invalid binding type: {$type}."); - } - - if (is_array($value)) - { - $this->bindings[$type] = array_values(array_merge($this->bindings[$type], $value)); - } - else - { - $this->bindings[$type][] = $value; - } + $this->bindings[] = $value; return $this; } @@ -2007,7 +1937,7 @@ class Builder { */ public function mergeBindings(Builder $query) { - $this->bindings = array_merge_recursive($this->bindings, $query->bindings); + $this->bindings = array_values(array_merge($this->bindings, $query->bindings)); return $this; } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php index 5fe0931..2b7d36f 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php @@ -490,7 +490,7 @@ class Grammar extends BaseGrammar { $parameter = $this->parameter($having['value']); - return $having['boolean'].' '.$column.' '.$having['operator'].' '.$parameter; + return 'and '.$column.' '.$having['operator'].' '.$parameter; } /** @@ -502,11 +502,13 @@ class Grammar extends BaseGrammar { */ protected function compileOrders(Builder $query, $orders) { - return 'order by '.implode(', ', array_map(function($order) + $me = $this; + + return 'order by '.implode(', ', array_map(function($order) use ($me) { if (isset($order['sql'])) return $order['sql']; - return $this->wrap($order['column']).' '.$order['direction']; + return $me->wrap($order['column']).' '.$order['direction']; } , $orders)); } @@ -659,6 +661,7 @@ class Grammar extends BaseGrammar { * Compile a delete statement into SQL. * * @param \Illuminate\Database\Query\Builder $query + * @param array $values * @return string */ public function compileDelete(Builder $query) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php index 76b84c8..d2f7419 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php @@ -59,7 +59,7 @@ class JoinClause { { $this->clauses[] = compact('first', 'operator', 'second', 'boolean', 'where'); - if ($where) $this->query->addBinding($second, 'join'); + if ($where) $this->query->addBinding($second); return $this; } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php index 836d013..9a6ffeb 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php @@ -526,6 +526,7 @@ class Blueprint { * @param int|null $total * @param int|null $places * @return \Illuminate\Support\Fluent + * */ public function double($column, $total = null, $places = null) { @@ -668,8 +669,6 @@ class Blueprint { $this->unsignedInteger("{$name}_id"); $this->string("{$name}_type"); - - $this->index(array("{$name}_id", "{$name}_type")); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php index 84a5088..de6d8da 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -91,7 +91,7 @@ class MySqlGrammar extends Grammar { } /** - * Compile an add column command. + * Compile a create table command. * * @param \Illuminate\Database\Schema\Blueprint $blueprint * @param \Illuminate\Support\Fluent $command diff --git a/vendor/laravel/framework/src/Illuminate/Database/composer.json b/vendor/laravel/framework/src/Illuminate/Database/composer.json index fa4bd4b..372efb5 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Database/composer.json @@ -9,18 +9,20 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/container": "4.2.*", - "illuminate/events": "4.2.*", - "illuminate/support": "4.2.*", - "nesbot/carbon": "~1.0" + "php": ">=5.3.0", + "illuminate/container": "4.1.*", + "illuminate/events": "4.1.*", + "illuminate/support": "4.1.*", + "nesbot/carbon": "1.*" }, "require-dev": { - "illuminate/cache": "4.2.*", - "illuminate/console": "4.2.*", - "illuminate/filesystem": "4.2.*", - "illuminate/pagination": "4.2.*", - "illuminate/support": "4.2.*" + "illuminate/cache": "4.1.*", + "illuminate/console": "4.1.*", + "illuminate/filesystem": "4.1.*", + "illuminate/pagination": "4.1.*", + "illuminate/support": "4.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -30,7 +32,7 @@ "target-dir": "Illuminate/Database", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php index d9ce6bd..c59c016 100755 --- a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php +++ b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php @@ -19,21 +19,21 @@ class Encrypter { * * @var string */ - protected $cipher = MCRYPT_RIJNDAEL_128; + protected $cipher = 'rijndael-256'; /** * The mode used for encryption. * * @var string */ - protected $mode = MCRYPT_MODE_CBC; + protected $mode = 'cbc'; /** * The block size of the cipher. * * @var int */ - protected $block = 16; + protected $block = 32; /** * Create a new encrypter instance. @@ -264,8 +264,6 @@ class Encrypter { public function setCipher($cipher) { $this->cipher = $cipher; - - $this->updateBlockSize(); } /** @@ -277,18 +275,6 @@ class Encrypter { public function setMode($mode) { $this->mode = $mode; - - $this->updateBlockSize(); - } - - /** - * Update the block size for the current cipher and mode. - * - * @return void - */ - protected function updateBlockSize() - { - $this->block = mcrypt_get_iv_size($this->cipher, $this->mode); } } diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php index e7e9421..ed0befa 100755 --- a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php @@ -13,14 +13,7 @@ class EncryptionServiceProvider extends ServiceProvider { { $this->app->bindShared('encrypter', function($app) { - $encrypter = new Encrypter($app['config']['app.key']); - - if ($app['config']->has('app.cipher')) - { - $encrypter->setCipher($app['config']['app.cipher']); - } - - return $encrypter; + return new Encrypter($app['config']['app.key']); }); } diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json index 1a2d473..c230952 100755 --- a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json @@ -8,9 +8,12 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/support": "4.2.*", - "symfony/security-core": "2.5.*" + "php": ">=5.3.0", + "illuminate/support": "4.1.*", + "symfony/security-core": "2.4.*" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -20,7 +23,7 @@ "target-dir": "Illuminate/Encryption", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php index ba62fa6..1f9a803 100755 --- a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php +++ b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php @@ -105,9 +105,11 @@ class Dispatcher { */ public function queue($event, $payload = array()) { - $this->listen($event.'_queue', function() use ($event, $payload) + $me = $this; + + $this->listen($event.'_queue', function() use ($me, $event, $payload) { - $this->fire($event, $payload); + $me->fire($event, $payload); }); } diff --git a/vendor/laravel/framework/src/Illuminate/Events/composer.json b/vendor/laravel/framework/src/Illuminate/Events/composer.json index 343a0b9..06325a3 100755 --- a/vendor/laravel/framework/src/Illuminate/Events/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Events/composer.json @@ -8,9 +8,13 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/container": "4.2.*", - "illuminate/support": "4.2.*" + "php": ">=5.3.0", + "illuminate/container": "4.1.*", + "illuminate/support": "4.1.*" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -20,7 +24,7 @@ "target-dir": "Illuminate/Events", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php index 774f98e..deb1df0 100755 --- a/vendor/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php @@ -151,16 +151,18 @@ class ExceptionServiceProvider extends ServiceProvider { */ protected function registerPrettyWhoopsHandler() { - $this->app['whoops.handler'] = $this->app->share(function() + $me = $this; + + $this->app['whoops.handler'] = $this->app->share(function() use ($me) { with($handler = new PrettyPageHandler)->setEditor('sublime'); // If the resource path exists, we will register the resource path with Whoops // so our custom Laravel branded exception pages will be used when they are // displayed back to the developer. Otherwise, the default pages are run. - if ( ! is_null($path = $this->resourcePath())) + if ( ! is_null($path = $me->resourcePath())) { - $handler->addResourcePath($path); + $handler->setResourcesPath($path); } return $handler; diff --git a/vendor/laravel/framework/src/Illuminate/Exception/PlainDisplayer.php b/vendor/laravel/framework/src/Illuminate/Exception/PlainDisplayer.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php b/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php index e012ef6..9bc45c7 100755 --- a/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php +++ b/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php @@ -27,11 +27,10 @@ class SymfonyDisplayer implements ExceptionDisplayerInterface { * Display the given exception to the user. * * @param \Exception $exception - * @return \Symfony\Component\HttpFoundation\Response */ public function display(Exception $exception) { - return $this->symfony->createResponse($exception); + $this->symfony->handle($exception); } } diff --git a/vendor/laravel/framework/src/Illuminate/Exception/composer.json b/vendor/laravel/framework/src/Illuminate/Exception/composer.json index 5bdf6f8..32c5e02 100755 --- a/vendor/laravel/framework/src/Illuminate/Exception/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Exception/composer.json @@ -8,14 +8,16 @@ } ], "require": { - "php": ">=5.4.0", - "filp/whoops": "1.1.*", - "illuminate/support": "4.2.*", - "symfony/http-foundation": "2.5.*", - "symfony/http-kernel": "2.5.*" + "php": ">=5.3.0", + "filp/whoops": "1.0.10", + "illuminate/support": "4.1.*", + "symfony/http-foundation": "2.4.*", + "symfony/http-kernel": "2.4.*" }, "require-dev": { - "monolog/monolog": "~1.6" + "monolog/monolog": "1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -25,7 +27,7 @@ "target-dir": "Illuminate/Exception", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Exception/resources/plain.html b/vendor/laravel/framework/src/Illuminate/Exception/resources/plain.html old mode 100755 new mode 100644 index 683c5ec..7f9aa3c --- a/vendor/laravel/framework/src/Illuminate/Exception/resources/plain.html +++ b/vendor/laravel/framework/src/Illuminate/Exception/resources/plain.html @@ -1,71 +1,71 @@ - - - - - - - - -
-

Whoops, looks like something went wrong.

- -
- - + + + + + + + + +
+

Whoops, looks like something went wrong.

+ +
+ + diff --git a/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-page.css b/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-page.css new file mode 100755 index 0000000..23b71e2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-page.css @@ -0,0 +1,310 @@ +.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;} +body { + font: 14px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + color: #2B2B2B; + background-color: #e7e7e7; + padding:0; + margin: 0; + max-height: 100%; +} + a { + text-decoration: none; + color: #FE8A59; + } + +.container{ + height: 100%; + width: 100%; + position: fixed; + margin: 0; + padding: 0; + left: 0; + top: 0; +} + +.branding { + position: absolute; + top: 10px; + right: 20px; + color: #777777; + font-size: 10px; + z-index: 100; +} + .branding a { + color: #CD3F3F; + } + +header { + padding: 20px 20px; + color: #555; + background: #ddd; + box-sizing: border-box; + border-left: 5px solid #ED3D1A; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQMAAACWCAYAAADaDe2PAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBNTk1RDY3OTlBRkQxMUUyOUM0M0EzNzM1OTdBRTY0NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBNTk1RDY3QTlBRkQxMUUyOUM0M0EzNzM1OTdBRTY0NyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE1OTVENjc3OUFGRDExRTI5QzQzQTM3MzU5N0FFNjQ3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE1OTVENjc4OUFGRDExRTI5QzQzQTM3MzU5N0FFNjQ3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+GLAjkgAAEaxJREFUeNrsXet22zYTXFHUXXZT93nyo0/eH3mfpI5lybpQrPAd7GeEEYGFRBEXzpyjY7eRbYrEDmYHi8WormuS4O+vX+nBGOmvhf5+ZHxvfi2M/+b3K5wvr+ry2l1eBwKAiPDPt2/RX2PZY3C3BXTz68j4WR8U+vPMLq/N5bXFEASAx5BB28x9LbjN7+nG4L4Ha60OTnjEAOBJBpc0YHz5Mr4S4M0gDxHct+D58vpxedV4zAAgIIMLCYz0TDpPJMh9iG55eb3jMQOALM9WRLDIjAgYK3qsLwIAWc2ek0ivrdavc+Nr1fhvRWRTy+950ukCAAAOMhgFDvDm6xoB2KDI4cXy7xOdAn3gcQOAnQxUMI0fHODnK+/rCicd6HPLe1QqtCeYiQBgJYODQ2YzjkZAXZvFQwaaMglnFpWjvBGYiQBgQeExYyrSUIU8O/0zRz0rnyn8jKvUzcbxnuWdCggA8iaDf759q0hWvhv70uNOE1QbeAkVAIAWZUAkK90dO/LyGOBSBzP9AgCghQyOjlnVlNoxqwP1GVyrBmvKs6YCAO4nA72jKhd1oEzC2vEZlnj0AHBdGSgoU1CysWcV+cxakXvVAJWJANBGBh7qQP3MIvLPpczEs+M9T3j8AHBdGbA6qDLwDlSa4DITVWUizEQAuEYGF3VQ61lV8nOxewfKSHSZorGnPAAQTBmwOpAUEc0T+HwudVAmkPIAQBgy0EVIkk09Kcjso0DpwEwEgBZlQMJUgb2D2KFWFmxmIioTAaCNDC7q4KTThRzUwZncS41TgpkIgAxaIe0unII6UErHVUOBykQAZNCiDqQlyhOSbYEODRe5oTIRABk48m0JUsi5lSnq2p25ImxzBkAGV3EQqoMykZx7I3gPzEQAZHAlVcjNOziRe6VklkjaAwC9KgNWB5INTKl4B66lRlYHMBMBkEFDHdQk7yycQlWiZKkRlYkAyKAFigykJcopVPO5WqQpoDIRABlcUQdnklclrhL57G+Of0dlIgAysMymEnUwS2RGlVRZojIRABlcQUWyEmWFVIp3JHUUKwwTAGTwO6TLjMo7SKF45yT4TDATAZDBjdKakUq+/U7u7k5rQmViyhhpUp/qV4Fbcn3W88VWmEezd3CK/B7UmhCeHYNJEcIrhkz0QT/Wr7Lx1awb4eXlHW7ZfWSgluSk5zMq7+BnAvfhQ6cCEwe5TUl2+hTw+KAvrgT8WDjrq/c86Z97w+28nQxYHUjIYC6U4TFADYoXQbrwg3Cac99BzwHvG/QuLIxnDzK48ed4A9PEgxBiB+9bWDju14LkRiogQ2G8moH/6Px+QbKqVJCBBTshGSxJdo5BDNiQ+4DZFcn3awD2nN6c6UPuBVlp9foBMrgNex3ghWAALBJh3lrP+ivH51H/DjNRPusrgp31NNPbnm1lKJAmnrTarUAGt93cHcmKclJSB1ty10nMtCo6ItatUPfwC/W/LHvWQV1pBcdBzpOXWjmaXiH5P2jAntC9ZcM7kp2ulJo62OiBYQObiYCdNB9NBGbQ86uyBLQiBLXC9XJFIZSaKF5BBrcxMC/LucDGWwqsuyf38ulEfyasVbejK+VUGzK/GfznG8YUE8KXFgJb0QANxS42FLGsdqmDQquIVG4yLzWOHOrgMOQ8U0AGW/Lbq1Ibs7s5098S9DYc9DO+dgDvSv+9HcjAX6ZJ1UFK3kFFMjMRlYl2vGsVNXEE5ocx0/c1PnbUvvfkyfAbBoGunF3puvuI0tr0sxUMTPRMdM/0b45Z/dQggz6xsQT8Mw2o/V1XZOCzvXmR0A2WHO3O6QJ6JtqDfeNQjNOAz/hnCwmNyb5nBWRwpzooKK2GIXuBJ4BtzjJJbpswnilcDUJF7SXJMxpIT4subz5vYJJAshwZm8x1YUXYGiuR5LVlLIachffUbm6vhkD2XQ9eaTlnKoeuMA6CNAg9E++bgUmnCiFn4XfLc36izL2hrslAIqlNdZDLrMZQS6wTxLxzwvhwKKyQ9/CnZQw/U8ZNbromg9rDO0hNHVTCzwZ14MabY9J4CphGqjH82kL8Rc7P9xE5rmJ96fJQasaMZKlxQjATJQH30zFRhAy6Ew3QUCwe9KB91ME8sUEsMRPRM9GNI9mXGxeBx8YHDcxQfJT77VNlmJp3sCeYiV0qrYMjXSgDX9/Rcm1TkIFsBpXWdafmHRDJ9legMlHuH9QWUg1ZBWgrSCLKzFB85Lq49HzGFL0Dact4HMDiRuUg19D+QUXt/kZBGZUsFw++iT51B6ktyUmWGieUlicSUo7vHf5BSJV1oHZ/Y5IL6Rc9PORc1YFrRjNzS1QmumFb32dJHvI+bqndGF9SBoZi0UPASEuUpwmqgx25G6PCTJTn52+OsfoUgRrM1lAsegoYKZYJDmDJrkZUJsrluE1tzSIYIzbDM2lDsejpAUvbiqdynHvz80nMxCfEugjvjvGyDkysJ8rUUOwrB/M5dGSV6AB2eSNlgson5OxLEfsHth2Ok1SJv68b+uGpDlKT1JKj3ZnoUJnohqs6cRxBwL1T+2rZPEXi75NdfdRBijPoTqAORlAHXuPl4Jg0Qi/bvlG7oajSmSnIoF1aSbc3p+gdSM/rWyT42UIGm62s/Smw0qrJ3b1pDDK4fuNyXllgdSBJh2AmyuBqhsLlyn1ipNNYNT6/kH3ZOClDsQgQLNINTDNKr1hHutSIykQ/Rblz3Mv1g2OEg1+dsvXX5fWnRxrwP0Px769fo7/RZYBg2QofHufXm8QGL58B4Ar2J/3eM+LdiY0OqtKiIrnd+r3gE6Inxt+8d2af6+cc9VgOMfP6bGBaUJqlvJKlRlQmdqu4bvUPCj3Dr/WM/6IVwFKTQVcSP/py5RCBdib5GQupHbpi5roSMxGViX6K670D/6AZ/H/p3L/r4L82JpAmXMHWI2dO6Ui2pj+yEMxWakb7jlgXjxvbHpZrh+EWhuyfdiT7fUngQH5L64MigxO5TzluqoPUTsWt9TU/C57BvKN8dwjpwpue0dsCeq3fNzby/j6D/2yM76P+vv7n2zcCGdjzamlRRqrqgA+kdaUCa5061Yh30UTyStePU/dJF7okKA58PpE7yecYkgyOA1AHChs9k7ny2DXJmq0OGSM9Zsc64EKs3/OR8Tx+QxwWmx0ZmDlgzurgSLKlRs51T4j534J/YrxCmN6VEfxHSsAMTJEMmFlL4cBIVR2oa54JZjJlJv5A8P/fJCwDBX9tBH/S0j8lMmB1IM3xFuTXSi0W8FKjq66AKxOHYiaO6VejL1TwnxuzfzbSPzUy+NApgORaCh0suwTvNS+nuj7nU8ZStFnZNw6c97PsPxLM22h2z/mogyX5VTHGBGUmfhFIZdX34GcGkn/cyPdD7zD8MIK/IiBKMthrWSaRiGOdf6copblFmuvQmLkmyFOiwT81Zv6Yrm9P8ga9IIOArL0neenxMuG8ekuyE6SUOniNPPhDO/2m3D+Qe8uw2nPwHaogbjIwc+qR8LpTNdqO9FmqbMNMv/aRXDebfWXg4G8afc3Athm1XJD0LzyCuMmAT2CSqoMVpVu1x0uNrmBiM/EcKPib+f4oQPD7Fvhs9fW2qS9uWPoT4R8vGfCDXHgM1lS9A26R5up4VGjSe+sx+DnfD7lvxTbzS/DmUC5zkp2mDTIIrA4kBlsO3sGOZFuYH1WZ2FzmCzUWzvTrEt+po9+pZv4vDtV1K9mADHpUBzOP648pr74lXfgieN+9lYkxLfNd3dX3gL/D/Q9WFtX1TMOu+IyeDHw2MPHMmSoZSFuk+VYmFvRp9oVe5mtW9/VZ4MM7Y239D5TZuAEVxNuy22d7Mz/sY6LPYEPyfQttPRMf0bfvVtSG5D88cOaXQqULL5b70WX/RJDBg9TBkeQtwZQU/DfRZ3DWqZHrWDlzo1YMTr8Z/E3ZH1NdP7dbfxb4ByeQQZxQAfLHQNQB1x24lhqXWkWEDH6iT8c/ldLeDz1G5haiHfqO0ajJgCWxtLBFBcpros+B1YFrV+Mo0DM7N3L+FGfQN7IbpxOtzt5BBvGBT2CSnsrMR7KlNlBHRs4fk7SuIsr7uxpPvNw4sqSb/JlBBhGmCj5nJ8Rez0/02a03ZFmva+bPtZnHUeAfDHb/QuxkkIM6KOh3p7+I4L42Zf9QavUl/sEg9y+kcBrwTvsBUsMstDpoBn/frbrbgr9p+g35WLeNJoTC4R9sQAZx4Ux+G5j6Vge8m8/s2xfDqbu8VJZ1E887xtQb2Verlvq+7UEG8XkHc48gW9BjNveMGsFfRhL8NX2W+ZqmH9COvR5XS8t71kNSUamQge/2Zu4UVHUQ/DG06nbNcj8w89+cLnDJdpvqY/8AZBCZd7DwCOLFDTnfqBH4JcV/CnShrxVkcBu4XLntOU9pIPUHKZHBify2N3Nb9bMjkMpIg5+lv2SD0Zra9y0AbmXl2u48iPqDMrHr3XmQwbVDV8w+/SFO5JUQnrnkR45ZyyS1JWH33a04CJSnShe+50y4qZEBr4lLr3uhZ9iC4nL6eebnSj/z5J4mJB2RiD4bvcA4vN0/mFjGVpG7f5AaGdTkd8YCH2gaC8zAl3bZkXZEIsJmm3vHlkoXbMe9Z+0flAle814H0TiBa+1qg4+0I9LQjmd7RJrmKldeNdI4kEFgBt9FNuOb1/aIxh7Sw1d4sKbaNToGuMqVTf+gBhmEB5cox1Dj79vK+1a8C8lgTOmeRxkLXNuduf7gFWQQjzpYBfi7FX0uc/bZXddnaZXVAZYa7/MPbNudZ3pC2oIMwsN3e3MXM39FYYt7eIONa0WEjVMcFHI7jmQ/nYn0v/H+D5BBYPZ2bTa5dQaOtaVXZaRILnCqcERc3zXhTMnenDeb+oMi8evf0/2FNrzv4U0/1O/6+w+Ks8R36zHw1ojnTvwDVxVrFve5zOAzbLVKWJOsoOhMvzr+qXX1kfZLVMBSYzdqzKVA5/R5BgbIIDB2+mHM6bNpxcgInop+Pb6rzuDzzoXPD/sWulGgrnLl5Nutlxk9MBXw7/o1angLuaHW6ZGkEKnPw1tzxjvZe2pwu7QfqY65ItMHVxuvXMGFSBKoQTxGPN8EFeQznSa40tCSZPtIoAyAh8xWM+GAVuoAS41yApjoezvznDST9Q9ABmnDpxCJjcQDblsrpvpeTu9UUrZzMUEGwEPVgaQQSWGdck77IAVQGiRQdvh7m700QAZAL+pAcnArP2/uADX0FMBceUJsgQyygU9pNu9bqAZGAKXhAfRhpu5ABkAI1CTviDQkM9EkgL7GOrdgP4IMgFDgohjJM81530IIAqg0CSTddg5kkBekhUicLvybEQGwCTjp6W9yWfueMmkmAzLIC7y+PRe8l4Nnn/DY7VsB1MY9PhA6HQGR411IBgrrxAZ1CAVADQWQrfEKMsgPlYc6UK76kuJeD+dzLec9EwAf+DuY9vMgg3zVgZo9JYVIfN5CFSEBsALo66yL2lAA2aUBIIPhqgNpIdJIpwuvERAA7weY9kwAJ02Ig+4bCTLIF1uSm2tsxO0DEACnAH2fdmUagej1ADLIGlyIJO0R2ZeZGCoFIPrc2LUnHEMHMhgYOPedCoP0UfsW+KzLec8pAOlZ3/QBAJDBYKEKkV6E72UzsQvZPKJftwT32UiH6wH2SANABsCv0tjVv8+cwe9pkVbQr8VAfROAmQZUePQgA+B3bMnev8/EwlNSswIIkQIoHEEAIANADp+lRgVXE5SQKQB/nuQ3BoEMgJDqQNrzoNSE0EwX2AScBSCAM30uBx4J3ZpABsBdObUyE5+F719oBbA3fIAywDWbaQCMQJAB0BE+dJBLa/znJN/01CUBwAgEGQA9QEn/P6l/o88FGIEgA6Bn8FLjMoJrgREIMgACg3sehDhRi43AQe4MBBkAscGngWpXf+9I2BgEMgCiBJuJ5QMJAEYgyABIRB2odukvHf9eGIEgAyBBqJlb1R6sO/g92BoMMgASx1aPA996AnNrMCoCQQZAJuDTleYCAsBKAMgAGAAhqBme9y+MdLBX+v8foADyxn8CDABulgqUemYwnwAAAABJRU5ErkJggg==); + background-repeat:no-repeat; + background-position:right; +} + .exc-title { + margin: 0; + color: #616161; + font-weight:normal; + } + .exc-title-primary { color: #ED591A; } + .exc-message { + font-size: 16px; + margin: 5px 0; + word-wrap: break-word; + } + +.stack-container { + height: 100%; + position: relative; +} + +.details-container { + height: 100%; + overflow: auto; + float: right; + width: 70%; + background: #fff; +} + .details { + padding: 10px 20px; + border-left: 5px solid rgba(0, 0, 0, .2); + } + +.frames-container { + height: 100%; + overflow: auto; + float: left; + width: 30%; + background: #FFF; +} + .frame { + padding: 14px; + background: #F3F3F3; + border-right: 1px solid rgba(0, 0, 0, .2); + cursor: pointer; + font-size:12px; + } + .frame.active { + background-color: #ED591A; + color: #F3F3F3; + + } + + .frame:not(.active):hover { + background: #F0E5DF; + } + + .frame-class, .frame-function, .frame-index { + font-weight: bold; + } + + .frame-index { + font-size: 11px; + color: #BDBDBD; + } + + .frame-class { + color: #ED591A; + } + .active .frame-class { + color: #5E2204; + } + + .frame-file { + font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; + color:#999; + word-wrap:break-word; + } + .editor-link { + color: inherit; + } + .editor-link:hover strong { + color: #F0E5DF; + } + + .editor-link-callout { + padding: 2px 4px; + background: #872D00; + } + + .frame-line { + font-weight: bold; + color: #A33202; + } + + .active .frame-file{ color:#872D00; } + + .active .frame-line { color: #fff; } + .frame-line:before { + content: ":"; + } + + .frame-code { + padding: 20px; + background: #f0f0f0; + display: none; + border-left: 5px solid #EDA31A; + } + + .frame-code.active { + display: block; + } + + .frame-code .frame-file { + background: #ED591A; + color: #fff; + padding: 10px 10px 10px 10px; + font-size:11px; + font-weight:normal; + } + + .code-block { + padding: 10px; + margin: 0; + box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); + } + + .linenums { + margin: 0; + margin-left: 10px; + } + + .frame-comments { + border-top: none; + padding: 5px; + font-size: 12px; + background: #404040; + } + + .frame-comments.empty { + padding: 8px 15px; + } + + .frame-comments.empty:before { + content: "No comments for this stack frame."; + color: #828282; + } + + .frame-comment { + padding: 10px 5px; + color: #D2D2D2; + } + + .frame-comment:not(:last-child) { + border-bottom: 1px dotted rgba(0, 0, 0, .3); + } + + .frame-comment-context { + font-size: 10px; + font-weight: bold; + color: #86D2B6; + } + +.data-table-container label { + font-size: 16px; + font-weight: bold; + color: #ED591A; + margin: 10px 0; + padding: 10px 0; + + display: block; + margin-bottom: 5px; + padding-bottom: 5px; + border-bottom: 1px solid rgba(0, 0, 0, .08); +} + .data-table { + width: 100%; + margin: 10px 0; + font: 12px 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; + } + + .data-table thead { + display: none; + } + + .data-table tr { + padding: 5px 0; + } + + .data-table td:first-child { + width: 20%; + min-width: 130px; + overflow: hidden; + color: #463C54; + padding-right: 5px; + + } + + .data-table td:last-child { + width: 80%; + color:#999; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; + } + + .data-table .empty { + color: rgba(0, 0, 0, .3); + font-style: italic; + } + +.handler { + padding: 10px; + font: 14px monospace; +} + +.handler.active { + color: #BBBBBB; + background: #989898; + font-weight: bold; +} + +/* prettify code style +Uses the Doxy theme as a base */ +pre .str, code .str { color: #E3B446; } /* string */ +pre .kwd, code .kwd { color: #DB613B; font-weight: bold; } /* keyword*/ +pre .com, code .com { color: #555; font-weight: bold; } /* comment */ +pre .typ, code .typ { color: #fff; } /* type */ +pre .lit, code .lit { color: #17CFB6; } /* literal */ +pre .pun, code .pun { color: #93a1a1; font-weight: bold; } /* punctuation */ +pre .pln, code .pln { color: #ccc; } /* plaintext */ +pre .tag, code .tag { color: #DB613B; } /* html/xml tag */ +pre .htm, code .htm { color: #dda0dd; } /* html tag */ +pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */ +pre .atn, code .atn { color: #fff; font-weight: normal;} /* html/xml attribute name */ +pre .atv, code .atv { color: #E3B446; } /* html/xml attribute value */ +pre .dec, code .dec { color: #fff; } /* decimal */ +pre.prettyprint, code.prettyprint { + font-weight:normal; + font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; + background: #272727; + color: #929292; + font-size:11px; + line-height:1.5em; +} + pre.prettyprint { + white-space: pre-wrap; + } + + pre.prettyprint a, code.prettyprint a { + text-decoration:none; + } + + .linenums li { + color: #A5A5A5; + } + + .linenums li.current{ + background: rgba(255, 255, 255, .05); + padding-top: 4px; + padding-left: 1px; + } + .linenums li.current.active { + background: rgba(255, 255, 255, .1); + } diff --git a/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-template.php b/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-template.php new file mode 100755 index 0000000..f1ab90f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-template.php @@ -0,0 +1,215 @@ + + + + + + <?php echo $e($v->title) ?> + + + + +
+ +
+ +
+ + + frames as $i => $frame): ?> + +
+
+ frames) - $i - 1) ?>. + getClass() ?: '') ?> + getFunction() ?: '') ?> +
+ + + getFile(true) ?: '<#unknown>') ?>getLine() ?> + +
+ + +
+ +
+ +
+
+

+ name as $i => $nameSection): ?> + name) - 1): ?> + + + + + +

+

+ message) ?> +

+
+
+ + +
+ frames as $i => $frame): ?> + + getLine(); ?> +
+
+ getFile(); ?> + handler->getEditorHref($filePath, (int) $line)): ?> + + open: ') ?> + + + ') ?> + +
+ getFileLines($line - 8, 10); + $range = array_map(function($line){ return empty($line) ? ' ' : $line;}, $range); + $start = key($range) + 1; + $code = join("\n", $range); + ?> +
+ + + getComments(); + ?> +
+ $comment): ?> + +
+ + +
+ +
+ +
+ +
+ + +
+
+ tables as $label => $data): ?> +
+ + + + + + + + + + $value): ?> + + + + + +
KeyValue
+ + empty + +
+ +
+ + +
+ + handlers as $i => $handler): ?> +
+ . +
+ +
+ +
+
+ +
+
+ + + + + + diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php index 42b0777..e533046 100755 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php @@ -291,7 +291,7 @@ class Filesystem { * @param bool $force * @return bool */ - public function makeDirectory($path, $mode = 0755, $recursive = false, $force = false) + public function makeDirectory($path, $mode = 0777, $recursive = false, $force = false) { if ($force) { diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json index 7466c89..8778b7d 100755 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json @@ -8,9 +8,12 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/support": "4.2.*", - "symfony/finder": "2.5.*" + "php": ">=5.3.0", + "illuminate/support": "4.1.*", + "symfony/finder": "2.4.*" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -20,7 +23,7 @@ "target-dir": "Illuminate/Filesystem", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php index e4b15a0..6e20717 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php @@ -27,7 +27,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn * * @var string */ - const VERSION = '4.2.1'; + const VERSION = '4.1.30'; /** * Indicates if the application has "booted". @@ -289,7 +289,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn * @param array $options * @return \Illuminate\Support\ServiceProvider */ - public function forceRegister($provider, $options = array()) + public function forgeRegister($provider, $options = array()) { return $this->register($provider, $options, true); } @@ -654,7 +654,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn */ protected function registerBaseMiddlewares() { - // + $this->middleware('Illuminate\Http\FrameGuard'); } /** @@ -839,7 +839,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn */ public function isDownForMaintenance() { - return file_exists($this['config']['app.manifest'].'/down'); + return file_exists($this['path.storage'].'/meta/down'); } /** @@ -1081,7 +1081,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn 'translator' => 'Illuminate\Translation\Translator', 'log' => 'Illuminate\Log\Writer', 'mailer' => 'Illuminate\Mail\Mailer', - 'paginator' => 'Illuminate\Pagination\Factory', + 'paginator' => 'Illuminate\Pagination\Environment', 'auth.reminder' => 'Illuminate\Auth\Reminders\PasswordBroker', 'queue' => 'Illuminate\Queue\QueueManager', 'redirect' => 'Illuminate\Routing\Redirector', @@ -1093,7 +1093,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn 'remote' => 'Illuminate\Remote\RemoteManager', 'url' => 'Illuminate\Routing\UrlGenerator', 'validator' => 'Illuminate\Validation\Factory', - 'view' => 'Illuminate\View\Factory', + 'view' => 'Illuminate\View\Environment', ); foreach ($aliases as $key => $alias) diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Composer.php b/vendor/laravel/framework/src/Illuminate/Foundation/Composer.php index 699a92f..00dc38b 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Composer.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Composer.php @@ -66,7 +66,7 @@ class Composer { { if ($this->files->exists($this->workingPath.'/composer.phar')) { - return '"'.PHP_BINARY.'" composer.phar'; + return 'php composer.phar'; } return 'composer'; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php index 43e0c04..a0b9b86 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php @@ -30,7 +30,7 @@ class ClearCompiledCommand extends Command { @unlink($path); } - if (file_exists($path = $this->laravel['config']['app.manifest'].'/services.json')) + if (file_exists($path = $this->laravel['path.storage'].'/meta/services.json')) { @unlink($path); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php index 50e1a36..81fd951 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php @@ -25,7 +25,7 @@ class DownCommand extends Command { */ public function fire() { - touch($this->laravel['config']['app.manifest'].'/down'); + touch($this->laravel['path.storage'].'/meta/down'); $this->comment('Application is now in maintenance mode.'); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php index 8958083..16f8e81 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php @@ -37,6 +37,13 @@ class RoutesCommand extends Command { protected $routes; /** + * The table helper set. + * + * @var \Symfony\Component\Console\Helper\TableHelper + */ + protected $table; + + /** * The table headers for the command. * * @var array @@ -66,6 +73,8 @@ class RoutesCommand extends Command { */ public function fire() { + $this->table = $this->getHelperSet()->get('table'); + if (count($this->routes) == 0) { return $this->error("Your application doesn't have any routes."); @@ -120,7 +129,9 @@ class RoutesCommand extends Command { */ protected function displayRoutes(array $routes) { - $this->table($this->headers, $routes); + $this->table->setHeaders($this->headers)->setRows($routes); + + $this->table->render($this->getOutput()); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TailCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TailCommand.php index 607f68b..b4c7871 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TailCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TailCommand.php @@ -71,7 +71,7 @@ class TailCommand extends Command { $lines = $this->option('lines'); - with(new Process('tail -f -n '.$lines.' '.escapeshellarg($path)))->setTimeout(null)->run(function($type, $line) use ($output) + with(new Process('tail -f -n '.$lines.' '.$path))->setTimeout(null)->run(function($type, $line) use ($output) { $output->write($line); }); @@ -90,7 +90,7 @@ class TailCommand extends Command { $lines = $this->option('lines'); - $this->getRemote($connection)->run('tail -f -n '.$lines.' '.escapeshellarg($path), function($line) use ($out) + $this->getRemote($connection)->run('tail -f -n '.$lines.' '.$path, function($line) use ($out) { $out->write($line); }); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php index dd84552..f34248a 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php @@ -25,7 +25,7 @@ class UpCommand extends Command { */ public function fire() { - @unlink($this->laravel['config']['app.manifest'].'/down'); + @unlink($this->laravel['path.storage'].'/meta/down'); $this->info('Application is now live.'); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/MigrationPublisher.php b/vendor/laravel/framework/src/Illuminate/Foundation/MigrationPublisher.php index 18be957..8ec77e1 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/MigrationPublisher.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/MigrationPublisher.php @@ -61,9 +61,11 @@ class MigrationPublisher { */ protected function getFreshMigrations($source, $destination) { - return array_filter($this->getPackageMigrations($source), function($file) use ($destination) + $me = $this; + + return array_filter($this->getPackageMigrations($source), function($file) use ($me, $destination) { - return ! $this->migrationExists($file, $destination); + return ! $me->migrationExists($file, $destination); }); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php index e7d27cd..7173984 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php @@ -200,7 +200,7 @@ class ProviderRepository { { $path = $this->manifestPath.'/services.json'; - $this->files->put($path, json_encode($manifest, JSON_PRETTY_PRINT)); + $this->files->put($path, json_encode($manifest)); return $manifest; } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php index a86f7ef..fb88b50 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php @@ -326,7 +326,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { { $this->assertSessionHas('errors'); - $bindings = (array) $bindings; + $bindings = (array)$bindings; $errors = $this->app['session.store']->get('errors'); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/changes.json b/vendor/laravel/framework/src/Illuminate/Foundation/changes.json index 4f558ab..1eba3ae 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/changes.json +++ b/vendor/laravel/framework/src/Illuminate/Foundation/changes.json @@ -1,30 +1,4 @@ { - "4.2.*": [ - {"message": "View and Pagination 'Environment' classes renamed to 'Factory'.", "backport": null}, - {"message": "Configurable encryption for Iron.io queue messages.", "backport": null}, - {"message": "Make FrameGuard middleware opt-in.", "backport": null}, - {"message": "Convert View '$errors' shared variable into ViewErrorBag. Allows multiple bags per view. Should be backwards compatible.", "backport": null}, - {"message": "Calling 'create' on a HasOne or HasMany relation will now use 'fill' method so mutators are executed on related model.", "backport": null}, - {"message": "Use rawurldecode when decoding parameters in Route::parameters.", "backport": null}, - {"message": "When date_format validation rule is used, before and after validation dates must match given format.", "backport": null}, - {"message": "Added ability to register global Eloquent scopes using traits and addGlobalScope.", "backport": null}, - {"message": "Soft deleting converted to use new global scope facilities.", "backport": null}, - {"message": "Added ability to extend Eloquent Builder using 'macro' method.", "backport": null}, - {"message": "Soft deleting models now use SoftDeletingTrait instead of softDelete property.", "backport": null}, - {"message": "The queue:listen command will now write the names of the jobs it processes to the console.", "backport": null}, - {"message": "Added Mailgun API transport for Mail::send. Depends on new 'services' configuration file.", "backport": null}, - {"message": "Added Mandrill API transport for Mail::send. Depends on new 'services' configuration file.", "backport": null}, - {"message": "Added 'log' mail transport for Mail::send. Writes raw MIME string to log files.", "backport": null}, - {"message": "Added simplePaginate method to query and Eloquent builder.", "backport": null}, - {"message": "Destructive migration operations now require confirmation or --force when being run in production.", "backport": null}, - {"message": "Added Cache::pull method for retrieving a value and then deleting it.", "backport": null}, - {"message": "Added Session::pull method for retrieving a value and then deleting it.", "backport": null}, - {"message": "Added rel attribute to basic pagination links.", "backport": null}, - {"message": "The 'page' query variable is now ignored when calling the paginator 'appends' method.", "backport": null}, - {"message": "Empty arrays that are 'required' validate as false when empty.", "backport": null}, - {"message": "Added --daemon option to the queue:work command.", "backport": null}, - {"message": "Added convenient traits for authentication and password reminding.", "backport": null} - ], "4.1.*": [ {"message": "Added new SSH task runner tools.", "backport": null}, {"message": "Allow before and after validation rules to reference other fields.", "backport": null}, diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json index b85b2cc..fbc91e9 100755 --- a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json @@ -8,9 +8,12 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/support": "4.2.*", - "ircmaxell/password-compat": "~1.0" + "php": ">=5.3.0", + "illuminate/support": "4.1.*", + "ircmaxell/password-compat": "1.0.*" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -20,7 +23,7 @@ "target-dir": "Illuminate/Hashing", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Html/FormBuilder.php b/vendor/laravel/framework/src/Illuminate/Html/FormBuilder.php index 6e22577..729c0bb 100755 --- a/vendor/laravel/framework/src/Illuminate/Html/FormBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Html/FormBuilder.php @@ -2,12 +2,9 @@ use Illuminate\Routing\UrlGenerator; use Illuminate\Session\Store as Session; -use Illuminate\Support\Traits\MacroableTrait; class FormBuilder { - use MacroableTrait; - /** * The HTML builder instance. * @@ -51,6 +48,13 @@ class FormBuilder { protected $labels = array(); /** + * The registered form builder macros. + * + * @var array + */ + protected $macros = array(); + + /** * The reserved form open attributes. * * @var array @@ -728,6 +732,18 @@ class FormBuilder { } /** + * Register a custom form macro. + * + * @param string $name + * @param callable $macro + * @return void + */ + public function macro($name, $macro) + { + $this->macros[$name] = $macro; + } + + /** * Parse the form action method. * * @param string $method @@ -969,4 +985,23 @@ class FormBuilder { return $this; } + /** + * Dynamically handle calls to the form builder. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + if (isset($this->macros[$method])) + { + return call_user_func_array($this->macros[$method], $parameters); + } + + throw new \BadMethodCallException("Method {$method} does not exist."); + } + } diff --git a/vendor/laravel/framework/src/Illuminate/Html/HtmlBuilder.php b/vendor/laravel/framework/src/Illuminate/Html/HtmlBuilder.php index 89da5d8..133b720 100755 --- a/vendor/laravel/framework/src/Illuminate/Html/HtmlBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Html/HtmlBuilder.php @@ -1,12 +1,9 @@ macros[$name] = $macro; + } + + /** * Convert an HTML string to entities. * * @param string $value @@ -376,4 +392,23 @@ class HtmlBuilder { return $safe; } + /** + * Dynamically handle calls to the html class. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + if (isset($this->macros[$method])) + { + return call_user_func_array($this->macros[$method], $parameters); + } + + throw new \BadMethodCallException("Method {$method} does not exist."); + } + } diff --git a/vendor/laravel/framework/src/Illuminate/Html/composer.json b/vendor/laravel/framework/src/Illuminate/Html/composer.json index a498acf..6f408a2 100755 --- a/vendor/laravel/framework/src/Illuminate/Html/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Html/composer.json @@ -8,10 +8,14 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/http": "4.2.*", - "illuminate/session": "4.2.*", - "illuminate/support": "4.2.*" + "php": ">=5.3.0", + "illuminate/http": "4.1.*", + "illuminate/session": "4.1.*", + "illuminate/support": "4.1.*" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -21,7 +25,7 @@ "target-dir": "Illuminate/Html", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php index 678a54f..0c23026 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php @@ -1,11 +1,10 @@ update(); } + /** + * Set a header on the Response. + * + * @param string $key + * @param string $value + * @param bool $replace + * @return \Illuminate\Http\Response + */ + public function header($key, $value, $replace = true) + { + $this->headers->set($key, $value, $replace); + + return $this; + } + + /** + * Add a cookie to the response. + * + * @param \Symfony\Component\HttpFoundation\Cookie $cookie + * @return \Illuminate\Http\Response + */ + public function withCookie(Cookie $cookie) + { + $this->headers->setCookie($cookie); + + return $this; + } + } diff --git a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php index 5b29d0c..b0a72aa 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php @@ -1,7 +1,6 @@ parseErrors($provider); - - $this->session->flash( - 'errors', $this->session->get('errors', new ViewErrorBag)->put($key, $value) - ); - - return $this; - } - - /** - * Parse the given errors into an appropriate value. - * - * @param \Illuminate\Support\Contracts\MessageProviderInterface|array $provider - * @return \Illuminate\Support\MessageBag - */ - protected function parseErrors($provider) + public function withErrors($provider) { if ($provider instanceof MessageProviderInterface) { - return $provider->getMessageBag(); + $this->with('errors', $provider->getMessageBag()); } else { - return new MessageBag((array) $provider); + $this->with('errors', new MessageBag((array) $provider)); } + + return $this; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Http/Response.php b/vendor/laravel/framework/src/Illuminate/Http/Response.php index 8206f9a..58812e1 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/Response.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Response.php @@ -1,13 +1,12 @@ headers->set($key, $value, $replace); + + return $this; + } + + /** + * Add a cookie to the response. + * + * @param \Symfony\Component\HttpFoundation\Cookie $cookie + * @return \Illuminate\Http\Response + */ + public function withCookie(Cookie $cookie) + { + $this->headers->setCookie($cookie); + + return $this; + } + + /** * Set the content on the response. * * @param mixed $content diff --git a/vendor/laravel/framework/src/Illuminate/Http/composer.json b/vendor/laravel/framework/src/Illuminate/Http/composer.json index d8d6b80..a9391e6 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Http/composer.json @@ -8,11 +8,15 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/session": "4.2.*", - "illuminate/support": "4.2.*", - "symfony/http-foundation": "2.5.*", - "symfony/http-kernel": "2.5.*" + "php": ">=5.3.0", + "illuminate/session": "4.1.*", + "illuminate/support": "4.1.*", + "symfony/http-foundation": "2.4.*", + "symfony/http-kernel": "2.4.*" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -22,7 +26,7 @@ "target-dir": "Illuminate/Http", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Log/Writer.php b/vendor/laravel/framework/src/Illuminate/Log/Writer.php index 43a5aae..5294960 100755 --- a/vendor/laravel/framework/src/Illuminate/Log/Writer.php +++ b/vendor/laravel/framework/src/Illuminate/Log/Writer.php @@ -5,10 +5,7 @@ use Illuminate\Events\Dispatcher; use Monolog\Handler\StreamHandler; use Monolog\Logger as MonologLogger; use Monolog\Formatter\LineFormatter; -use Monolog\Handler\ErrorLogHandler; use Monolog\Handler\RotatingFileHandler; -use Illuminate\Support\Contracts\JsonableInterface; -use Illuminate\Support\Contracts\ArrayableInterface; class Writer { @@ -63,7 +60,7 @@ class Writer { * Call Monolog with the given method and parameters. * * @param string $method - * @param mixed $parameters + * @param array $parameters * @return mixed */ protected function callMonolog($method, $parameters) @@ -89,7 +86,7 @@ class Writer { $this->monolog->pushHandler($handler = new StreamHandler($path, $level)); - $handler->setFormatter($this->getDefaultFormatter()); + $handler->setFormatter(new LineFormatter(null, null, true)); } /** @@ -106,33 +103,7 @@ class Writer { $this->monolog->pushHandler($handler = new RotatingFileHandler($path, $days, $level)); - $handler->setFormatter($this->getDefaultFormatter()); - } - - /** - * Register an error_log handler. - * - * @param integer $messageType - * @param string $level - * @return void - */ - public function useErrorLog($level = 'debug', $messageType = ErrorLogHandler::OPERATING_SYSTEM) - { - $level = $this->parseLevel($level); - - $this->monolog->pushHandler($handler = new ErrorLogHandler($messageType, $level)); - - $handler->setFormatter($this->getDefaultFormatter()); - } - - /** - * Get a defaut Monolog formatter instance. - * - * @return \Monolog\Formatters\LineFormatter - */ - protected function getDefaultFormatter() - { - return new LineFormatter(null, null, true); + $handler->setFormatter(new LineFormatter(null, null, true)); } /** @@ -230,8 +201,7 @@ class Writer { * Fires a log event. * * @param string $level - * @param string $message - * @param array $context + * @param array $parameters * @return void */ protected function fireLogEvent($level, $message, array $context = array()) @@ -262,15 +232,13 @@ class Writer { * Dynamically handle error additions. * * @param string $method - * @param mixed $parameters + * @param array $parameters * @return mixed * * @throws \BadMethodCallException */ public function __call($method, $parameters) { - $this->formatParameters($parameters); - if (in_array($method, $this->levels)) { call_user_func_array(array($this, 'fireLogEvent'), array_merge(array($method), $parameters)); @@ -283,29 +251,4 @@ class Writer { throw new \BadMethodCallException("Method [$method] does not exist."); } - /** - * Format the parameters for the logger. - * - * @param mixed $parameters - * @return void - */ - protected function formatParameters(&$parameters) - { - if (isset($parameters[0])) - { - if (is_array($parameters[0])) - { - $parameters[0] = var_export($parameters[0], true); - } - elseif ($parameters[0] instanceof JsonableInterface) - { - $parameters[0] = $parameters[0]->toJson(); - } - elseif ($parameters[0] instanceof ArrayableInterface) - { - $parameters[0] = var_export($parameters[0]->toArray(), true); - } - } - } - } diff --git a/vendor/laravel/framework/src/Illuminate/Log/composer.json b/vendor/laravel/framework/src/Illuminate/Log/composer.json index 155dc57..6836ca9 100755 --- a/vendor/laravel/framework/src/Illuminate/Log/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Log/composer.json @@ -8,12 +8,14 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/support": "4.2.*", - "monolog/monolog": "~1.6" + "php": ">=5.3.0", + "illuminate/support": "4.1.*", + "monolog/monolog": "1.*" }, "require-dev": { - "illuminate/events": "4.2.*" + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*", + "illuminate/events": "4.1.*" }, "autoload": { "psr-0": { @@ -23,7 +25,7 @@ "target-dir": "Illuminate/Log", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php index ea625d9..40beb30 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php @@ -4,9 +4,6 @@ use Swift_Mailer; use Illuminate\Support\ServiceProvider; use Swift_SmtpTransport as SmtpTransport; use Swift_MailTransport as MailTransport; -use Illuminate\Mail\Transport\LogTransport; -use Illuminate\Mail\Transport\MailgunTransport; -use Illuminate\Mail\Transport\MandrillTransport; use Swift_SendmailTransport as SendmailTransport; class MailServiceProvider extends ServiceProvider { @@ -34,9 +31,7 @@ class MailServiceProvider extends ServiceProvider { // Once we have create the mailer instance, we will set a container instance // on the mailer. This allows us to resolve mailer classes via containers // for maximum testability on said classes instead of passing Closures. - $mailer = new Mailer( - $app['view'], $app['swift.mailer'], $app['events'] - ); + $mailer = new Mailer($app['view'], $app['swift.mailer']); $mailer->setLogger($app['log'])->setQueue($app['queue']); @@ -104,15 +99,6 @@ class MailServiceProvider extends ServiceProvider { case 'mail': return $this->registerMailTransport($config); - case 'mailgun': - return $this->registerMailgunTransport($config); - - case 'mandrill': - return $this->registerMandrillTransport($config); - - case 'log': - return $this->registerLogTransport($config); - default: throw new \InvalidArgumentException('Invalid mail driver.'); } @@ -183,52 +169,6 @@ class MailServiceProvider extends ServiceProvider { } /** - * Register the Mailgun Swift Transport instance. - * - * @param array $config - * @return void - */ - protected function registerMailgunTransport($config) - { - $mailgun = $this->app['config']->get('services.mailgun', array()); - - $this->app->bindShared('swift.transport', function() use ($mailgun) - { - return new MailgunTransport($mailgun['secret'], $mailgun['domain']); - }); - } - - /** - * Register the Mandrill Swift Transport instance. - * - * @param array $config - * @return void - */ - protected function registerMandrillTransport($config) - { - $mandrill = $this->app['config']->get('services.mandrill', array()); - - $this->app->bindShared('swift.transport', function() use ($mandrill) - { - return new MandrillTransport($mandrill['secret']); - }); - } - - /** - * Register the "Log" Swift Transport instance. - * - * @param array $config - * @return void - */ - protected function registerLogTransport($config) - { - $this->app->bindShared('swift.transport', function($app) - { - return new LogTransport($app['log']->getMonolog()); - }); - } - - /** * Get the services provided by the provider. * * @return array diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php index d4f6fcf..d55c56e 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php @@ -4,8 +4,7 @@ use Closure; use Swift_Mailer; use Swift_Message; use Illuminate\Log\Writer; -use Illuminate\View\Factory; -use Illuminate\Events\Dispatcher; +use Illuminate\View\Environment; use Illuminate\Queue\QueueManager; use Illuminate\Container\Container; use Illuminate\Support\SerializableClosure; @@ -13,9 +12,9 @@ use Illuminate\Support\SerializableClosure; class Mailer { /** - * The view factory instance. + * The view environment instance. * - * @var \Illuminate\View\Factory + * @var \Illuminate\View\Environment */ protected $views; @@ -27,13 +26,6 @@ class Mailer { protected $swift; /** - * The event dispatcher instance. - * - * @var \Illuminate\Events\Dispatcher - */ - protected $events; - - /** * The global from address and name. * * @var array @@ -54,13 +46,6 @@ class Mailer { */ protected $container; - /* - * The QueueManager instance. - * - * @var \Illuminate\Queue\QueueManager - */ - protected $queue; - /** * Indicates if the actual sending is disabled. * @@ -76,24 +61,23 @@ class Mailer { protected $failedRecipients = array(); /** - * Array of parsed views containing html and text view name. + * The QueueManager instance. * - * @var array + * @var \Illuminate\Queue\QueueManager */ - protected $parsedViews = array(); + protected $queue; /** * Create a new Mailer instance. * - * @param \Illuminate\View\Factory $views + * @param \Illuminate\View\Environment $views * @param \Swift_Mailer $swift * @return void */ - public function __construct(Factory $views, Swift_Mailer $swift, Dispatcher $events = null) + public function __construct(Environment $views, Swift_Mailer $swift) { $this->views = $views; $this->swift = $swift; - $this->events = $events; } /** @@ -314,22 +298,19 @@ class Mailer { * Send a Swift Message instance. * * @param \Swift_Message $message - * @return void + * @return int */ protected function sendSwiftMessage($message) { - if ($this->events) - { - $this->events->fire('mailer.sending', array($message)); - } - if ( ! $this->pretending) { - $this->swift->send($message, $this->failedRecipients); + return $this->swift->send($message, $this->failedRecipients); } elseif (isset($this->logger)) { $this->logMessage($message); + + return 1; } } @@ -413,11 +394,11 @@ class Mailer { } /** - * Get the view factory instance. + * Get the view environment instance. * - * @return \Illuminate\View\Factory + * @return \Illuminate\View\Environment */ - public function getViewFactory() + public function getViewEnvironment() { return $this->views; } diff --git a/vendor/laravel/framework/src/Illuminate/Mail/composer.json b/vendor/laravel/framework/src/Illuminate/Mail/composer.json index 0fe7384..fbb6b0f 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Mail/composer.json @@ -8,15 +8,17 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/container": "4.2.*", - "illuminate/log": "4.2.*", - "illuminate/support": "4.2.*", - "illuminate/view": "4.2.*", - "swiftmailer/swiftmailer": "~5.1" + "php": ">=5.3.0", + "illuminate/container": "4.1.*", + "illuminate/log": "4.1.*", + "illuminate/support": "4.1.*", + "illuminate/view": "4.1.*", + "swiftmailer/swiftmailer": "~5.0" }, "require-dev": { - "illuminate/queue": "4.2.*" + "illuminate/queue": "4.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -26,7 +28,7 @@ "target-dir": "Illuminate/Mail", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php b/vendor/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php index dc9c7c2..65049cb 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php @@ -7,14 +7,11 @@ class BootstrapPresenter extends Presenter { * * @param string $url * @param int $page - * @param string $rel * @return string */ - public function getPageLinkWrapper($url, $page, $rel = null) + public function getPageLinkWrapper($url, $page) { - $rel = is_null($rel) ? '' : ' rel="'.$rel.'"'; - - return '
  • '.$page.'
  • '; + return '
  • '.$page.'
  • '; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Environment.php b/vendor/laravel/framework/src/Illuminate/Pagination/Environment.php new file mode 100755 index 0000000..83450f7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Environment.php @@ -0,0 +1,289 @@ +view = $view; + $this->trans = $trans; + $this->request = $request; + $this->pageName = $pageName; + $this->setupPaginationEnvironment(); + } + + /** + * Setup the pagination environment. + * + * @return void + */ + protected function setupPaginationEnvironment() + { + $this->view->addNamespace('pagination', __DIR__.'/views'); + } + + /** + * Get a new paginator instance. + * + * @param array $items + * @param int $total + * @param int $perPage + * @return \Illuminate\Pagination\Paginator + */ + public function make(array $items, $total, $perPage) + { + $paginator = new Paginator($this, $items, $total, $perPage); + + return $paginator->setupPaginationContext(); + } + + /** + * Get the pagination view. + * + * @param \Illuminate\Pagination\Paginator $paginator + * @param string $view + * @return \Illuminate\View\View + */ + public function getPaginationView(Paginator $paginator, $view = null) + { + $data = array('environment' => $this, 'paginator' => $paginator); + + return $this->view->make($this->getViewName($view), $data); + } + + /** + * Get the number of the current page. + * + * @return int + */ + public function getCurrentPage() + { + $page = (int) $this->currentPage ?: $this->request->input($this->pageName, 1); + + if ($page < 1 || filter_var($page, FILTER_VALIDATE_INT) === false) + { + return 1; + } + + return $page; + } + + /** + * Set the number of the current page. + * + * @param int $number + * @return void + */ + public function setCurrentPage($number) + { + $this->currentPage = $number; + } + + /** + * Get the root URL for the request. + * + * @return string + */ + public function getCurrentUrl() + { + return $this->baseUrl ?: $this->request->url(); + } + + /** + * Set the base URL in use by the paginator. + * + * @param string $baseUrl + * @return void + */ + public function setBaseUrl($baseUrl) + { + $this->baseUrl = $baseUrl; + } + + /** + * Set the input page parameter name used by the paginator. + * + * @param string $pageName + * @return void + */ + public function setPageName($pageName) + { + $this->pageName = $pageName; + } + + /** + * Get the input page parameter name used by the paginator. + * + * @return string + */ + public function getPageName() + { + return $this->pageName; + } + + /** + * Get the name of the pagination view. + * + * @param string $view + * @return string + */ + public function getViewName($view = null) + { + if ( ! is_null($view)) return $view; + + return $this->viewName ?: 'pagination::slider'; + } + + /** + * Set the name of the pagination view. + * + * @param string $viewName + * @return void + */ + public function setViewName($viewName) + { + $this->viewName = $viewName; + } + + /** + * Get the locale of the paginator. + * + * @return string + */ + public function getLocale() + { + return $this->locale; + } + + /** + * Set the locale of the paginator. + * + * @param string $locale + * @return void + */ + public function setLocale($locale) + { + $this->locale = $locale; + } + + /** + * Get the active request instance. + * + * @return \Symfony\Component\HttpFoundation\Request + */ + public function getRequest() + { + return $this->request; + } + + /** + * Set the active request instance. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @return void + */ + public function setRequest(Request $request) + { + $this->request = $request; + } + + /** + * Get the current view driver. + * + * @return \Illuminate\View\Environment + */ + public function getViewDriver() + { + return $this->view; + } + + /** + * Set the current view driver. + * + * @param \Illuminate\View\Environment $view + * @return void + */ + public function setViewDriver(ViewEnvironment $view) + { + $this->view = $view; + } + + /** + * Get the translator instance. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + public function getTranslator() + { + return $this->trans; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php index dfec6df..7737cdb 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php @@ -20,7 +20,7 @@ class PaginationServiceProvider extends ServiceProvider { { $this->app->bindShared('paginator', function($app) { - $paginator = new Factory($app['request'], $app['view'], $app['translator']); + $paginator = new Environment($app['request'], $app['view'], $app['translator']); $paginator->setViewName($app['config']['view.pagination']); diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php index 81ac396..55f6ec3 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php @@ -11,11 +11,11 @@ use Illuminate\Support\Contracts\ArrayableInterface; class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorAggregate, JsonableInterface { /** - * The pagination factory. + * The pagination environment. * - * @var \Illuminate\Pagination\Factory + * @var \Illuminate\Pagination\Environment */ - protected $factory; + protected $env; /** * The items being paginated. @@ -32,13 +32,6 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA protected $total; /** - * Indicates if a pagination doing "quick" pagination has more items. - * - * @var bool - */ - protected $hasMore; - - /** * The amount of items to show per page. * * @var int @@ -90,28 +83,18 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA /** * Create a new Paginator instance. * - * @param \Illuminate\Pagination\Factory $factory + * @param \Illuminate\Pagination\Environment $env * @param array $items * @param int $total - * @param mixed $perPage + * @param int $perPage * @return void */ - public function __construct(Factory $factory, array $items, $total, $perPage = null) + public function __construct(Environment $env, array $items, $total, $perPage) { - $this->factory = $factory; - - if (is_null($perPage)) - { - $this->perPage = (int) $total; - $this->items = array_slice($items, 0, $perPage); - $this->hasMore = count(array_slice($items, $this->perPage, 1)) > 0; - } - else - { - $this->items = $items; - $this->total = (int) $total; - $this->perPage = (int) $perPage; - } + $this->env = $env; + $this->items = $items; + $this->total = (int) $total; + $this->perPage = (int) $perPage; } /** @@ -135,18 +118,9 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ protected function calculateCurrentAndLastPages() { - if ($this->isQuickPaginating()) - { - $this->currentPage = $this->factory->getCurrentPage(); - - $this->lastPage = $this->hasMore ? $this->currentPage + 1 : $this->currentPage; - } - else - { - $this->lastPage = (int) ceil($this->total / $this->perPage); + $this->lastPage = (int) ceil($this->total / $this->perPage); - $this->currentPage = $this->calculateCurrentPage($this->lastPage); - } + $this->currentPage = $this->calculateCurrentPage($this->lastPage); } /** @@ -169,7 +143,7 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ protected function calculateCurrentPage($lastPage) { - $page = $this->factory->getCurrentPage(); + $page = $this->env->getCurrentPage(); // The page number will get validated and adjusted if it either less than one // or greater than the last page available based on the count of the given @@ -201,7 +175,7 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ public function links($view = null) { - return $this->factory->getPaginationView($this, $view); + return $this->env->getPaginationView($this, $view); } /** @@ -213,7 +187,7 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA public function getUrl($page) { $parameters = array( - $this->factory->getPageName() => $page, + $this->env->getPageName() => $page, ); // If we have any extra query string key / value pairs that need to be added @@ -226,7 +200,7 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA $fragment = $this->buildFragment(); - return $this->factory->getCurrentUrl().'?'.http_build_query($parameters, null, '&').$fragment; + return $this->env->getCurrentUrl().'?'.http_build_query($parameters, null, '&').$fragment; } /** @@ -291,25 +265,12 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ public function addQuery($key, $value) { - if ($key !== $this->factory->getPageName()) - { - $this->query[$key] = $value; - } + $this->query[$key] = $value; return $this; } /** - * Determine if the paginator is doing "quick" pagination. - * - * @return bool - */ - public function isQuickPaginating() - { - return is_null($this->total); - } - - /** * Get the current page for the request. * * @param int|null $total @@ -416,17 +377,17 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ public function setBaseUrl($baseUrl) { - $this->factory->setBaseUrl($baseUrl); + $this->env->setBaseUrl($baseUrl); } /** - * Get the pagination factory. + * Get the pagination environment. * - * @return \Illuminate\Pagination\Factory + * @return \Illuminate\Pagination\Environment */ - public function getFactory() + public function getEnvironment() { - return $this->factory; + return $this->env; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Presenter.php b/vendor/laravel/framework/src/Illuminate/Pagination/Presenter.php index ad0798b..9e4f825 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/Presenter.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Presenter.php @@ -41,10 +41,9 @@ abstract class Presenter { * * @param string $url * @param int $page - * @param string $rel * @return string */ - abstract public function getPageLinkWrapper($url, $page, $rel = null); + abstract public function getPageLinkWrapper($url, $page); /** * Get HTML wrapper for disabled text. @@ -206,7 +205,7 @@ abstract class Presenter { { $url = $this->paginator->getUrl($this->currentPage - 1); - return $this->getPageLinkWrapper($url, $text, 'prev'); + return $this->getPageLinkWrapper($url, $text); } } @@ -229,7 +228,7 @@ abstract class Presenter { { $url = $this->paginator->getUrl($this->currentPage + 1); - return $this->getPageLinkWrapper($url, $text, 'next'); + return $this->getPageLinkWrapper($url, $text); } } diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/composer.json b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json index 432459c..7d09a3b 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json @@ -8,12 +8,16 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/http": "4.2.*", - "illuminate/support": "4.2.*", - "illuminate/view": "4.2.*", - "symfony/http-foundation": "2.5.*", - "symfony/translation": "2.5.*" + "php": ">=5.3.0", + "illuminate/http": "4.1.*", + "illuminate/support": "4.1.*", + "illuminate/view": "4.1.*", + "symfony/http-foundation": "2.4.*", + "symfony/translation": "2.4.*" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -23,7 +27,7 @@ "target-dir": "Illuminate/Pagination", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php index 8979a7a..719eab1 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php @@ -85,7 +85,7 @@ class BeanstalkdQueue extends Queue implements QueueInterface { $pheanstalk = $this->pheanstalk->useTube($this->getQueue($queue)); - return $pheanstalk->put($payload, Pheanstalk::DEFAULT_PRIORITY, $this->getSeconds($delay), $this->timeToRun); + return $pheanstalk->put($payload, Pheanstalk::DEFAULT_PRIORITY, $this->getSeconds($delay)); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php index 9b4a489..1cd71d8 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php @@ -53,7 +53,7 @@ class IronConnector implements ConnectorInterface { $iron->ssl_verifypeer = $config['ssl_verifypeer']; } - return new IronQueue($iron, $this->request, $config['queue'], $config['encrypt']); + return new IronQueue($iron, $this->crypt, $this->request, $config['queue']); } } diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php index f138b3c..0156d6c 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php @@ -101,11 +101,6 @@ class ListenCommand extends Command { $this->listener->setSleep($this->option('sleep')); $this->listener->setMaxTries($this->option('tries')); - - $this->listener->setOutputHandler(function($type, $line) - { - $this->output->write($line); - }); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php index 281f414..5a9728b 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php @@ -1,11 +1,9 @@ downForMaintenance() && ! $this->option('daemon')) return; + if ($this->downForMaintenance()) return; $queue = $this->option('queue'); @@ -63,68 +61,7 @@ class WorkCommand extends Command { $connection = $this->argument('connection'); - $response = $this->runWorker( - $connection, $queue, $delay, $memory, $this->option('daemon') - ); - - // If a job was fired by the worker, we'll write the output out to the console - // so that the developer can watch live while the queue runs in the console - // window, which will also of get logged if stdout is logged out to disk. - if ( ! is_null($response['job'])) - { - $this->writeOutput($response['job'], $response['failed']); - } - } - - /** - * Run the worker instance. - * - * @param string $connection - * @param string $queue - * @param int $delay - * @param int $memory - * @param bool $daemon - * @return array - */ - protected function runWorker($connection, $queue, $delay, $memory, $daemon = false) - { - if ($daemon) - { - $this->worker->setDaemonExceptionHandler($this->laravel['exception']); - - return $this->worker->daemon( - $connection, $queue, $delay, $memory, - $this->option('sleep'), $this->option('tries') - ); - } - else - { - return $this->worker->pop( - $connection, $queue, $delay, - $this->option('sleep'), $this->option('tries') - ); - } - } - - /** - * Write the status output for the queue worker. - * - * @param \Illuminate\Queue\Jobs\Job $job - * @param bool $failed - * @return void - */ - protected function writeOutput(Job $job, $failed) - { - $options = OutputInterface::OUTPUT_RAW; - - if ($failed) - { - $this->output->writeln('Failed: '.$job->getName(), $options); - } - else - { - $this->output->writeln('Processed: '.$job->getName(), $options); - } + $this->worker->pop($connection, $queue, $delay, $memory, $this->option('sleep'), $this->option('tries')); } /** @@ -161,8 +98,6 @@ class WorkCommand extends Command { return array( array('queue', null, InputOption::VALUE_OPTIONAL, 'The queue to listen on'), - array('daemon', null, InputOption::VALUE_NONE, 'Run the worker in daemon mode'), - array('delay', null, InputOption::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0), array('force', null, InputOption::VALUE_NONE, 'Force the worker to run even in maintenance mode'), diff --git a/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php b/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php index 21056c6..77bb78c 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php @@ -1,28 +1,8 @@ crypt = $crypt; - } - - /** * Fire the Closure based queue job. * * @param \Illuminate\Queue\Jobs\Job $job @@ -31,7 +11,7 @@ class IlluminateQueueClosure { */ public function fire($job, $data) { - $closure = unserialize($this->crypt->decrypt($data['closure'])); + $closure = unserialize($data['closure']); $closure($job); } diff --git a/vendor/laravel/framework/src/Illuminate/Queue/IronQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/IronQueue.php index 2e0387d..9cee7b5 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/IronQueue.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/IronQueue.php @@ -4,6 +4,7 @@ use IronMQ; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Queue\Jobs\IronJob; +use Illuminate\Encryption\Encrypter; class IronQueue extends Queue implements QueueInterface { @@ -15,6 +16,13 @@ class IronQueue extends Queue implements QueueInterface { protected $iron; /** + * The encrypter instance. + * + * @var \Illuminate\Encryption\Encrypter + */ + protected $crypt; + + /** * The current request instance. * * @var \Illuminate\Http\Request @@ -29,27 +37,20 @@ class IronQueue extends Queue implements QueueInterface { protected $default; /** - * Indicates if the messages should be encrypted. - * - * @var bool - */ - protected $shouldEncrypt; - - /** * Create a new IronMQ queue instance. * * @param \IronMQ $iron + * @param \Illuminate\Encryption\Encrypter $crypt * @param \Illuminate\Http\Request $request * @param string $default - * @param bool $shouldEncrypt * @return void */ - public function __construct(IronMQ $iron, Request $request, $default, $shouldEncrypt = false) + public function __construct(IronMQ $iron, Encrypter $crypt, Request $request, $default) { $this->iron = $iron; + $this->crypt = $crypt; $this->request = $request; $this->default = $default; - $this->shouldEncrypt = $shouldEncrypt; } /** @@ -75,7 +76,7 @@ class IronQueue extends Queue implements QueueInterface { */ public function pushRaw($payload, $queue = null, array $options = array()) { - if ($this->shouldEncrypt) $payload = $this->crypt->encrypt($payload); + $payload = $this->crypt->encrypt($payload); return $this->iron->postMessage($this->getQueue($queue), $payload, $options)->id; } @@ -130,7 +131,7 @@ class IronQueue extends Queue implements QueueInterface { // queues will be a security hazard to unsuspecting developers using it. if ( ! is_null($job)) { - $job->body = $this->parseJobBody($job->body); + $job->body = $this->crypt->decrypt($job->body); return new IronJob($this->container, $this, $job); } @@ -169,7 +170,7 @@ class IronQueue extends Queue implements QueueInterface { { $r = $this->request; - $body = $this->parseJobBody($r->getContent()); + $body = $this->crypt->decrypt($r->getContent()); return (object) array( 'id' => $r->header('iron-message-id'), 'body' => $body, 'pushed' => true, @@ -203,17 +204,6 @@ class IronQueue extends Queue implements QueueInterface { } /** - * Parse the job body for firing. - * - * @param string $body - * @return string - */ - protected function parseJobBody($body) - { - return $this->shouldEncrypt ? $this->crypt->decrypt($body) : $body; - } - - /** * Get the queue or return the default. * * @param string|null $queue diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php index 09e67b9..491fe88 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php @@ -149,16 +149,6 @@ abstract class Job { } /** - * Get the name of the queued job class. - * - * @return string - */ - public function getName() - { - return json_decode($this->getRawBody(), true)['job']; - } - - /** * Get the name of the queue the job belongs to. * * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Listener.php b/vendor/laravel/framework/src/Illuminate/Queue/Listener.php index 717157e..8057e4b 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Listener.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Listener.php @@ -1,6 +1,5 @@ commandPath = $commandPath; - $this->workerCommand = '"'.PHP_BINARY.'" artisan queue:work %s --queue="%s" --delay=%s --memory=%s --sleep=%s --tries=%s'; + $this->environment = $environment; } /** @@ -88,10 +81,7 @@ class Listener { */ public function runProcess(Process $process, $memory) { - $process->run(function($type, $line) - { - $this->handleWorkerOutput($type, $line); - }); + $process->run(); // Once we have run the job we'll go check if the memory limit has been // exceeded for the script. If it has, we will kill this script so a @@ -136,21 +126,6 @@ class Listener { } /** - * Handle output from the worker process. - * - * @param int $type - * @param string $line - * @return void - */ - protected function handleWorkerOutput($type, $line) - { - if (isset($this->outputHandler)) - { - call_user_func($this->outputHandler, $type, $line); - } - } - - /** * Determine if the memory limit has been exceeded. * * @param int $memoryLimit @@ -172,17 +147,6 @@ class Listener { } /** - * Set the output handler callback. - * - * @param \Closure $outputHandler - * @return void - */ - public function setOutputHandler(Closure $outputHandler) - { - $this->outputHandler = $outputHandler; - } - - /** * Get the current listener environment. * * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Queue.php b/vendor/laravel/framework/src/Illuminate/Queue/Queue.php index 7ac0b4e..1214848 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Queue.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Queue.php @@ -3,7 +3,6 @@ use Closure; use DateTime; use Illuminate\Container\Container; -use Illuminate\Encryption\Encrypter; use Illuminate\Support\SerializableClosure; abstract class Queue { @@ -70,7 +69,7 @@ abstract class Queue { */ protected function createClosurePayload($job, $data) { - $closure = $this->crypt->encrypt(serialize(new SerializableClosure($job))); + $closure = serialize(new SerializableClosure($job)); return array('job' => 'IlluminateQueueClosure', 'data' => compact('closure')); } @@ -129,15 +128,4 @@ abstract class Queue { $this->container = $container; } - /** - * Set the encrypter instance. - * - * @param \Illuminate\Encryption\Encrypter $crypt - * @return void - */ - public function setEncrypter(Encrypter $crypt) - { - $this->crypt = $crypt; - } - } diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php index 899b4bd..00a2af3 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php @@ -30,17 +30,6 @@ class QueueManager { } /** - * Register an event listener for the daemon queue loop. - * - * @param mixed $callback - * @return void - */ - public function looping($callback) - { - $this->app['events']->listen('illuminate.queue.looping', $callback); - } - - /** * Register an event listener for the failed job event. * * @param mixed $callback @@ -52,17 +41,6 @@ class QueueManager { } /** - * Register an event listener for the daemon queue stopping. - * - * @param mixed $callback - * @return void - */ - public function stopping($callback) - { - $this->app['events']->listen('illuminate.queue.stopping', $callback); - } - - /** * Determine if the driver is connected. * * @param string $name @@ -91,8 +69,6 @@ class QueueManager { $this->connections[$name] = $this->resolve($name); $this->connections[$name]->setContainer($this->app); - - $this->connections[$name]->setEncrypter($this->app['encrypter']); } return $this->connections[$name]; diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php index 93758bf..cfc83e9 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php @@ -1,6 +1,5 @@ registerSubscriber(); $this->registerFailedJobServices(); - - $this->registerQueueClosure(); } /** @@ -48,14 +45,16 @@ class QueueServiceProvider extends ServiceProvider { */ protected function registerManager() { - $this->app->bindShared('queue', function($app) + $me = $this; + + $this->app->bindShared('queue', function($app) use ($me) { // Once we have an instance of the queue manager, we will register the various // resolvers for the queue connectors. These connectors are responsible for // creating the classes that accept queue configs and instantiate queues. $manager = new QueueManager($app); - $this->registerConnectors($manager); + $me->registerConnectors($manager); return $manager; }); @@ -258,19 +257,6 @@ class QueueServiceProvider extends ServiceProvider { } /** - * Register the Illuminate queued closure job. - * - * @return void - */ - protected function registerQueueClosure() - { - $this->app->bindShared('IlluminateQueueClosure', function($app) - { - return new IlluminateQueueClosure($app['encrypter']); - }); - } - - /** * Get the services provided by the provider. * * @return array diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Worker.php b/vendor/laravel/framework/src/Illuminate/Queue/Worker.php index 91e2c16..437dd4b 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Worker.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Worker.php @@ -28,13 +28,6 @@ class Worker { protected $events; /** - * The exception handler instance. - * - * @var \Illuminate\Exception\Handler - */ - protected $exceptions; - - /** * Create a new queue worker. * * @param \Illuminate\Queue\QueueManager $manager @@ -52,7 +45,7 @@ class Worker { } /** - * Listen to the given queue in a loop. + * Listen to the given queue. * * @param string $connectionName * @param string $queue @@ -60,92 +53,26 @@ class Worker { * @param int $memory * @param int $sleep * @param int $maxTries - * @return array - */ - public function daemon($connectionName, $queue = null, $delay = 0, $memory = 128, $sleep = 3, $maxTries = 0) - { - while (true) - { - if ($this->daemonShouldRun()) - { - $this->runNextJobForDaemon( - $connectionName, $queue, $delay, $sleep, $maxTries - ); - } - else - { - $this->sleep($sleep); - } - - if ($this->memoryExceeded($memory)) - { - $this->stop(); - } - } - } - - /** - * Run the next job for the daemon worker. - * - * @param string $connectionName - * @param string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries * @return void */ - protected function runNextJobForDaemon($connectionName, $queue, $delay, $sleep, $maxTries) - { - try - { - $this->pop($connectionName, $queue, $delay, $sleep, $maxTries); - } - catch (\Exception $e) - { - if ($this->exceptions) $this->exceptions->handleException($e); - } - } - - /** - * Deteremine if the daemon should process on this iteration. - * - * @return bool - */ - protected function daemonShouldRun() - { - return $this->events->until('illuminate.queue.looping') !== false; - } - - /** - * Listen to the given queue. - * - * @param string $connectionName - * @param string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries - * @return array - */ - public function pop($connectionName, $queue = null, $delay = 0, $sleep = 3, $maxTries = 0) + public function pop($connectionName, $queue = null, $delay = 0, $memory = 128, $sleep = 3, $maxTries = 0) { $connection = $this->manager->connection($connectionName); $job = $this->getNextJob($connection, $queue); // If we're able to pull a job off of the stack, we will process it and - // then immediately return back out. If there is no job on the queue - // we will "sleep" the worker for the specified number of seconds. + // then make sure we are not exceeding our memory limits for the run + // which is to protect against run-away memory leakages from here. if ( ! is_null($job)) { - return $this->process( + $this->process( $this->manager->getName($connectionName), $job, $maxTries, $delay ); } else { $this->sleep($sleep); - - return ['job' => null, 'failed' => false]; } } @@ -192,8 +119,6 @@ class Worker { $job->fire(); if ($job->autoDelete()) $job->delete(); - - return ['job' => $job, 'failed' => false]; } catch (\Exception $e) @@ -212,7 +137,7 @@ class Worker { * * @param string $connection * @param \Illuminate\Queue\Jobs\Job $job - * @return array + * @return void */ protected function logFailedJob($connection, Job $job) { @@ -224,8 +149,6 @@ class Worker { $this->raiseFailedJobEvent($connection, $job); } - - return ['job' => $job, 'failed' => true]; } /** @@ -246,29 +169,6 @@ class Worker { } /** - * Determine if the memory limit has been exceeded. - * - * @param int $memoryLimit - * @return bool - */ - public function memoryExceeded($memoryLimit) - { - return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; - } - - /** - * Stop listening and bail out of the script. - * - * @return void - */ - public function stop() - { - $this->events->fire('illuminate.queue.stopping'); - - die; - } - - /** * Sleep the script for a given number of seconds. * * @param int $seconds @@ -280,17 +180,6 @@ class Worker { } /** - * Set the exception handler to use in Daemon mode. - * - * @param \Illuminate\Exception\Handler $handler - * @return void - */ - public function setDaemonExceptionHandler($handler) - { - $this->exceptions = $handler; - } - - /** * Get the queue manager instance. * * @return \Illuminate\Queue\QueueManager diff --git a/vendor/laravel/framework/src/Illuminate/Queue/composer.json b/vendor/laravel/framework/src/Illuminate/Queue/composer.json index 28980f7..d9e914f 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Queue/composer.json @@ -8,18 +8,20 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/console": "4.2.*", - "illuminate/container": "4.2.*", - "illuminate/http": "4.2.*", - "illuminate/support": "4.2.*", - "symfony/process": "2.5.*" + "php": ">=5.3.0", + "illuminate/console": "4.1.*", + "illuminate/container": "4.1.*", + "illuminate/http": "4.1.*", + "illuminate/support": "4.1.*", + "symfony/process": "2.4.*" }, "require-dev": { - "illuminate/events": "4.2.*", - "aws/aws-sdk-php": "~2.6", - "iron-io/iron_mq": "~1.5", - "pda/pheanstalk": "~2.1" + "illuminate/events": "4.1.*", + "aws/aws-sdk-php": "2.6.*", + "iron-io/iron_mq": "1.5.*", + "pda/pheanstalk": "2.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -32,7 +34,7 @@ "target-dir": "Illuminate/Queue", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "suggest": { diff --git a/vendor/laravel/framework/src/Illuminate/Redis/composer.json b/vendor/laravel/framework/src/Illuminate/Redis/composer.json index 4cbef76..aee8fb9 100755 --- a/vendor/laravel/framework/src/Illuminate/Redis/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Redis/composer.json @@ -8,10 +8,14 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/support": "4.2.*", + "php": ">=5.3.0", + "illuminate/support": "4.1.*", "predis/predis": "0.8.*" }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" + }, "autoload": { "psr-0": { "Illuminate\\Redis": "" @@ -20,7 +24,7 @@ "target-dir": "Illuminate/Redis", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Remote/Connection.php b/vendor/laravel/framework/src/Illuminate/Remote/Connection.php index 8d4bf6b..3b43bbd 100644 --- a/vendor/laravel/framework/src/Illuminate/Remote/Connection.php +++ b/vendor/laravel/framework/src/Illuminate/Remote/Connection.php @@ -213,7 +213,9 @@ class Connection implements ConnectionInterface { { if ( ! is_null($callback)) return $callback; - return function($line) { $this->display($line); }; + $me = $this; + + return function($line) use ($me) { $me->display($line); }; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php b/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php index 96f1ce5..7fbd4da 100644 --- a/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php +++ b/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php @@ -13,6 +13,13 @@ class RemoteManager { protected $app; /** + * The active connection instances. + * + * @var array + */ + protected $connections = array(); + + /** * Create a new remote manager instance. * * @param \Illuminate\Foundation\Application $app @@ -84,7 +91,12 @@ class RemoteManager { */ public function resolve($name) { - return $this->makeConnection($name, $this->getConfig($name)); + if ( ! isset($this->connections[$name])) + { + $this->connections[$name] = $this->makeConnection($name, $this->getConfig($name)); + } + + return $this->connections[$name]; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Remote/composer.json b/vendor/laravel/framework/src/Illuminate/Remote/composer.json index f7bb904..c26645b 100644 --- a/vendor/laravel/framework/src/Illuminate/Remote/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Remote/composer.json @@ -8,13 +8,15 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/filesystem": "4.2.*", - "illuminate/support": "4.2.*", + "php": ">=5.3.0", + "illuminate/filesystem": "4.1.*", + "illuminate/support": "4.1.*", "phpseclib/phpseclib": "0.3.*" }, "require-dev": { - "illuminate/console": "4.2.*" + "illuminate/console": "4.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -24,7 +26,7 @@ "target-dir": "Illuminate/Remote", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Route.php b/vendor/laravel/framework/src/Illuminate/Routing/Route.php index 5b4ea2d..d8b834d 100755 --- a/vendor/laravel/framework/src/Illuminate/Routing/Route.php +++ b/vendor/laravel/framework/src/Illuminate/Routing/Route.php @@ -322,7 +322,7 @@ class Route { { return array_map(function($value) { - return is_string($value) ? rawurldecode($value) : $value; + return is_string($value) ? urldecode($value) : $value; }, $this->parameters); } diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Router.php b/vendor/laravel/framework/src/Illuminate/Routing/Router.php index c8252a7..0a297c3 100755 --- a/vendor/laravel/framework/src/Illuminate/Routing/Router.php +++ b/vendor/laravel/framework/src/Illuminate/Routing/Router.php @@ -440,12 +440,14 @@ class Router implements HttpKernelInterface, RouteFiltererInterface { */ protected function getNestedResourceUri(array $segments) { + $me = $this; + // We will spin through the segments and create a place-holder for each of the // resource segments, as well as the resource itself. Then we should get an // entire string for the resource URI that contains all nested resources. - return implode('/', array_map(function($s) + return implode('/', array_map(function($s) use ($me) { - return $s.'/{'.$this->getResourceWildcard($s).'}'; + return $s.'/{'.$me->getResourceWildcard($s).'}'; }, $segments)); } @@ -911,16 +913,18 @@ class Router implements HttpKernelInterface, RouteFiltererInterface { */ protected function getClassClosure($controller) { + $me = $this; + // Here we'll get an instance of this controller dispatcher and hand it off to // the Closure so it will be used to resolve the class instances out of our // IoC container instance and call the appropriate methods on the class. $d = $this->getControllerDispatcher(); - return function() use ($d, $controller) + return function() use ($me, $d, $controller) { - $route = $this->current(); + $route = $me->current(); - $request = $this->getCurrentRequest(); + $request = $me->getCurrentRequest(); // Now we can split the controller and method out of the action string so that we // can call them appropriately on the class. This controller and method are in @@ -1551,7 +1555,7 @@ class Router implements HttpKernelInterface, RouteFiltererInterface { * @param dynamic string * @return bool */ - public function uses() + public function isAction() { foreach (func_get_args() as $pattern) { diff --git a/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php b/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php index d579583..33b62bf 100755 --- a/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php +++ b/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php @@ -1,7 +1,7 @@ forceSchema ?: $this->request->getScheme().'://'; + return $this->request->getScheme().'://'; } else { @@ -198,17 +184,6 @@ class UrlGenerator { } /** - * Force the schema for URLs. - * - * @param string $schema - * @return void - */ - public function forceSchema($schema) - { - $this->forceSchema = $schema.'://'; - } - - /** * Get the URL to a named route. * * @param string $name @@ -464,10 +439,7 @@ class UrlGenerator { */ protected function getRootUrl($scheme, $root = null) { - if (is_null($root)) - { - $root = $this->forcedRoot ?: $this->request->root(); - } + $root = $root ?: $this->request->root(); $start = starts_with($root, 'http://') ? 'http://' : 'https://'; @@ -475,17 +447,6 @@ class UrlGenerator { } /** - * Set the forced root URL. - * - * @param string $root - * @return void - */ - public function forceRootUrl($root) - { - $this->forcedRoot = $root; - } - - /** * Determine if the given path is a valid URL. * * @param string $path diff --git a/vendor/laravel/framework/src/Illuminate/Routing/composer.json b/vendor/laravel/framework/src/Illuminate/Routing/composer.json index 29df7f0..1a6897d 100755 --- a/vendor/laravel/framework/src/Illuminate/Routing/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Routing/composer.json @@ -8,18 +8,20 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/container": "4.2.*", - "illuminate/http": "4.2.*", - "illuminate/session": "4.2.*", - "illuminate/support": "4.2.*", - "symfony/http-foundation": "2.5.*", - "symfony/http-kernel": "2.5.*", - "symfony/routing": "2.5.*" + "php": ">=5.3.0", + "illuminate/container": "4.1.*", + "illuminate/http": "4.1.*", + "illuminate/session": "4.1.*", + "illuminate/support": "4.1.*", + "symfony/http-foundation": "2.4.*", + "symfony/http-kernel": "2.4.*", + "symfony/routing": "2.4.*" }, "require-dev": { - "illuminate/console": "4.2.*", - "illuminate/filesystem": "4.2.*" + "illuminate/console": "4.1.*", + "illuminate/filesystem": "4.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -29,7 +31,7 @@ "target-dir": "Illuminate/Routing", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php b/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php index 18fce5e..f008347 100755 --- a/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php +++ b/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php @@ -72,7 +72,7 @@ class SessionManager extends Manager { $table = $connection->getTablePrefix().$this->app['config']['session.table']; - return $this->buildSession(new DatabaseSessionHandler($connection, $table)); + return $this->buildSession(new PdoSessionHandler($connection->getPdo(), $this->getDatabaseOptions($table))); } /** @@ -87,6 +87,18 @@ class SessionManager extends Manager { return $this->app['db']->connection($connection); } + + /** + * Get the database session options. + * + * @param string $table + * @return array + */ + protected function getDatabaseOptions($table) + { + return array('db_table' => $table, 'db_id_col' => 'id', 'db_data_col' => 'payload', 'db_time_col' => 'last_activity'); + } + /** * Create an instance of the APC session driver. * diff --git a/vendor/laravel/framework/src/Illuminate/Session/Store.php b/vendor/laravel/framework/src/Illuminate/Session/Store.php index cda928e..50ed01e 100755 --- a/vendor/laravel/framework/src/Illuminate/Session/Store.php +++ b/vendor/laravel/framework/src/Illuminate/Session/Store.php @@ -194,8 +194,6 @@ class Store implements SessionInterface { { if ($destroy) $this->handler->destroy($this->getId()); - $this->setExists(false); - $this->id = $this->generateSessionId(); return true; } @@ -268,22 +266,6 @@ class Store implements SessionInterface { } /** - * Get the value of a given key and then forget it. - * - * @param string $key - * @param string $default - * @return mixed - */ - public function pull($key, $default = null) - { - $value = $this->get($key, $default); - - $this->forget($key); - - return $value; - } - - /** * Determine if the session contains old input. * * @param string $key @@ -572,20 +554,6 @@ class Store implements SessionInterface { } /** - * Set the existence of the session on the handler if applicable. - * - * @param bool $value - * @return void - */ - public function setExists($value) - { - if ($this->handler instanceof ExistenceAwareInterface) - { - $this->handler->setExists($value); - } - } - - /** * Get the underlying session handler implementation. * * @return \SessionHandlerInterface diff --git a/vendor/laravel/framework/src/Illuminate/Session/composer.json b/vendor/laravel/framework/src/Illuminate/Session/composer.json index bec66ab..d9e370f 100755 --- a/vendor/laravel/framework/src/Illuminate/Session/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Session/composer.json @@ -8,17 +8,19 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/cache": "4.2.*", - "illuminate/cookie": "4.2.*", - "illuminate/encryption": "4.2.*", - "illuminate/support": "4.2.*", - "nesbot/carbon": "~1.0", - "symfony/finder": "2.5.*", - "symfony/http-foundation": "2.5.*" + "php": ">=5.3.0", + "illuminate/cache": "4.1.*", + "illuminate/cookie": "4.1.*", + "illuminate/encryption": "4.1.*", + "illuminate/support": "4.1.*", + "nesbot/carbon": "1.*", + "symfony/finder": "2.4.*", + "symfony/http-foundation": "2.4.*" }, "require-dev": { - "illuminate/console": "4.2.*" + "illuminate/console": "4.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -28,7 +30,7 @@ "target-dir": "Illuminate/Session", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Support/Collection.php b/vendor/laravel/framework/src/Illuminate/Support/Collection.php index c1f908f..d328316 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Collection.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Collection.php @@ -5,12 +5,11 @@ use Countable; use ArrayAccess; use ArrayIterator; use CachingIterator; -use JsonSerializable; use IteratorAggregate; use Illuminate\Support\Contracts\JsonableInterface; use Illuminate\Support\Contracts\ArrayableInterface; -class Collection implements ArrayAccess, ArrayableInterface, Countable, IteratorAggregate, JsonableInterface, JsonSerializable { +class Collection implements ArrayAccess, ArrayableInterface, Countable, IteratorAggregate, JsonableInterface { /** * The items contained in the collection. @@ -353,18 +352,18 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator return array_reduce($this->items, $callback, $initial); } - /** - * Get one or more items randomly from the collection. - * - * @param int $amount - * @return mixed - */ - public function random($amount = 1) - { - $keys = array_rand($this->items, $amount); + /** + * Get one or more items randomly from the collection. + * + * @param int $amount + * @return mixed + */ + public function random($amount = 1) + { + $keys = array_rand($this->items, $amount); - return is_array($keys) ? array_intersect_key($this->items, array_flip($keys)) : $this->items[$keys]; - } + return is_array($keys) ? array_intersect_key($this->items, array_flip($keys)) : $this->items[$keys]; + } /** * Reverse items order. @@ -377,18 +376,6 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator } /** - * Search the collection for a given value and return the corresponding key if successful. - * - * @param mixed $value - * @param bool $strict - * @return mixed - */ - public function search($value, $strict = false) - { - return array_search($value, $this->items, $strict); - } - - /** * Get and remove the first item from the collection. * * @return mixed|null @@ -605,16 +592,6 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator } /** - * Convert the object into something JSON serializable. - * - * @return array - */ - public function jsonSerialize() - { - return $this->toArray(); - } - - /** * Get the collection of items as JSON. * * @param int $options @@ -723,7 +700,7 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator * @param \Illuminate\Support\Collection|\Illuminate\Support\Contracts\ArrayableInterface|array $items * @return array */ - protected function getArrayableItems($items) + private function getArrayableItems($items) { if ($items instanceof Collection) { diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Paginator.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Paginator.php index 5c099e0..5c2f1d3 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Paginator.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Paginator.php @@ -1,7 +1,7 @@ currentRouteNamed($name); + } + + /** + * Determine if the current route uses a given controller action. + * + * @param string $action + * @return bool + */ + public static function uses($action) + { + return static::$app['router']->currentRouteUses($action); + } + + /** * Get the registered name of the component. * * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php index 7489155..3b350de 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php @@ -1,7 +1,7 @@ toArray(); - } - - /** * Convert the Fluent instance to JSON. * * @param int $options diff --git a/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php b/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php index 4be98a8..fcf7531 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php +++ b/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php @@ -1,12 +1,11 @@ toArray(); - } - - /** * Convert the object to its JSON representation. * * @param int $options diff --git a/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php b/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php index e9edb4b..81a3073 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php @@ -12,7 +12,6 @@ class Pluralizer { '/^(ox)$/i' => "$1en", '/([m|l])ouse$/i' => "$1ice", '/(matr|vert|ind)ix|ex$/i' => "$1ices", - '/(stoma|epo|monar|matriar|patriar|oligar|eunu)ch$/i' => "$1chs", '/(x|ch|ss|sh)$/i' => "$1es", '/([^aeiouy]|qu)y$/i' => "$1ies", '/(hive)$/i' => "$1s", @@ -20,10 +19,10 @@ class Pluralizer { '/(shea|lea|loa|thie)f$/i' => "$1ves", '/sis$/i' => "ses", '/([ti])um$/i' => "$1a", - '/(torped|embarg|tomat|potat|ech|her|vet)o$/i' => "$1oes", + '/(tomat|potat|ech|her|vet)o$/i' => "$1oes", '/(bu)s$/i' => "$1ses", '/(alias)$/i' => "$1es", - '/(fung)us$/i' => "$1i", + '/(octop)us$/i' => "$1i", '/(ax|test)is$/i' => "$1es", '/(us)$/i' => "$1es", '/s$/i' => "s", @@ -38,10 +37,10 @@ class Pluralizer { public static $singular = array( '/(quiz)zes$/i' => "$1", '/(matr)ices$/i' => "$1ix", - '/(vert|vort|ind)ices$/i' => "$1ex", + '/(vert|ind)ices$/i' => "$1ex", '/^(ox)en$/i' => "$1", '/(alias)es$/i' => "$1", - '/(octop|vir|fung)i$/i' => "$1us", + '/(octop|vir)i$/i' => "$1us", '/(cris|ax|test)es$/i' => "$1is", '/(shoe)s$/i' => "$1", '/(o)es$/i' => "$1", @@ -62,7 +61,6 @@ class Pluralizer { '/(n)ews$/i' => "$1ews", '/(h|bl)ouses$/i' => "$1ouse", '/(corpse)s$/i' => "$1", - '/(gallows|headquarters)$/i' => "$1", '/(us)es$/i' => "$1", '/(us|ss)$/i' => "$1", '/s$/i' => "", @@ -75,27 +73,15 @@ class Pluralizer { */ public static $irregular = array( 'child' => 'children', - 'corpus' => 'corpora', - 'criterion' => 'criteria', 'foot' => 'feet', 'freshman' => 'freshmen', 'goose' => 'geese', - 'genus' => 'genera', 'human' => 'humans', 'man' => 'men', 'move' => 'moves', - 'nucleus' => 'nuclei', - 'ovum' => 'ova', 'person' => 'people', - 'phenomenon' => 'phenomena', - 'radius' => 'radii', 'sex' => 'sexes', - 'stimulus' => 'stimuli', - 'syllabus' => 'syllabi', - 'tax' => 'taxes', - 'tech' => 'techs', 'tooth' => 'teeth', - 'viscus' => 'viscera', ); /** @@ -105,26 +91,21 @@ class Pluralizer { */ public static $uncountable = array( 'audio', - 'bison', - 'chassis', - 'coreopsis', - 'data', - 'deer', 'equipment', + 'deer', 'fish', 'gold', 'information', 'money', - 'moose', - 'offspring', - 'plankton', - 'police', 'rice', + 'police', 'series', 'sheep', 'species', - 'swine', + 'moose', + 'chassis', 'traffic', + 'coreopsis', ); /** diff --git a/vendor/laravel/framework/src/Illuminate/Support/Str.php b/vendor/laravel/framework/src/Illuminate/Support/Str.php index 714a1ae..ba8e669 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Str.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Str.php @@ -1,10 +1,13 @@ =5.4.0" + "php": ">=5.3.0" }, "require-dev": { - "jeremeamia/superclosure": "~1.0", - "patchwork/utf8": "1.1.*" + "jeremeamia/superclosure": "1.0.*", + "patchwork/utf8": "1.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -25,7 +27,7 @@ "target-dir": "Illuminate/Support", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Support/helpers.php b/vendor/laravel/framework/src/Illuminate/Support/helpers.php index 426d89d..ede5d6c 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/helpers.php +++ b/vendor/laravel/framework/src/Illuminate/Support/helpers.php @@ -77,7 +77,7 @@ if ( ! function_exists('append_config')) if ( ! function_exists('array_add')) { /** - * Add an element to an array using "dot" notation if it doesn't exist. + * Add an element to an array if it doesn't exist. * * @param array $array * @param string $key @@ -86,10 +86,7 @@ if ( ! function_exists('array_add')) */ function array_add($array, $key, $value) { - if (is_null(array_get($array, $key))) - { - array_set($array, $key, $value); - } + if ( ! isset($array[$key])) $array[$key] = $value; return $array; } diff --git a/vendor/laravel/framework/src/Illuminate/Translation/composer.json b/vendor/laravel/framework/src/Illuminate/Translation/composer.json index 956de2c..3919022 100755 --- a/vendor/laravel/framework/src/Illuminate/Translation/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Translation/composer.json @@ -8,10 +8,14 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/filesystem": "4.2.*", - "illuminate/support": "4.2.*", - "symfony/translation": "2.5.*" + "php": ">=5.3.0", + "illuminate/filesystem": "4.1.*", + "illuminate/support": "4.1.*", + "symfony/translation": "2.4.*" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -21,7 +25,7 @@ "target-dir": "Illuminate/Translation", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Validator.php b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php index b0562f1..58abec7 100755 --- a/vendor/laravel/framework/src/Illuminate/Validation/Validator.php +++ b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php @@ -83,13 +83,6 @@ class Validator implements MessageProviderInterface { protected $customAttributes = array(); /** - * The array of custom displayabled values. - * - * @var array - */ - protected $customValues = array(); - - /** * All of the custom validator extensions. * * @var array @@ -209,33 +202,6 @@ class Validator implements MessageProviderInterface { } /** - * Define a set of rules that apply to each element in an array attribute. - * - * @param string $attribute - * @param string|array $rules - * @return void - */ - public function each($attribute, $rules) - { - $data = array_get($this->data, $attribute); - - if ( ! is_array($data)) - { - if ($this->hasRule($attribute, 'Array')) return; - - throw new \InvalidArgumentException('Attribute for each() must be an array.'); - } - - foreach ($data as $dataKey => $dataValue) - { - foreach ($rules as $ruleValue) - { - $this->mergeRules("$attribute.$dataKey", $ruleValue); - } - } - } - - /** * Merge additional rules into a given attribute. * * @param string $attribute @@ -244,7 +210,7 @@ class Validator implements MessageProviderInterface { */ public function mergeRules($attribute, $rules) { - $current = isset($this->rules[$attribute]) ? $this->rules[$attribute] : []; + $current = array_get($this->rules, $attribute, array()); $merge = head($this->explodeRules(array($rules))); @@ -447,10 +413,6 @@ class Validator implements MessageProviderInterface { { return false; } - elseif (is_array($value) && count($value) < 1) - { - return false; - } elseif ($value instanceof File) { return (string) $value->getPath() != ''; @@ -600,11 +562,7 @@ class Validator implements MessageProviderInterface { { $this->requireParameterCount(2, $parameters, 'required_if'); - $data = array_get($this->data, $parameters[0]); - - $values = array_slice($parameters, 1); - - if (in_array($data, $values)) + if ($parameters[1] == array_get($this->data, $parameters[0])) { return $this->validateRequired($attribute, $value); } @@ -1154,7 +1112,7 @@ class Validator implements MessageProviderInterface { */ protected function validateAlpha($attribute, $value) { - return preg_match('/^[\pL\pM]+$/u', $value); + return preg_match('/^\pL+$/u', $value); } /** @@ -1166,7 +1124,7 @@ class Validator implements MessageProviderInterface { */ protected function validateAlphaNum($attribute, $value) { - return preg_match('/^[\pL\pM\pN]+$/u', $value); + return preg_match('/^[\pL\pN]+$/u', $value); } /** @@ -1178,7 +1136,7 @@ class Validator implements MessageProviderInterface { */ protected function validateAlphaDash($attribute, $value) { - return preg_match('/^[\pL\pM\pN_-]+$/u', $value); + return preg_match('/^[\pL\pN_-]+$/u', $value); } /** @@ -1243,11 +1201,6 @@ class Validator implements MessageProviderInterface { { $this->requireParameterCount(1, $parameters, 'before'); - if ($format = $this->getDateFormat($attribute)) - { - return $this->validateBeforeWithFormat($format, $value, $parameters); - } - if ( ! ($date = strtotime($parameters[0]))) { return strtotime($value) < strtotime($this->getValue($parameters[0])); @@ -1259,20 +1212,6 @@ class Validator implements MessageProviderInterface { } /** - * Validate the date is before a given date with a given format. - * - * @param string $format - * @param mixed $value - * @param array $parameters - * @return bool - */ - protected function validateBeforeWithFormat($format, $value, $parameters) - { - return DateTime::createFromFormat($format, $value) < - DateTime::createFromFormat($format, $parameters[0]); - } - - /** * Validate the date is after a given date. * * @param string $attribute @@ -1284,11 +1223,6 @@ class Validator implements MessageProviderInterface { { $this->requireParameterCount(1, $parameters, 'after'); - if ($format = $this->getDateFormat($attribute)) - { - return $this->validateAfterWithFormat($format, $value, $parameters); - } - if ( ! ($date = strtotime($parameters[0]))) { return strtotime($value) > strtotime($this->getValue($parameters[0])); @@ -1300,34 +1234,6 @@ class Validator implements MessageProviderInterface { } /** - * Validate the date is after a given date with a given format. - * - * @param string $format - * @param mixed $value - * @param array $parameters - * @return bool - */ - protected function validateAfterWithFormat($format, $value, $parameters) - { - return DateTime::createFromFormat($format, $value) > - DateTime::createFromFormat($format, $parameters[0]); - } - - /** - * Get the date format for an attribute if it has one. - * - * @param string $attribute - * @return string|null - */ - protected function getDateFormat($attribute) - { - if ($result = $this->getRule($attribute, 'DateFormat')) - { - return $result[1][0]; - } - } - - /** * Get the validation message for an attribute and rule. * * @param string $attribute @@ -1536,32 +1442,6 @@ class Validator implements MessageProviderInterface { } /** - * Get the displayable name of the value. - * - * @param string $attribute - * @param mixed $value - * @return string - */ - public function getDisplayableValue($attribute, $value) - { - if (isset($this->customValues[$attribute][$value])) - { - return $this->customValues[$attribute][$value]; - } - - $key = "validation.values.{$attribute}.{$value}"; - - if (($line = $this->translator->trans($key)) !== $key) - { - return $line; - } - else - { - return $value; - } - } - - /** * Replace all place-holders for the between rule. * * @param string $message @@ -1656,11 +1536,6 @@ class Validator implements MessageProviderInterface { */ protected function replaceIn($message, $attribute, $rule, $parameters) { - foreach ($parameters as &$parameter) - { - $parameter = $this->getDisplayableValue($attribute, $parameter); - } - return str_replace(':values', implode(', ', $parameters), $message); } @@ -1675,11 +1550,6 @@ class Validator implements MessageProviderInterface { */ protected function replaceNotIn($message, $attribute, $rule, $parameters) { - foreach ($parameters as &$parameter) - { - $parameter = $this->getDisplayableValue($attribute, $parameter); - } - return str_replace(':values', implode(', ', $parameters), $message); } @@ -1756,8 +1626,6 @@ class Validator implements MessageProviderInterface { */ protected function replaceRequiredIf($message, $attribute, $rule, $parameters) { - $parameters[1] = $this->getDisplayableValue($parameters[0], $parameters[1]); - $parameters[0] = $this->getAttribute($parameters[0]); return str_replace(array(':other', ':value'), $parameters, $message); @@ -1851,36 +1719,24 @@ class Validator implements MessageProviderInterface { * Determine if the given attribute has a rule in the given set. * * @param string $attribute - * @param string|array $rules + * @param array $rules * @return bool */ protected function hasRule($attribute, $rules) { - return ! is_null($this->getRule($attribute, $rules)); - } - - /** - * Get a rule and its parameters for a given attribute. - * - * @param string $attribute - * @param string|array $rules - * @return array|null - */ - protected function getRule($attribute, $rules) - { $rules = (array) $rules; - if ( ! array_key_exists($attribute, $this->rules)) - { - return; - } - + // To determine if the attribute has a rule in the ruleset, we will spin + // through each of the rules assigned to the attribute and parse them + // all, then check to see if the parsed rules exists in the arrays. foreach ($this->rules[$attribute] as $rule) { list($rule, $parameters) = $this->parseRule($rule); - if (in_array($rule, $rules)) return [$rule, $parameters]; + if (in_array($rule, $rules)) return true; } + + return false; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Validation/composer.json b/vendor/laravel/framework/src/Illuminate/Validation/composer.json index 755a7f7..c0ca2d6 100755 --- a/vendor/laravel/framework/src/Illuminate/Validation/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Validation/composer.json @@ -8,14 +8,16 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/container": "4.2.*", - "illuminate/support": "4.2.*", - "symfony/http-foundation": "2.5.*", - "symfony/translation": "2.5.*" + "php": ">=5.3.0", + "illuminate/container": "4.1.*", + "illuminate/support": "4.1.*", + "symfony/http-foundation": "2.4.*", + "symfony/translation": "2.4.*" }, "require-dev": { - "illuminate/database": "4.2.*" + "illuminate/database": "4.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -25,7 +27,7 @@ "target-dir": "Illuminate/Validation", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php index be50074..86b12ef 100644 --- a/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php @@ -19,25 +19,44 @@ class BladeCompiler extends Compiler implements CompilerInterface { protected $path; /** - * Array of opening and closing tags for escaped echos. + * All of the available compiler functions. * * @var array */ - protected $contentTags = array('{{', '}}'); - - /** - * Array of opening and closing tags for escaped echos. + protected $compilers = array( + 'Extensions', + 'Extends', + 'Comments', + 'Echos', + 'Openings', + 'Closings', + 'Else', + 'Unless', + 'EndUnless', + 'Includes', + 'Each', + 'Yields', + 'Shows', + 'Language', + 'SectionStart', + 'SectionStop', + 'SectionAppend', + 'SectionOverwrite', + ); + + /** + * Array of opening and closing tags for echos. * * @var array */ - protected $escapedTags = array('{{{', '}}}'); + protected $contentTags = array('{{', '}}'); /** - * Array of footer lines to be added to template. + * Array of opening and closing tags for escaped echos. * * @var array */ - protected $footer = array(); + protected $escapedTags = array('{{{', '}}}'); /** * Compile the view at the given path. @@ -47,14 +66,12 @@ class BladeCompiler extends Compiler implements CompilerInterface { */ public function compile($path = null) { - $this->footer = array(); - if ($path) { $this->setPath($path); } - $contents = $this->compileString($this->files->get($path)); + $contents = $this->compileString($this->files->get($this->getPath())); if ( ! is_null($this->cachePath)) { @@ -91,47 +108,23 @@ class BladeCompiler extends Compiler implements CompilerInterface { */ public function compileString($value) { - $result = ''; - - // Here we will loop through all of the tokens returned by the Zend lexer and - // parse each one into the corresponding valid PHP. We will then have this - // template as the correctly rendered PHP that can be rendered natively. - foreach (token_get_all($value) as $token) + foreach ($this->compilers as $compiler) { - $result .= is_array($token) ? $this->parseToken($token) : $token; + $value = $this->{"compile{$compiler}"}($value); } - // If there are any footer lines that need to get added to a template we will - // add them here at the end of the template. This gets used mainly for the - // template inheritance via the extends keyword that should be appended. - if (count($this->footer) > 0) - { - $result = ltrim($result, PHP_EOL) - .PHP_EOL.implode(PHP_EOL, array_reverse($this->footer)); - } - - return $result; + return $value; } /** - * Parse the tokens from the template. + * Register a custom Blade compiler. * - * @param array $token - * @return string + * @param Closure $compiler + * @return void */ - protected function parseToken($token) + public function extend(Closure $compiler) { - list($id, $content) = $token; - - if ($id == T_INLINE_HTML) - { - foreach (['Extensions', 'Statements', 'Comments', 'Echos'] as $type) - { - $content = $this->{"compile{$type}"}($content); - } - } - - return $content; + $this->extensions[] = $compiler; } /** @@ -151,6 +144,47 @@ class BladeCompiler extends Compiler implements CompilerInterface { } /** + * Compile Blade template extensions into valid PHP. + * + * @param string $value + * @return string + */ + protected function compileExtends($value) + { + // By convention, Blade views using template inheritance must begin with the + // @extends expression, otherwise they will not be compiled with template + // inheritance. So, if they do not start with that we will just return. + if (strpos($value, '@extends') !== 0) + { + return $value; + } + + $lines = preg_split("/(\r?\n)/", $value); + + // Next, we just want to split the values by lines, and create an expression + // to include the parent layout at the end of the templates. Which allows + // the sections to get registered before the parent view gets rendered. + $lines = $this->compileLayoutExtends($lines); + + return implode("\r\n", array_slice($lines, 1)); + } + + /** + * Compile the proper template inheritance for the lines. + * + * @param array $lines + * @return array + */ + protected function compileLayoutExtends($lines) + { + $pattern = $this->createMatcher('extends'); + + $lines[] = preg_replace($pattern, '$1@include$2', $lines[0]); + + return $lines; + } + + /** * Compile Blade comments into valid PHP. * * @param string $value @@ -182,28 +216,6 @@ class BladeCompiler extends Compiler implements CompilerInterface { } /** - * Compile Blade Statements that start with "@" - * - * @param string $value - * - * @return mixed - */ - protected function compileStatements($value) - { - $callback = function($match) - { - if (method_exists($this, $method = 'compile'.ucfirst($match[1]))) - { - $match[0] = $this->$method(array_get($match, 3)); - } - - return isset($match[3]) ? $match[0] : $match[0].$match[2]; - }; - - return preg_replace_callback('/\B@(\w+)([ \t]*)(\( ( (?>[^()]+) | (?3) )* \))?/x', $callback, $value); - } - - /** * Compile the "regular" echo statements. * * @param string $value @@ -211,11 +223,13 @@ class BladeCompiler extends Compiler implements CompilerInterface { */ protected function compileRegularEchos($value) { + $me = $this; + $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s/s', $this->contentTags[0], $this->contentTags[1]); - $callback = function($matches) + $callback = function($matches) use ($me) { - return $matches[1] ? substr($matches[0], 1) : 'compileEchoDefaults($matches[2]).'; ?>'; + return $matches[1] ? substr($matches[0], 1) : 'compileEchoDefaults($matches[2]).'; ?>'; }; return preg_replace_callback($pattern, $callback, $value); @@ -229,11 +243,13 @@ class BladeCompiler extends Compiler implements CompilerInterface { */ protected function compileEscapedEchos($value) { + $me = $this; + $pattern = sprintf('/%s\s*(.+?)\s*%s/s', $this->escapedTags[0], $this->escapedTags[1]); - $callback = function($matches) + $callback = function($matches) use ($me) { - return 'compileEchoDefaults($matches[1]).'); ?>'; + return 'compileEchoDefaults($matches[1]).'); ?>'; }; return preg_replace_callback($pattern, $callback, $value); @@ -251,325 +267,195 @@ class BladeCompiler extends Compiler implements CompilerInterface { } /** - * Compile the each statements into valid PHP. + * Compile Blade structure openings into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileEach($expression) + protected function compileOpenings($value) { - return "renderEach{$expression}; ?>"; - } + $pattern = '/(?(R)\((?:[^\(\)]|(?R))*\)|(?yieldContent{$expression}; ?>"; + return preg_replace($pattern, '$1', $value); } /** - * Compile the show statements into valid PHP. + * Compile Blade structure closings into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileShow($expression) + protected function compileClosings($value) { - return "yieldSection(); ?>"; - } + $pattern = '/(\s*)@(endif|endforeach|endfor|endwhile)(\s*)/'; - /** - * Compile the section statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileSection($expression) - { - return "startSection{$expression}; ?>"; + return preg_replace($pattern, '$1$3', $value); } /** - * Compile the append statements into valid PHP. + * Compile Blade else statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileAppend($expression) + protected function compileElse($value) { - return "appendSection(); ?>"; - } + $pattern = $this->createPlainMatcher('else'); - /** - * Compile the end-section statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileEndsection($expression) - { - return "stopSection(); ?>"; + return preg_replace($pattern, '$1$2', $value); } /** - * Compile the stop statements into valid PHP. + * Compile Blade unless statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileStop($expression) + protected function compileUnless($value) { - return "stopSection(); ?>"; - } + $pattern = $this->createMatcher('unless'); - /** - * Compile the overwrite statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileOverwrite($expression) - { - return "stopSection(true); ?>"; + return preg_replace($pattern, '$1', $value); } /** - * Compile the unless statements into valid PHP. + * Compile Blade end unless statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileUnless($expression) + protected function compileEndUnless($value) { - return ""; - } + $pattern = $this->createPlainMatcher('endunless'); - /** - * Compile the end unless statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileEndunless($expression) - { - return ""; + return preg_replace($pattern, '$1$2', $value); } /** - * Compile the lang statements into valid PHP. + * Compile Blade include statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileLang($expression) + protected function compileIncludes($value) { - return ""; - } + $pattern = $this->createOpenMatcher('include'); - /** - * Compile the choice statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileChoice($expression) - { - return ""; - } + $replace = '$1make$2, array_except(get_defined_vars(), array(\'__data\', \'__path\')))->render(); ?>'; - /** - * Compile the else statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileElse($expression) - { - return ""; + return preg_replace($pattern, $replace, $value); } /** - * Compile the for statements into valid PHP. + * Compile Blade each statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileFor($expression) + protected function compileEach($value) { - return ""; - } + $pattern = $this->createMatcher('each'); - /** - * Compile the foreach statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileForeach($expression) - { - return ""; + return preg_replace($pattern, '$1renderEach$2; ?>', $value); } /** - * Compile the if statements into valid PHP. + * Compile Blade yield statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileIf($expression) + protected function compileYields($value) { - return ""; - } + $pattern = $this->createMatcher('yield'); - /** - * Compile the else-if statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileElseif($expression) - { - return ""; + return preg_replace($pattern, '$1yieldContent$2; ?>', $value); } /** - * Compile the while statements into valid PHP. + * Compile Blade show statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileWhile($expression) + protected function compileShows($value) { - return ""; - } + $pattern = $this->createPlainMatcher('show'); - /** - * Compile the end-while statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileEndwhile($expression) - { - return ""; + return preg_replace($pattern, '$1yieldSection(); ?>$2', $value); } /** - * Compile the end-for statements into valid PHP. + * Compile Blade language and language choice statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileEndfor($expression) + protected function compileLanguage($value) { - return ""; - } + $pattern = $this->createMatcher('lang'); - /** - * Compile the end-for-each statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileEndforeach($expression) - { - return ""; - } + $value = preg_replace($pattern, '$1', $value); - /** - * Compile the end-if statements into valid PHP. - * - * @param string $expression - * @return string - */ - protected function compileEndif($expression) - { - return ""; + $pattern = $this->createMatcher('choice'); + + return preg_replace($pattern, '$1', $value); } /** - * Compile the extends statements into valid PHP. + * Compile Blade section start statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileExtends($expression) + protected function compileSectionStart($value) { - if (starts_with($expression, '(')) - { - $expression = substr($expression, 1, -1); - } - - $data = "make($expression, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; - - $this->footer[] = $data; + $pattern = $this->createMatcher('section'); - return ''; + return preg_replace($pattern, '$1startSection$2; ?>', $value); } /** - * Compile the include statements into valid PHP. + * Compile Blade section stop statements into valid PHP. * - * @param string $expression + * @param string $value * @return string */ - protected function compileInclude($expression) + protected function compileSectionStop($value) { - if (starts_with($expression, '(')) - { - $expression = substr($expression, 1, -1); - } + $pattern = $this->createPlainMatcher('stop'); - return "make($expression, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; - } + $value = preg_replace($pattern, '$1stopSection(); ?>$2', $value); - /** - * Compile the stack statements into the content - * - * @param string $expression - * @return string - */ - protected function compileStack($expression) - { - return "yieldContent{$expression}; ?>"; + $pattern = $this->createPlainMatcher('endsection'); + + return preg_replace($pattern, '$1stopSection(); ?>$2', $value); } /** - * Compile the push statements into valid PHP. + * Compile Blade section append statements into valid PHP. * - * @param $expression + * @param string $value * @return string */ - protected function compilePush($expression) + protected function compileSectionAppend($value) { - return "startSection{$expression}; ?>"; + $pattern = $this->createPlainMatcher('append'); + + return preg_replace($pattern, '$1appendSection(); ?>$2', $value); } /** - * Compile the endpush statements into valid PHP. + * Compile Blade section stop statements into valid PHP. * - * @param $expression + * @param string $value * @return string */ - protected function compileEndpush($expression) + protected function compileSectionOverwrite($value) { - return "appendSection(); ?>"; - } + $pattern = $this->createPlainMatcher('overwrite'); - /** - * Register a custom Blade compiler. - * - * @param Closure $compiler - * @return void - */ - public function extend(Closure $compiler) - { - $this->extensions[] = $compiler; + return preg_replace($pattern, '$1stopSection(true); ?>$2', $value); } /** diff --git a/vendor/laravel/framework/src/Illuminate/View/Environment.php b/vendor/laravel/framework/src/Illuminate/View/Environment.php new file mode 100755 index 0000000..60cf5ab --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Environment.php @@ -0,0 +1,805 @@ + 'blade', 'php' => 'php'); + + /** + * The view composer events. + * + * @var array + */ + protected $composers = array(); + + /** + * All of the finished, captured sections. + * + * @var array + */ + protected $sections = array(); + + /** + * The stack of in-progress sections. + * + * @var array + */ + protected $sectionStack = array(); + + /** + * The number of active rendering operations. + * + * @var int + */ + protected $renderCount = 0; + + /** + * Create a new view environment instance. + * + * @param \Illuminate\View\Engines\EngineResolver $engines + * @param \Illuminate\View\ViewFinderInterface $finder + * @param \Illuminate\Events\Dispatcher $events + * @return void + */ + public function __construct(EngineResolver $engines, ViewFinderInterface $finder, Dispatcher $events) + { + $this->finder = $finder; + $this->events = $events; + $this->engines = $engines; + + $this->share('__env', $this); + } + + /** + * Get the evaluated view contents for the given view. + * + * @param string $view + * @param array $data + * @param array $mergeData + * @return \Illuminate\View\View + */ + public function make($view, $data = array(), $mergeData = array()) + { + $path = $this->finder->find($view); + + $data = array_merge($mergeData, $this->parseData($data)); + + $this->callCreator($view = new View($this, $this->getEngineFromPath($path), $view, $path, $data)); + + return $view; + } + + /** + * Parse the given data into a raw array. + * + * @param mixed $data + * @return array + */ + protected function parseData($data) + { + return $data instanceof Arrayable ? $data->toArray() : $data; + } + + /** + * Get the evaluated view contents for a named view. + * + * @param string $view + * @param mixed $data + * @return \Illuminate\View\View + */ + public function of($view, $data = array()) + { + return $this->make($this->names[$view], $data); + } + + /** + * Register a named view. + * + * @param string $view + * @param string $name + * @return void + */ + public function name($view, $name) + { + $this->names[$name] = $view; + } + + /** + * Determine if a given view exists. + * + * @param string $view + * @return bool + */ + public function exists($view) + { + try + { + $this->finder->find($view); + } + catch (\InvalidArgumentException $e) + { + return false; + } + + return true; + } + + /** + * Get the rendered contents of a partial from a loop. + * + * @param string $view + * @param array $data + * @param string $iterator + * @param string $empty + * @return string + */ + public function renderEach($view, $data, $iterator, $empty = 'raw|') + { + $result = ''; + + // If is actually data in the array, we will loop through the data and append + // an instance of the partial view to the final result HTML passing in the + // iterated value of this data array, allowing the views to access them. + if (count($data) > 0) + { + foreach ($data as $key => $value) + { + $data = array('key' => $key, $iterator => $value); + + $result .= $this->make($view, $data)->render(); + } + } + + // If there is no data in the array, we will render the contents of the empty + // view. Alternatively, the "empty view" could be a raw string that begins + // with "raw|" for convenience and to let this know that it is a string. + else + { + if (starts_with($empty, 'raw|')) + { + $result = substr($empty, 4); + } + else + { + $result = $this->make($empty)->render(); + } + } + + return $result; + } + + /** + * Get the appropriate view engine for the given path. + * + * @param string $path + * @return \Illuminate\View\Engines\EngineInterface + */ + protected function getEngineFromPath($path) + { + $engine = $this->extensions[$this->getExtension($path)]; + + return $this->engines->resolve($engine); + } + + /** + * Get the extension used by the view file. + * + * @param string $path + * @return string + */ + protected function getExtension($path) + { + $extensions = array_keys($this->extensions); + + return array_first($extensions, function($key, $value) use ($path) + { + return ends_with($path, $value); + }); + } + + /** + * Add a piece of shared data to the environment. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function share($key, $value = null) + { + if ( ! is_array($key)) return $this->shared[$key] = $value; + + foreach ($key as $innerKey => $innerValue) + { + $this->share($innerKey, $innerValue); + } + } + + /** + * Register a view creator event. + * + * @param array|string $views + * @param \Closure|string $callback + * @return array + */ + public function creator($views, $callback) + { + $creators = array(); + + foreach ((array) $views as $view) + { + $creators[] = $this->addViewEvent($view, $callback, 'creating: '); + } + + return $creators; + } + + /** + * Register multiple view composers via an array. + * + * @param array $composers + * @return array + */ + public function composers(array $composers) + { + $registered = array(); + + foreach ($composers as $callback => $views) + { + $registered += $this->composer($views, $callback); + } + + return $registered; + } + + /** + * Register a view composer event. + * + * @param array|string $views + * @param \Closure|string $callback + * @return array + */ + public function composer($views, $callback, $priority = null) + { + $composers = array(); + + foreach ((array) $views as $view) + { + $composers[] = $this->addViewEvent($view, $callback, 'composing: ', $priority); + } + + return $composers; + } + + /** + * Add an event for a given view. + * + * @param string $view + * @param Closure|string $callback + * @param string $prefix + * @return Closure + */ + protected function addViewEvent($view, $callback, $prefix = 'composing: ', $priority = null) + { + if ($callback instanceof Closure) + { + $this->addEventListener($prefix.$view, $callback, $priority); + + return $callback; + } + elseif (is_string($callback)) + { + return $this->addClassEvent($view, $callback, $prefix, $priority); + } + } + + /** + * Register a class based view composer. + * + * @param string $view + * @param string $class + * @param string $prefix + * @return \Closure + */ + protected function addClassEvent($view, $class, $prefix, $priority = null) + { + $name = $prefix.$view; + + // When registering a class based view "composer", we will simply resolve the + // classes from the application IoC container then call the compose method + // on the instance. This allows for convenient, testable view composers. + $callback = $this->buildClassEventCallback($class, $prefix); + + $this->addEventListener($name, $callback, $priority); + + return $callback; + } + + /** + * Add a listener to the event dispatcher. + * + * @param string $name + * @param \Closure $callback + * @param integer $priority + */ + protected function addEventListener($name, $callback, $priority = null) + { + if (is_null($priority)) + { + $this->events->listen($name, $callback); + } + else + { + $this->events->listen($name, $callback, $priority); + } + } + + /** + * Build a class based container callback Closure. + * + * @param string $class + * @param string $prefix + * @return \Closure + */ + protected function buildClassEventCallback($class, $prefix) + { + $container = $this->container; + + list($class, $method) = $this->parseClassEvent($class, $prefix); + + // Once we have the class and method name, we can build the Closure to resolve + // the instance out of the IoC container and call the method on it with the + // given arguments that are passed to the Closure as the composer's data. + return function() use ($class, $method, $container) + { + $callable = array($container->make($class), $method); + + return call_user_func_array($callable, func_get_args()); + }; + } + + /** + * Parse a class based composer name. + * + * @param string $class + * @param string $prefix + * @return array + */ + protected function parseClassEvent($class, $prefix) + { + if (str_contains($class, '@')) + { + return explode('@', $class); + } + else + { + $method = str_contains($prefix, 'composing') ? 'compose' : 'create'; + + return array($class, $method); + } + } + + /** + * Call the composer for a given view. + * + * @param \Illuminate\View\View $view + * @return void + */ + public function callComposer(View $view) + { + $this->events->fire('composing: '.$view->getName(), array($view)); + } + + /** + * Call the creator for a given view. + * + * @param \Illuminate\View\View $view + * @return void + */ + public function callCreator(View $view) + { + $this->events->fire('creating: '.$view->getName(), array($view)); + } + + /** + * Start injecting content into a section. + * + * @param string $section + * @param string $content + * @return void + */ + public function startSection($section, $content = '') + { + if ($content === '') + { + ob_start() && $this->sectionStack[] = $section; + } + else + { + $this->extendSection($section, $content); + } + } + + /** + * Inject inline content into a section. + * + * @param string $section + * @param string $content + * @return void + */ + public function inject($section, $content) + { + return $this->startSection($section, $content); + } + + /** + * Stop injecting content into a section and return its contents. + * + * @return string + */ + public function yieldSection() + { + return $this->yieldContent($this->stopSection()); + } + + /** + * Stop injecting content into a section. + * + * @param bool $overwrite + * @return string + */ + public function stopSection($overwrite = false) + { + $last = array_pop($this->sectionStack); + + if ($overwrite) + { + $this->sections[$last] = ob_get_clean(); + } + else + { + $this->extendSection($last, ob_get_clean()); + } + + return $last; + } + + /** + * Stop injecting content into a section and append it. + * + * @return string + */ + public function appendSection() + { + $last = array_pop($this->sectionStack); + + if (isset($this->sections[$last])) + { + $this->sections[$last] .= ob_get_clean(); + } + else + { + $this->sections[$last] = ob_get_clean(); + } + + return $last; + } + + /** + * Append content to a given section. + * + * @param string $section + * @param string $content + * @return void + */ + protected function extendSection($section, $content) + { + if (isset($this->sections[$section])) + { + $content = str_replace('@parent', $content, $this->sections[$section]); + + $this->sections[$section] = $content; + } + else + { + $this->sections[$section] = $content; + } + } + + /** + * Get the string contents of a section. + * + * @param string $section + * @param string $default + * @return string + */ + public function yieldContent($section, $default = '') + { + return isset($this->sections[$section]) ? $this->sections[$section] : $default; + } + + /** + * Flush all of the section contents. + * + * @return void + */ + public function flushSections() + { + $this->sections = array(); + + $this->sectionStack = array(); + } + + /** + * Flush all of the section contents if done rendering. + * + * @return void + */ + public function flushSectionsIfDoneRendering() + { + if ($this->doneRendering()) $this->flushSections(); + } + + /** + * Increment the rendering counter. + * + * @return void + */ + public function incrementRender() + { + $this->renderCount++; + } + + /** + * Decrement the rendering counter. + * + * @return void + */ + public function decrementRender() + { + $this->renderCount--; + } + + /** + * Check if there are no active render operations. + * + * @return bool + */ + public function doneRendering() + { + return $this->renderCount == 0; + } + + /** + * Add a location to the array of view locations. + * + * @param string $location + * @return void + */ + public function addLocation($location) + { + $this->finder->addLocation($location); + } + + /** + * Add a new namespace to the loader. + * + * @param string $namespace + * @param string|array $hints + * @return void + */ + public function addNamespace($namespace, $hints) + { + $this->finder->addNamespace($namespace, $hints); + } + + /** + * Prepend a new namespace to the loader. + * + * @param string $namespace + * @param string|array $hints + * @return void + */ + public function prependNamespace($namespace, $hints) + { + $this->finder->prependNamespace($namespace, $hints); + } + + /** + * Register a valid view extension and its engine. + * + * @param string $extension + * @param string $engine + * @param Closure $resolver + * @return void + */ + public function addExtension($extension, $engine, $resolver = null) + { + $this->finder->addExtension($extension); + + if (isset($resolver)) + { + $this->engines->register($engine, $resolver); + } + + unset($this->extensions[$extension]); + + $this->extensions = array_merge(array($extension => $engine), $this->extensions); + } + + /** + * Get the extension to engine bindings. + * + * @return array + */ + public function getExtensions() + { + return $this->extensions; + } + + /** + * Get the engine resolver instance. + * + * @return \Illuminate\View\Engines\EngineResolver + */ + public function getEngineResolver() + { + return $this->engines; + } + + /** + * Get the view finder instance. + * + * @return \Illuminate\View\ViewFinderInterface + */ + public function getFinder() + { + return $this->finder; + } + + /** + * Set the view finder instance. + * + * @return void + */ + public function setFinder(ViewFinderInterface $finder) + { + $this->finder = $finder; + } + + /** + * Get the event dispatcher instance. + * + * @return \Illuminate\Events\Dispatcher + */ + public function getDispatcher() + { + return $this->events; + } + + /** + * Set the event dispatcher instance. + * + * @param \Illuminate\Events\Dispatcher + * @return void + */ + public function setDispatcher(Dispatcher $events) + { + $this->events = $events; + } + + /** + * Get the IoC container instance. + * + * @return \Illuminate\Container\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } + + /** + * Get an item from the shared data. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function shared($key, $default = null) + { + return array_get($this->shared, $key, $default); + } + + /** + * Get all of the shared data for the environment. + * + * @return array + */ + public function getShared() + { + return $this->shared; + } + + /** + * Get the entire array of sections. + * + * @return array + */ + public function getSections() + { + return $this->sections; + } + + /** + * Get all of the registered named views in environment. + * + * @return array + */ + public function getNames() + { + return $this->names; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php b/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php index 723ad9a..308edc4 100755 --- a/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php +++ b/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php @@ -40,13 +40,6 @@ class FileViewFinder implements ViewFinderInterface { protected $extensions = array('blade.php', 'php'); /** - * Hint path delimiter value. - * - * @var string - */ - const HINT_PATH_DELIMITER = '::'; - - /** * Create a new file view loader instance. * * @param \Illuminate\Filesystem\Filesystem $files @@ -75,7 +68,7 @@ class FileViewFinder implements ViewFinderInterface { { if (isset($this->views[$name])) return $this->views[$name]; - if ($this->hasHintInformation($name = trim($name))) + if (strpos($name, '::') !== false) { return $this->views[$name] = $this->findNamedPathView($name); } @@ -106,7 +99,7 @@ class FileViewFinder implements ViewFinderInterface { */ protected function getNamespaceSegments($name) { - $segments = explode(static::HINT_PATH_DELIMITER, $name); + $segments = explode('::', $name); if (count($segments) != 2) { @@ -227,17 +220,6 @@ class FileViewFinder implements ViewFinderInterface { } /** - * Returns whether or not the view specify a hint information - * - * @param string $name - * @return boolean - */ - public function hasHintInformation($name) - { - return strpos($name, static::HINT_PATH_DELIMITER) > 0; - } - - /** * Get the filesystem instance. * * @return \Illuminate\Filesystem\Filesystem diff --git a/vendor/laravel/framework/src/Illuminate/View/View.php b/vendor/laravel/framework/src/Illuminate/View/View.php index 12867f5..4c31060 100755 --- a/vendor/laravel/framework/src/Illuminate/View/View.php +++ b/vendor/laravel/framework/src/Illuminate/View/View.php @@ -11,11 +11,11 @@ use Illuminate\Support\Contracts\RenderableInterface as Renderable; class View implements ArrayAccess, Renderable { /** - * The view factory instance. + * The view environment instance. * - * @var \Illuminate\View\Factory + * @var \Illuminate\View\Environment */ - protected $factory; + protected $environment; /** * The engine implementation. @@ -48,19 +48,19 @@ class View implements ArrayAccess, Renderable { /** * Create a new view instance. * - * @param \Illuminate\View\Factory $factory + * @param \Illuminate\View\Environment $environment * @param \Illuminate\View\Engines\EngineInterface $engine * @param string $view * @param string $path * @param array $data * @return void */ - public function __construct(Factory $factory, EngineInterface $engine, $view, $path, $data = array()) + public function __construct(Environment $environment, EngineInterface $engine, $view, $path, $data = array()) { $this->view = $view; $this->path = $path; $this->engine = $engine; - $this->factory = $factory; + $this->environment = $environment; $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data; } @@ -79,8 +79,8 @@ class View implements ArrayAccess, Renderable { // Once we have the contents of the view, we will flush the sections if we are // done rendering all views so that there is nothing left hanging over when - // anothoer view is rendered in the future by the application developers. - $this->factory->flushSectionsIfDoneRendering(); + // another view is rendered in the future via the application developers. + $this->environment->flushSectionsIfDoneRendering(); return $response ?: $contents; } @@ -95,16 +95,16 @@ class View implements ArrayAccess, Renderable { // We will keep track of the amount of views being rendered so we can flush // the section after the complete rendering operation is done. This will // clear out the sections for any separate views that may be rendered. - $this->factory->incrementRender(); + $this->environment->incrementRender(); - $this->factory->callComposer($this); + $this->environment->callComposer($this); $contents = $this->getContents(); // Once we've finished rendering the view, we'll decrement the render count // so that each sections get flushed out next time a view is created and // no old sections are staying around in the memory of an environment. - $this->factory->decrementRender(); + $this->environment->decrementRender(); return $contents; } @@ -116,7 +116,7 @@ class View implements ArrayAccess, Renderable { */ public function renderSections() { - $env = $this->factory; + $env = $this->environment; return $this->render(function($view) use ($env) { @@ -141,7 +141,7 @@ class View implements ArrayAccess, Renderable { */ protected function gatherData() { - $data = array_merge($this->factory->getShared(), $this->data); + $data = array_merge($this->environment->getShared(), $this->data); foreach ($data as $key => $value) { @@ -185,7 +185,7 @@ class View implements ArrayAccess, Renderable { */ public function nest($key, $view, array $data = array()) { - return $this->with($key, $this->factory->make($view, $data)); + return $this->with($key, $this->environment->make($view, $data)); } /** @@ -209,13 +209,13 @@ class View implements ArrayAccess, Renderable { } /** - * Get the view factory instance. + * Get the view environment instance. * - * @return \Illuminate\View\Factory + * @return \Illuminate\View\Environment */ - public function getFactory() + public function getEnvironment() { - return $this->factory; + return $this->environment; } /** diff --git a/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php b/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php index 770a974..a302969 100755 --- a/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php @@ -1,6 +1,6 @@ registerFactory(); + $this->registerEnvironment(); $this->registerSessionBinder(); } @@ -35,7 +35,9 @@ class ViewServiceProvider extends ServiceProvider { */ public function registerEngineResolver() { - $this->app->bindShared('view.engine.resolver', function($app) + $me = $this; + + $this->app->bindShared('view.engine.resolver', function($app) use ($me) { $resolver = new EngineResolver; @@ -44,7 +46,7 @@ class ViewServiceProvider extends ServiceProvider { // on the extension of view files. We call a method for each engines. foreach (array('php', 'blade') as $engine) { - $this->{'register'.ucfirst($engine).'Engine'}($resolver); + $me->{'register'.ucfirst($engine).'Engine'}($resolver); } return $resolver; @@ -108,7 +110,7 @@ class ViewServiceProvider extends ServiceProvider { * * @return void */ - public function registerFactory() + public function registerEnvironment() { $this->app->bindShared('view', function($app) { @@ -119,7 +121,7 @@ class ViewServiceProvider extends ServiceProvider { $finder = $app['view.finder']; - $env = new Factory($resolver, $finder, $app['events']); + $env = new Environment($resolver, $finder, $app['events']); // We will also set the container instance on this view environment since the // view composers may be classes registered in the container, which allows @@ -158,7 +160,7 @@ class ViewServiceProvider extends ServiceProvider { // they don't have to continually run checks for the presence of errors. else { - $app['view']->share('errors', new ViewErrorBag); + $app['view']->share('errors', new MessageBag); } }); } diff --git a/vendor/laravel/framework/src/Illuminate/View/composer.json b/vendor/laravel/framework/src/Illuminate/View/composer.json index 8b6b535..da44ce9 100755 --- a/vendor/laravel/framework/src/Illuminate/View/composer.json +++ b/vendor/laravel/framework/src/Illuminate/View/composer.json @@ -8,11 +8,15 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/container": "4.2.*", - "illuminate/events": "4.2.*", - "illuminate/filesystem": "4.2.*", - "illuminate/support": "4.2.*" + "php": ">=5.3.0", + "illuminate/container": "4.1.*", + "illuminate/events": "4.1.*", + "illuminate/filesystem": "4.1.*", + "illuminate/support": "4.1.*" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -22,7 +26,7 @@ "target-dir": "Illuminate/View", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Workbench/composer.json b/vendor/laravel/framework/src/Illuminate/Workbench/composer.json index 7e3abdb..3ea4002 100755 --- a/vendor/laravel/framework/src/Illuminate/Workbench/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Workbench/composer.json @@ -8,13 +8,15 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/filesystem": "4.2.*", - "illuminate/support": "4.2.*", - "symfony/finder": "2.5.*" + "php": ">=5.3.0", + "illuminate/filesystem": "4.1.*", + "illuminate/support": "4.1.*", + "symfony/finder": "2.4.*" }, "require-dev": { - "illuminate/console": "4.2.*" + "illuminate/console": "4.1.*", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": { @@ -24,7 +26,7 @@ "target-dir": "Illuminate/Workbench", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Workbench/stubs/composer.json b/vendor/laravel/framework/src/Illuminate/Workbench/stubs/composer.json index 5133cd8..6802339 100755 --- a/vendor/laravel/framework/src/Illuminate/Workbench/stubs/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Workbench/stubs/composer.json @@ -8,8 +8,8 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/support": "4.2.*" + "php": ">=5.3.0", + "illuminate/support": "4.1.*" }, "autoload": { "classmap": [ diff --git a/vendor/laravel/framework/src/Illuminate/Workbench/stubs/plain.composer.json b/vendor/laravel/framework/src/Illuminate/Workbench/stubs/plain.composer.json index a2cd6bb..42698d3 100755 --- a/vendor/laravel/framework/src/Illuminate/Workbench/stubs/plain.composer.json +++ b/vendor/laravel/framework/src/Illuminate/Workbench/stubs/plain.composer.json @@ -8,8 +8,8 @@ } ], "require": { - "php": ">=5.4.0", - "illuminate/support": "4.2.*" + "php": ">=5.3.0", + "illuminate/support": "4.1.*" }, "autoload": { "psr-0": { diff --git a/vendor/monolog/monolog/CHANGELOG.mdown b/vendor/monolog/monolog/CHANGELOG.mdown index d675996..06134f7 100644 --- a/vendor/monolog/monolog/CHANGELOG.mdown +++ b/vendor/monolog/monolog/CHANGELOG.mdown @@ -1,3 +1,10 @@ +### 1.10.0 (2014-06-04) + + * Added Logger::getHandlers() and Logger::getProcessors() methods + * Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached + * Added support for extra data in NewRelicHandler + * Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines + ### 1.9.1 (2014-04-24) * Fixed regression in RotatingFileHandler file permissions diff --git a/vendor/monolog/monolog/LICENSE b/vendor/monolog/monolog/LICENSE index 5df1c39..3572704 100644 --- a/vendor/monolog/monolog/LICENSE +++ b/vendor/monolog/monolog/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) Jordi Boggiano +Copyright (c) 2011-2014 Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json index bcbe1b6..c94c302 100644 --- a/vendor/monolog/monolog/composer.json +++ b/vendor/monolog/monolog/composer.json @@ -39,7 +39,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.9.x-dev" + "dev-master": "1.10.x-dev" } } } diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php index 038db4e..d1e1ee6 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php @@ -25,13 +25,15 @@ class ErrorLogHandler extends AbstractProcessingHandler const SAPI = 4; protected $messageType; + protected $expandNewlines; /** - * @param integer $messageType Says where the error should go. - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param integer $messageType Says where the error should go. + * @param integer $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param Boolean $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries */ - public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true) + public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false) { parent::__construct($level, $bubble); @@ -41,6 +43,7 @@ class ErrorLogHandler extends AbstractProcessingHandler } $this->messageType = $messageType; + $this->expandNewlines = $expandNewlines; } /** @@ -67,6 +70,13 @@ class ErrorLogHandler extends AbstractProcessingHandler */ protected function write(array $record) { - error_log((string) $record['formatted'], $this->messageType); + if ($this->expandNewlines) { + $lines = preg_split('{[\r\n]+}', (string) $record['formatted']); + foreach ($lines as $line) { + error_log($line, $this->messageType); + } + } else { + error_log((string) $record['formatted'], $this->messageType); + } } } diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php index bc51e4e..9cf75ed 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php @@ -35,6 +35,7 @@ class FingersCrossedHandler extends AbstractHandler protected $bufferSize; protected $buffer = array(); protected $stopBuffering; + protected $passthruLevel; /** * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). @@ -42,8 +43,9 @@ class FingersCrossedHandler extends AbstractHandler * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not * @param Boolean $stopBuffering Whether the handler should stop buffering after being triggered (default true) + * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered */ - public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true) + public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true, $passthruLevel = NULL) { if (null === $activationStrategy) { $activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING); @@ -59,6 +61,7 @@ class FingersCrossedHandler extends AbstractHandler $this->bufferSize = $bufferSize; $this->bubble = $bubble; $this->stopBuffering = $stopBuffering; + $this->passthruLevel = $passthruLevel; } /** @@ -109,6 +112,23 @@ class FingersCrossedHandler extends AbstractHandler } /** + * {@inheritdoc} + */ + public function close() + { + if (NULL !== $this->passthruLevel) { + $level = $this->passthruLevel; + $this->buffer = array_filter($this->buffer, function ($record) use ($level) { + return $record['level'] >= $level; + }); + if (count($this->buffer) > 0) { + $this->handler->handleBatch($this->buffer); + $this->buffer = array(); + } + } + } + + /** * Resets the state of the handler. Stops forwarding records to the wrapped handler. */ public function reset() diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php index 31bc5d2..f7055cc 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php @@ -62,6 +62,10 @@ class NewRelicHandler extends AbstractProcessingHandler foreach ($record['context'] as $key => $parameter) { newrelic_add_custom_parameter($key, $parameter); } + + foreach ($record['extra'] as $key => $parameter) { + newrelic_add_custom_parameter($key, $parameter); + } } /** diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php index b8f701e..2b32c32 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php @@ -17,7 +17,7 @@ use Monolog\Logger; use Raven_Client; /** - * Handler to send messages to a Sentry (https://github.com/dcramer/sentry) server + * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server * using raven-php (https://github.com/getsentry/raven-php) * * @author Marc Abramowitz diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php index 6213d6e..f8800bc 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -33,10 +33,10 @@ class RotatingFileHandler extends StreamHandler /** * @param string $filename - * @param integer $maxFiles The maximal amount of files to keep (0 means unlimited) - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param int $filePermissions Optional file permissions (default (0644) are only for owner read/write) + * @param integer $maxFiles The maximal amount of files to keep (0 means unlimited) + * @param integer $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $filePermission Optional file permissions (default (0644) are only for owner read/write) */ public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null) { diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php index f6d7f80..3e3f95c 100644 --- a/vendor/monolog/monolog/src/Monolog/Logger.php +++ b/vendor/monolog/monolog/src/Monolog/Logger.php @@ -173,6 +173,14 @@ class Logger implements LoggerInterface } /** + * @return HandlerInterface[] + */ + public function getHandlers() + { + return $this->handlers; + } + + /** * Adds a processor on to the stack. * * @param callable $callback @@ -200,6 +208,14 @@ class Logger implements LoggerInterface } /** + * @return callable[] + */ + public function getProcessors() + { + return $this->processors; + } + + /** * Adds a log record. * * @param integer $level The logging level diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php index 19bfdb5..626f5f9 100644 --- a/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php @@ -4,10 +4,11 @@ namespace Monolog\Handler; use Monolog\TestCase; use Monolog\Logger; +use Monolog\Formatter\LineFormatter; function error_log() { - $GLOBALS['error_log'] = func_get_args(); + $GLOBALS['error_log'][] = func_get_args(); } class ErrorLogHandlerTest extends TestCase @@ -35,9 +36,23 @@ class ErrorLogHandlerTest extends TestCase { $type = ErrorLogHandler::OPERATING_SYSTEM; $handler = new ErrorLogHandler($type); - $handler->handle($this->getRecord(Logger::ERROR)); + $handler->setFormatter(new LineFormatter('%channel%.%level_name%: %message% %context% %extra%', null, true)); + $handler->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); - $this->assertStringMatchesFormat('[%s] test.ERROR: test [] []', $GLOBALS['error_log'][0]); - $this->assertSame($GLOBALS['error_log'][1], $type); + $this->assertSame("test.ERROR: Foo\nBar\r\n\r\nBaz [] []", $GLOBALS['error_log'][0][0]); + $this->assertSame($GLOBALS['error_log'][0][1], $type); + + $handler = new ErrorLogHandler($type, Logger::DEBUG, true, true); + $handler->setFormatter(new LineFormatter(null, null, true)); + $handler->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); + + $this->assertStringMatchesFormat('[%s] test.ERROR: Foo', $GLOBALS['error_log'][1][0]); + $this->assertSame($GLOBALS['error_log'][1][1], $type); + + $this->assertStringMatchesFormat('Bar', $GLOBALS['error_log'][2][0]); + $this->assertSame($GLOBALS['error_log'][2][1], $type); + + $this->assertStringMatchesFormat('Baz [] []', $GLOBALS['error_log'][3][0]); + $this->assertSame($GLOBALS['error_log'][3][1], $type); } } diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php index 12c5ea1..d02fef9 100644 --- a/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php @@ -31,6 +31,7 @@ class FingersCrossedHandlerTest extends TestCase $this->assertFalse($test->hasDebugRecords()); $this->assertFalse($test->hasInfoRecords()); $handler->handle($this->getRecord(Logger::WARNING)); + $handler->close(); $this->assertTrue($test->hasInfoRecords()); $this->assertTrue(count($test->getRecords()) === 3); } @@ -44,6 +45,7 @@ class FingersCrossedHandlerTest extends TestCase $handler = new FingersCrossedHandler($test); $handler->handle($this->getRecord(Logger::WARNING)); $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->close(); $this->assertTrue($test->hasWarningRecords()); $this->assertTrue($test->hasDebugRecords()); } @@ -60,6 +62,7 @@ class FingersCrossedHandlerTest extends TestCase $handler->handle($this->getRecord(Logger::DEBUG)); $handler->reset(); $handler->handle($this->getRecord(Logger::INFO)); + $handler->close(); $this->assertTrue($test->hasWarningRecords()); $this->assertTrue($test->hasDebugRecords()); $this->assertFalse($test->hasInfoRecords()); @@ -75,6 +78,7 @@ class FingersCrossedHandlerTest extends TestCase $handler->handle($this->getRecord(Logger::DEBUG)); $handler->handle($this->getRecord(Logger::WARNING)); $handler->handle($this->getRecord(Logger::INFO)); + $handler->close(); $this->assertTrue($test->hasWarningRecords()); $this->assertTrue($test->hasDebugRecords()); $this->assertFalse($test->hasInfoRecords()); @@ -186,4 +190,18 @@ class FingersCrossedHandlerTest extends TestCase $records = $test->getRecords(); $this->assertTrue($records[0]['extra']['foo']); } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::close + */ + public function testPassthruOnClose() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Logger::WARNING), 0, true, true, Logger::INFO); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->close(); + $this->assertFalse($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + } } diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php index f959a36..2e05968 100644 --- a/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php +++ b/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php @@ -18,10 +18,12 @@ use Psr\Log\LogLevel; class NewRelicHandlerTest extends TestCase { public static $appname; + public static $customParameters; public function setUp() { - $this::$appname = null; + self::$appname = null; + self::$customParameters = array(); } /** @@ -39,10 +41,38 @@ class NewRelicHandlerTest extends TestCase $handler->handle($this->getRecord(Logger::ERROR)); } - public function testThehandlerCanAddParamsToTheNewRelicTrace() + public function testThehandlerCanAddContextParamsToTheNewRelicTrace() { $handler = new StubNewRelicHandler(); $handler->handle($this->getRecord(Logger::ERROR, 'log message', array('a' => 'b'))); + $this->assertEquals(array('a' => 'b'), self::$customParameters); + } + + public function testThehandlerCanAddExtraParamsToTheNewRelicTrace() + { + $record = $this->getRecord(Logger::ERROR, 'log message'); + $record['extra'] = array('c' => 'd'); + + $handler = new StubNewRelicHandler(); + $handler->handle($record); + + $this->assertEquals(array('c' => 'd'), self::$customParameters); + } + + public function testThehandlerCanAddExtraContextAndParamsToTheNewRelicTrace() + { + $record = $this->getRecord(Logger::ERROR, 'log message', array('a' => 'b')); + $record['extra'] = array('c' => 'd'); + + $handler = new StubNewRelicHandler(); + $handler->handle($record); + + $expected = array( + 'a' => 'b', + 'c' => 'd', + ); + + $this->assertEquals($expected, self::$customParameters); } public function testTheAppNameIsNullByDefault() @@ -50,7 +80,7 @@ class NewRelicHandlerTest extends TestCase $handler = new StubNewRelicHandler(); $handler->handle($this->getRecord(Logger::ERROR, 'log message')); - $this->assertEquals(null, $this::$appname); + $this->assertEquals(null, self::$appname); } public function testTheAppNameCanBeInjectedFromtheConstructor() @@ -58,7 +88,7 @@ class NewRelicHandlerTest extends TestCase $handler = new StubNewRelicHandler(LogLevel::ALERT, false, 'myAppName'); $handler->handle($this->getRecord(Logger::ERROR, 'log message')); - $this->assertEquals('myAppName', $this::$appname); + $this->assertEquals('myAppName', self::$appname); } public function testTheAppNameCanBeOverriddenFromEachLog() @@ -66,7 +96,7 @@ class NewRelicHandlerTest extends TestCase $handler = new StubNewRelicHandler(LogLevel::ALERT, false, 'myAppName'); $handler->handle($this->getRecord(Logger::ERROR, 'log message', array('appname' => 'logAppName'))); - $this->assertEquals('logAppName', $this::$appname); + $this->assertEquals('logAppName', self::$appname); } } @@ -96,7 +126,9 @@ function newrelic_set_appname($appname) return NewRelicHandlerTest::$appname = $appname; } -function newrelic_add_custom_parameter() +function newrelic_add_custom_parameter($key, $value) { + NewRelicHandlerTest::$customParameters[$key] = $value; + return true; } diff --git a/vendor/patchwork/utf8/CHANGELOG.md b/vendor/patchwork/utf8/CHANGELOG.md index 1b7efba..eab89da 100644 --- a/vendor/patchwork/utf8/CHANGELOG.md +++ b/vendor/patchwork/utf8/CHANGELOG.md @@ -1,9 +1,14 @@ +## v1.1.24 (2014-06-17) + +- update tests for latest HHVM fixes +- move legacy GRAPHEME_CLUSTER_RX version to Intl shim + ## v1.1.23 (2014-05-22) - enable tests for PHP 5.6 - remove HHVM from allowed failures -## v1.1.22 (2014-04-06) +## v1.1.22 (2014-05-06) - fix #19: don't call ini_set() when not required and gain compat with PHP5.6 diff --git a/vendor/patchwork/utf8/README.md b/vendor/patchwork/utf8/README.md index b4735d1..b279e9d 100644 --- a/vendor/patchwork/utf8/README.md +++ b/vendor/patchwork/utf8/README.md @@ -3,7 +3,7 @@ Patchwork UTF-8 for PHP [![Latest Stable Version](https://poser.pugx.org/patchwork/utf8/v/stable.png)](https://packagist.org/packages/patchwork/utf8) [![Total Downloads](https://poser.pugx.org/patchwork/utf8/downloads.png)](https://packagist.org/packages/patchwork/utf8) -[![Build Status](https://secure.travis-ci.org/nicolas-grekas/Patchwork-UTF8.png?branch=master)](http://travis-ci.org/nicolas-grekas/Patchwork-UTF8) +[![Build Status](https://secure.travis-ci.org/nicolas-grekas/Patchwork-UTF8.png?branch=lab-windows-fs)](http://travis-ci.org/nicolas-grekas/Patchwork-UTF8) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/666c8ae7-0997-4d27-883a-6089ce3cc76b/mini.png)](https://insight.sensiolabs.com/projects/666c8ae7-0997-4d27-883a-6089ce3cc76b) Patchwork UTF-8 gives PHP developpers extensive, portable and performant @@ -91,7 +91,7 @@ the `php composer.phar install` command to install it: { "require": { - "patchwork/utf8": "1.1.*" + "patchwork/utf8": "~1.1" } } diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php index b728c12..97381fa 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php +++ b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php @@ -26,6 +26,10 @@ namespace Patchwork\PHP\Shim; */ class Intl { + // (CRLF|([ZWNJ-ZWJ]|T+|L*(LV?V+|LV|LVT)T*|L+|[^Control])[Extend]*|[Control]) + // This regular expression is a work around for http://bugs.exim.org/1279 + const GRAPHEME_CLUSTER_RX = '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])'; + static function grapheme_extract($s, $size, $type = GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0) { if (!is_scalar($s)) { diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php index 4fe5688..493d4a4 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php +++ b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php @@ -12,6 +12,7 @@ namespace Patchwork\Utf8; use Normalizer as n; use Patchwork\Utf8 as u; +use Patchwork\PHP\Shim as s; class Bootup @@ -124,18 +125,7 @@ class Bootup { if (defined('GRAPHEME_CLUSTER_RX')) return; - if (PCRE_VERSION < '8.32') - { - // (CRLF|([ZWNJ-ZWJ]|T+|L*(LV?V+|LV|LVT)T*|L+|[^Control])[Extend]*|[Control]) - // This regular expression is not up to date with the latest unicode grapheme cluster definition. - // However, until http://bugs.exim.org/show_bug.cgi?id=1279 is fixed, it's still better than \X - - define('GRAPHEME_CLUSTER_RX', '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])'); - } - else - { - define('GRAPHEME_CLUSTER_RX', '\X'); - } + define('GRAPHEME_CLUSTER_RX', PCRE_VERSION >= '8.32' ? '\X' : s\Intl::GRAPHEME_CLUSTER_RX); if (! extension_loaded('intl')) { diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/WinFsStreamWrapper.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/WinFsStreamWrapper.php new file mode 100644 index 0000000..59bb882 --- /dev/null +++ b/vendor/patchwork/utf8/class/Patchwork/Utf8/WinFsStreamWrapper.php @@ -0,0 +1,400 @@ +FileExists($path)) $fs->GetFile($path)->Attributes |= 2; + else if ($fs->FolderExists($path)) $f = $fs->GetFolder($path)->Attributes |= 2; + else return false; + + return true; + } + + static function fs($path, $is_utf8 = true) + { + static $fs; + isset($fs) or $fs = new \COM('Scripting.FileSystemObject', null, CP_UTF8); + + $path = explode('://', $path, 2); + $path = $path[(int) isset($path[1])]; + $path = strtr($path, '/', '\\'); + $pre = ''; + + if (! isset($path[0]) + || ( '/' !== $path[0] + && '\\' !== $path[0] + && false === strpos($path, ':') ) ) + { + $pre = getcwd() . '\\'; + } + + $pre = new \VARIANT($pre); + + if ($is_utf8) $path = new \VARIANT($path, VT_BSTR, CP_UTF8); + else $path = new \VARIANT($path); + + return array($fs, $fs->getAbsolutePathName(variant_cat($pre, $path))); + } + + function dir_closedir() + { + $this->handle = null; + + return true; + } + + function dir_opendir($path, $options) + { + list($fs, $path) = self::fs($path); + if (! $fs->FolderExists($path)) return false; + + $dir = $fs->GetFolder($path); + + try + { + $f = array('.', '..'); + + foreach ($dir->SubFolders() as $v) $f[] = $v->Name; + foreach ($dir->Files as $v) $f[] = $v->Name; + } + catch (\Exception $f) + { + $f = array(); + } + + $this->handle = $f; + + return true; + } + + function dir_readdir() + { + if (list(, $c) = each($this->handle)) return $c; + + return false; + } + + function dir_rewinddir() + { + reset($this->handle); + + return true; + } + + function mkdir($path, $mode, $options) + { + list($fs, $path) = self::fs($path); + + try + { + if ($options & STREAM_MKDIR_RECURSIVE) + { + $path = $fs->GetAbsolutePathName($path); + + $path = explode('\\', $path); + + if (isset($path[3]) && '' === $path[0] . $path[1]) + { + $pre = '\\\\' . $path[2] . '\\' . $path[3] . '\\'; + $i = 4; + } + else if (isset($path[1])) + { + $pre = $path[0] . '\\'; + $i = 1; + } + else + { + $pre = ''; + $i = 0; + } + + while (isset($path[$i]) && $fs->FolderExists($pre . $path[$i])) + { + $pre .= $path[$i++] . '\\'; + } + + if (! isset($path[$i])) return false; + + while (isset($path[$i])) + { + $fs->CreateFolder($pre .= $path[$i++] . '\\'); + } + + return true; + } + else + { + $fs->CreateFolder($path); + } + + return true; + } + catch (\Exception $e) + { + return false; + } + } + + function rename($from, $to) + { + list($fs, $to) = self::fs($to); + + if ($fs->FileExists($to) || $fs->FolderExists($to)) + { + return false; + } + + list(,$from) = self::fs($from); + + try + { + if ($fs->FileExists($from)) + { + $fs->MoveFile($from, $to); + + return true; + } + + if ($fs->FolderExists($from)) + { + $fs->MoveFolder($from, $to); + + return true; + } + } + catch (\Exception $e) {} + + return false; + } + + function rmdir($path, $options) + { + list($fs, $path) = self::fs($path); + + if ($fs->FolderExists($path)) return rmdir($fs->GetFolder($path)->ShortPath); + + return false; + } + + // @todo function stream_cast($cast_as) + + function stream_close() + { + fclose($this->handle); + $this->handle = null; + } + + function stream_eof() + { + return feof($this->handle); + } + + function stream_flush() + { + return fflush($this->handle); + } + + function stream_lock($operation) + { + return flock($this->handle, $operation); + } + + function stream_metadata($path, $option, $value) + { + list($fs, $path) = self::fs($path); + + if ($fs->FileExists($path)) $f = $fs->GetFile($path); + else if ($fs->FileExists($path)) $f = $fs->GetFolder($path); + else $f = false; + + if (STREAM_META_TOUCH === $option) + { + if ($f) return touch($f->ShortPath); + + try + { + $fs->OpenTextFile($path, 8, true, 0)->Close(); + + return true; + } + catch (\Exception $e) {} + } + + if (! $f) return false; + + switch ($option) + { + case STREAM_META_ACCESS: return chmod($f->ShortPath, $value); + case STREAM_META_OWNER: + case STREAM_META_OWNER_NAME: return chown($f->ShortPath, $value); + case STREAM_META_GROUP: + case STREAM_META_GROUP_NAME: return chgrp($f->ShortPath, $value); + default: return false; + } + } + + function stream_open($path, $mode, $options, &$opened_path) + { + $mode .= ''; + list($fs, $path) = self::fs($path); + + if ($fs->FolderExists($path)) return false; + + try + { + if ('x' === $m = substr($mode, 0, 1)) + { + $fs->CreateTextFile($path, false)->Close(); + $f = $fs->GetFile($path); + $mode[0] = 'w'; + } + else + { + $f = $fs->GetFile($path); + } + } + catch (\Exception $f) + { + try + { + switch ($m) + { + case 'w': + case 'c': + case 'a': + $h = $fs->CreateTextFile($path, true); + $f = $fs->GetFile($path); + $h->Close(); + break; + + default: return false; + } + } + catch (\Exception $e) + { + return false; + } + } + + if (! (STREAM_REPORT_ERRORS & $options)) + { + set_error_handler('var_dump', 0); + $e = error_reporting(0); + } + + $this->handle = fopen($f->ShortPath, $mode); + + if (! (STREAM_REPORT_ERRORS & $options)) + { + error_reporting($e); + restore_error_handler(); + } + + if ($this->handle) return true; + if (isset($h)) $f->Delete(true); + + return false; + } + + function stream_read($count) + { + return fread($this->handle, $count); + } + + function stream_seek($offset, $whence = SEEK_SET) + { + return fseek($this->handle, $offset, $whence); + } + + function stream_set_option($option, $arg1, $arg2) + { + switch ($option) + { + case STREAM_OPTION_BLOCKING: return stream_set_blocking($this->handle, $arg1); + case STREAM_OPTION_READ_TIMEOUT: return stream_set_timeout($this->handle, $arg1, $arg2); + case STREAM_OPTION_WRITE_BUFFER: return stream_set_write_buffer($this->handle, $arg1, $arg2); + default: return false; + } + } + + function stream_stat() + { + return fstat($this->handle); + } + + function stream_tell() + { + return ftell($this->handle); + } + + function stream_truncate($new_size) + { + return ftruncate($this->handle, $new_size); + } + + function stream_write($data) + { + return fwrite($this->handle, $data, strlen($data)); + } + + function unlink($path) + { + list($fs, $path) = self::fs($path); + + if ($fs->FileExists($path)) return unlink($fs->GetFile($path)->ShortPath); + + return false; + } + + function url_stat($path, $flags) + { + list($fs, $path) = self::fs($path); + + if ($fs->FileExists($path)) $f = $fs->GetFile($path); + else if ($fs->FolderExists($path)) $f = $fs->GetFolder($path); + else return false; + + if (STREAM_URL_STAT_QUIET & $flags) + { + set_error_handler('var_dump', 0); + $e = error_reporting(0); + } + + if (STREAM_URL_STAT_LINK & $flags) $f = lstat($f->ShortPath); + else $f = stat($f->ShortPath); + + if (STREAM_URL_STAT_QUIET & $flags) + { + error_reporting($e); + restore_error_handler(); + } + + return $f; + } +} diff --git a/vendor/swiftmailer/swiftmailer/CHANGES b/vendor/swiftmailer/swiftmailer/CHANGES index ddbee68..c78c463 100644 --- a/vendor/swiftmailer/swiftmailer/CHANGES +++ b/vendor/swiftmailer/swiftmailer/CHANGES @@ -1,6 +1,18 @@ Changelog ========= +5.2.1 (2014-06-13) +------------------ + + * SECURITY FIX: fixed CLI escaping when using sendmail as a transport + + Prior to 5.2.1, the sendmail transport (Swift_Transport_SendmailTransport) + was vulnerable to an arbitrary shell execution if the "From" header came + from a non-trusted source and no "Return-Path" is configured. + + * fixed parameter in DKIMSigner + * fixed compatibility with PHP < 5.4 + 5.2.0 (2014-05-08) ------------------ diff --git a/vendor/swiftmailer/swiftmailer/VERSION b/vendor/swiftmailer/swiftmailer/VERSION index 137c6ad..064e3a3 100644 --- a/vendor/swiftmailer/swiftmailer/VERSION +++ b/vendor/swiftmailer/swiftmailer/VERSION @@ -1 +1 @@ -Swift-5.2.0 +Swift-5.2.1 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php index 75fc01b..f2a2514 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php @@ -195,7 +195,7 @@ class Swift_Signers_DKIMSigner implements Swift_Signers_HeaderSigner */ public static function newInstance($privateKey, $domainName, $selector) { - return new static($privateKey, $domainName, $selector); + return new static($privateKey, $domainName, $selector); } @@ -663,6 +663,10 @@ class Swift_Signers_DKIMSigner implements Swift_Signers_HeaderSigner $this->_headerCanonData .= $header; } + /** + * @throws Swift_SwiftException + * @return string + */ private function _getEncryptedHash() { $signature = ''; @@ -678,7 +682,7 @@ class Swift_Signers_DKIMSigner implements Swift_Signers_HeaderSigner if (!$pkeyId) { throw new Swift_SwiftException('Unable to load DKIM Private Key ['.openssl_error_string().']'); } - if (openssl_sign($this->_headerCanonData, $signature, $this->_privateKey, $algorithm)) { + if (openssl_sign($this->_headerCanonData, $signature, $pkeyId, $algorithm)) { return $signature; } throw new Swift_SwiftException('Unable to sign DKIM Hash ['.openssl_error_string().']'); diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php index dbfd292..d6d728f 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php @@ -142,7 +142,7 @@ class Swift_Signers_DomainKeySigner implements Swift_Signers_HeaderSigner * @return Swift_Signers_DomainKeySigner */ public static function newInstance($privateKey, $domainName, $selector) { - return new static($privateKey, $domainName, $selector); + return new static($privateKey, $domainName, $selector); } /** @@ -230,7 +230,7 @@ class Swift_Signers_DomainKeySigner implements Swift_Signers_HeaderSigner // Don't have to mirror anything foreach ($this->_bound as $k => $stream) { if ($stream === $is) { - unset($this->_bound[$k]); + unset($this->_bound[$k]); return; } @@ -501,6 +501,10 @@ class Swift_Signers_DomainKeySigner implements Swift_Signers_HeaderSigner $this->_canonLine = ''; } + /** + * @throws Swift_SwiftException + * @return string + */ private function _getEncryptedHash() { $signature = ''; diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php index 95c2e4a..9ce7480 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php @@ -114,7 +114,7 @@ class Swift_Transport_SendmailTransport extends Swift_Transport_AbstractSmtpTran } if (false === strpos($command, ' -f')) { - $command .= ' -f' . $this->_getReversePath($message); + $command .= ' -f' . escapeshellarg($this->_getReversePath($message)); } $buffer->initialize(array_merge($this->_params, array('command' => $command))); diff --git a/vendor/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php b/vendor/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php index 36628a0..695d94d 100755 --- a/vendor/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php +++ b/vendor/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php @@ -25,12 +25,12 @@ function generateUpToDateMimeArray() $mime_xml = @file_get_contents(FREEDESKTOP_XML_URL); // prepare valid mime types - $valid_mime_types = []; + $valid_mime_types = array(); // split mime type and extensions eg. "video/x-matroska mkv mk3d mks" if (preg_match_all('/^#?([a-z0-9\-\+\/\.]+)[\t]+(.*)$/miu', $mime_types, $matches) !== FALSE) { // collection of predefined mimetypes (bugfix for wrong resolved or missing mime types) - $valid_mime_types_preset = [ + $valid_mime_types_preset = array( 'php' => 'application/x-php', 'php3' => 'application/x-php', 'php4' => 'application/x-php', @@ -103,7 +103,7 @@ function generateUpToDateMimeArray() 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xml' => 'application/xml', 'zip' => 'application/zip' - ]; + ); // wrap array for generating file foreach ($valid_mime_types_preset as $extension => $mime_type) { @@ -112,7 +112,7 @@ function generateUpToDateMimeArray() } // collect extensions - $valid_extensions = []; + $valid_extensions = array(); // all extensions from second match foreach ($matches[2] as $i => $extensions) { diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php index f6efbfe..f6f9151 100644 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php +++ b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php @@ -210,7 +210,7 @@ class Swift_Transport_Esmtp_Auth_NTLMAuthenticatorTest extends \SwiftMailerTestC private function _getAgent() { - return $this->getMockery('Swift_Transport_SmtpAgent')->shouldIgnoreMissing();; + return $this->getMockery('Swift_Transport_SmtpAgent')->shouldIgnoreMissing(); } private function _invokePrivateMethod($method, $instance, array $args = array()) diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php index a74d907..a7a8401 100644 --- a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php +++ b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php @@ -97,7 +97,9 @@ abstract class Client public function insulate($insulated = true) { if ($insulated && !class_exists('Symfony\\Component\\Process\\Process')) { + // @codeCoverageIgnoreStart throw new \RuntimeException('Unable to isolate requests as the Symfony Process Component is not installed.'); + // @codeCoverageIgnoreEnd } $this->insulated = (bool) $insulated; @@ -391,7 +393,9 @@ abstract class Client */ protected function getScript($request) { + // @codeCoverageIgnoreStart throw new \LogicException('To insulate requests, you need to override the getScript() method.'); + // @codeCoverageIgnoreEnd } /** diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/composer.json b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/composer.json index ed914dd..592fda9 100644 --- a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/composer.json +++ b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/composer.json @@ -33,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/console/Symfony/Component/Console/Application.php b/vendor/symfony/console/Symfony/Component/Console/Application.php index 41d8f93..c28cd24 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Application.php +++ b/vendor/symfony/console/Symfony/Component/Console/Application.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Console; use Symfony\Component\Console\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; -use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArrayInput; @@ -68,7 +67,6 @@ class Application private $helperSet; private $dispatcher; private $terminalDimensions; - private $defaultCommand; /** * Constructor. @@ -82,7 +80,6 @@ class Application { $this->name = $name; $this->version = $version; - $this->defaultCommand = 'list'; $this->helperSet = $this->getDefaultHelperSet(); $this->definition = $this->getDefaultInputDefinition(); @@ -148,8 +145,9 @@ class Application if ($exitCode > 255) { $exitCode = 255; } - + // @codeCoverageIgnoreStart exit($exitCode); + // @codeCoverageIgnoreEnd } return $exitCode; @@ -182,8 +180,8 @@ class Application } if (!$name) { - $name = $this->defaultCommand; - $input = new ArrayInput(array('command' => $this->defaultCommand)); + $name = 'list'; + $input = new ArrayInput(array('command' => 'list')); } // the command name MUST be the first element of the input @@ -962,7 +960,6 @@ class Application new DialogHelper(), new ProgressHelper(), new TableHelper(), - new QuestionHelper(), )); } @@ -1095,16 +1092,6 @@ class Application return array_keys($alternatives); } - /** - * Sets the default Command name. - * - * @param string $commandName The Command name - */ - public function setDefaultCommand($commandName) - { - $this->defaultCommand = $commandName; - } - private function stringWidth($string) { if (!function_exists('mb_strwidth')) { diff --git a/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md b/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md index 9c5741b..4d00cbb 100644 --- a/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md +++ b/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md @@ -1,16 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - - * deprecated the dialog helper (use the question helper instead) - * deprecated TableHelper in favor of Table - * deprecated ProgressHelper in favor of ProgressBar - * added a question helper - * added a way to set the process name of a command - * added a way to set a default command instead of `ListCommand` - 2.4.0 ----- diff --git a/vendor/symfony/console/Symfony/Component/Console/Command/Command.php b/vendor/symfony/console/Symfony/Component/Console/Command/Command.php index 21ac78c..ebab4ad 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Command/Command.php +++ b/vendor/symfony/console/Symfony/Component/Console/Command/Command.php @@ -33,7 +33,6 @@ class Command { private $application; private $name; - private $processTitle; private $aliases = array(); private $definition; private $help; @@ -213,16 +212,6 @@ class Command */ public function run(InputInterface $input, OutputInterface $output) { - if (null !== $this->processTitle) { - if (function_exists('cli_set_process_title')) { - cli_set_process_title($this->processTitle); - } elseif (function_exists('setproctitle')) { - setproctitle($this->processTitle); - } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { - $output->writeln('Install the proctitle PECL to be able to change the process title.'); - } - } - // force the creation of the synopsis before the merge with the app definition $this->getSynopsis(); @@ -423,25 +412,6 @@ class Command } /** - * Sets the process title of the command. - * - * This feature should be used only when creating a long process command, - * like a daemon. - * - * PHP 5.5+ or the proctitle PECL library is required - * - * @param string $title The process title - * - * @return Command The current instance - */ - public function setProcessTitle($title) - { - $this->processTitle = $title; - - return $this; - } - - /** * Returns the command name. * * @return string The command name diff --git a/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index b5457ef..f0bbd38 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -21,31 +21,31 @@ namespace Symfony\Component\Console\Formatter; class OutputFormatterStyle implements OutputFormatterStyleInterface { private static $availableForegroundColors = array( - 'black' => array('set' => 30, 'unset' => 39), - 'red' => array('set' => 31, 'unset' => 39), - 'green' => array('set' => 32, 'unset' => 39), - 'yellow' => array('set' => 33, 'unset' => 39), - 'blue' => array('set' => 34, 'unset' => 39), - 'magenta' => array('set' => 35, 'unset' => 39), - 'cyan' => array('set' => 36, 'unset' => 39), - 'white' => array('set' => 37, 'unset' => 39) + 'black' => 30, + 'red' => 31, + 'green' => 32, + 'yellow' => 33, + 'blue' => 34, + 'magenta' => 35, + 'cyan' => 36, + 'white' => 37 ); private static $availableBackgroundColors = array( - 'black' => array('set' => 40, 'unset' => 49), - 'red' => array('set' => 41, 'unset' => 49), - 'green' => array('set' => 42, 'unset' => 49), - 'yellow' => array('set' => 43, 'unset' => 49), - 'blue' => array('set' => 44, 'unset' => 49), - 'magenta' => array('set' => 45, 'unset' => 49), - 'cyan' => array('set' => 46, 'unset' => 49), - 'white' => array('set' => 47, 'unset' => 49) + 'black' => 40, + 'red' => 41, + 'green' => 42, + 'yellow' => 43, + 'blue' => 44, + 'magenta' => 45, + 'cyan' => 46, + 'white' => 47 ); private static $availableOptions = array( - 'bold' => array('set' => 1, 'unset' => 21), - 'underscore' => array('set' => 4, 'unset' => 24), - 'blink' => array('set' => 5, 'unset' => 25), - 'reverse' => array('set' => 7, 'unset' => 27), - 'conceal' => array('set' => 8, 'unset' => 28) + 'bold' => 1, + 'underscore' => 4, + 'blink' => 5, + 'reverse' => 7, + 'conceal' => 8 ); private $foreground; @@ -201,28 +201,22 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface */ public function apply($text) { - $setCodes = array(); - $unsetCode = array(); + $codes = array(); if (null !== $this->foreground) { - $setCodes[] = $this->foreground['set']; - $unsetCodes[] = $this->foreground['unset']; + $codes[] = $this->foreground; } if (null !== $this->background) { - $setCodes[] = $this->background['set']; - $unsetCodes[] = $this->background['unset']; + $codes[] = $this->background; } if (count($this->options)) { - foreach ($this->options as $option) { - $setCodes[] = $option['set']; - $unsetCodes[] = $option['unset']; - } + $codes = array_merge($codes, $this->options); } - if (0 === count($setCodes)) { + if (0 === count($codes)) { return $text; } - return sprintf("\033[%sm%s\033[%sm", implode(';', $setCodes), $text, implode(';', $unsetCodes)); + return sprintf("\033[%sm%s\033[0m", implode(';', $codes), $text); } } diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php index 26e9474..84fe0ad 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php @@ -18,9 +18,6 @@ use Symfony\Component\Console\Formatter\OutputFormatterStyle; * The Dialog class provides helpers to interact with the user. * * @author Fabien Potencier - * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. - * Use the question helper instead. */ class DialogHelper extends InputAwareHelper { diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php index cc32055..b2a8389 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Console\Helper; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - /** * Helper is the base class for all helper classes. * @@ -49,7 +47,7 @@ abstract class Helper implements HelperInterface * * @return int The length of the string */ - public static function strlen($string) + protected function strlen($string) { if (!function_exists('mb_strwidth')) { return strlen($string); @@ -61,61 +59,4 @@ abstract class Helper implements HelperInterface return mb_strwidth($string, $encoding); } - - public static function formatTime($secs) - { - static $timeFormats = array( - array(0, '< 1 sec'), - array(2, '1 sec'), - array(59, 'secs', 1), - array(60, '1 min'), - array(3600, 'mins', 60), - array(5400, '1 hr'), - array(86400, 'hrs', 3600), - array(129600, '1 day'), - array(604800, 'days', 86400), - ); - - foreach ($timeFormats as $format) { - if ($secs >= $format[0]) { - continue; - } - - if (2 == count($format)) { - return $format[1]; - } - - return ceil($secs / $format[2]).' '.$format[1]; - } - } - - public static function formatMemory($memory) - { - if ($memory >= 1024 * 1024 * 1024) { - return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024); - } - - if ($memory >= 1024 * 1024) { - return sprintf('%.1f MiB', $memory / 1024 / 1024); - } - - if ($memory >= 1024) { - return sprintf('%d KiB', $memory / 1024); - } - - return sprintf('%d B', $memory); - } - - public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) - { - $isDecorated = $formatter->isDecorated(); - $formatter->setDecorated(false); - // remove <...> formatting - $string = $formatter->format($string); - // remove already formatted characters - $string = preg_replace("/\033\[[^m]*m/", '', $string); - $formatter->setDecorated($isDecorated); - - return self::strlen($string); - } } diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php index d0acf05..647d616 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Console\Helper; -use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\OutputInterface; /** @@ -19,8 +18,6 @@ use Symfony\Component\Console\Output\OutputInterface; * * @author Chris Jones * @author Fabien Potencier - * - * @deprecated Deprecated since 2.5, to be removed in 3.0; use ProgressBar instead. */ class ProgressHelper extends Helper { @@ -188,9 +185,7 @@ class ProgressHelper extends Helper $this->startTime = time(); $this->current = 0; $this->max = (int) $max; - - // Disabling output when it does not support ANSI codes as it would result in a broken display anyway. - $this->output = $output->isDecorated() ? $output : new NullOutput(); + $this->output = $output; $this->lastMessagesLength = 0; $this->barCharOriginal = ''; diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php index 76b5a08..3281fc8 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php @@ -12,15 +12,12 @@ namespace Symfony\Component\Console\Helper; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\NullOutput; +use InvalidArgumentException; /** * Provides helpers to display table output. * * @author Саша Стаменковић - * @author Fabien Potencier - * - * @deprecated Deprecated since 2.5, to be removed in 3.0; use Table instead. */ class TableHelper extends Helper { @@ -29,13 +26,52 @@ class TableHelper extends Helper const LAYOUT_COMPACT = 2; /** - * @var Table + * Table headers. + * + * @var array + */ + private $headers = array(); + + /** + * Table rows. + * + * @var array + */ + private $rows = array(); + + // Rendering options + private $paddingChar; + private $horizontalBorderChar; + private $verticalBorderChar; + private $crossingChar; + private $cellHeaderFormat; + private $cellRowFormat; + private $cellRowContentFormat; + private $borderFormat; + private $padType; + + /** + * Column widths cache. + * + * @var array + */ + private $columnWidths = array(); + + /** + * Number of columns cache. + * + * @var array + */ + private $numberOfColumns; + + /** + * @var OutputInterface */ - private $table; + private $output; public function __construct() { - $this->table = new Table(new NullOutput()); + $this->setLayout(self::LAYOUT_DEFAULT); } /** @@ -49,19 +85,49 @@ class TableHelper extends Helper { switch ($layout) { case self::LAYOUT_BORDERLESS: - $this->table->setStyle('borderless'); + $this + ->setPaddingChar(' ') + ->setHorizontalBorderChar('=') + ->setVerticalBorderChar(' ') + ->setCrossingChar(' ') + ->setCellHeaderFormat('%s') + ->setCellRowFormat('%s') + ->setCellRowContentFormat(' %s ') + ->setBorderFormat('%s') + ->setPadType(STR_PAD_RIGHT) + ; break; case self::LAYOUT_COMPACT: - $this->table->setStyle('compact'); + $this + ->setPaddingChar(' ') + ->setHorizontalBorderChar('') + ->setVerticalBorderChar(' ') + ->setCrossingChar('') + ->setCellHeaderFormat('%s') + ->setCellRowFormat('%s') + ->setCellRowContentFormat('%s') + ->setBorderFormat('%s') + ->setPadType(STR_PAD_RIGHT) + ; break; case self::LAYOUT_DEFAULT: - $this->table->setStyle('default'); + $this + ->setPaddingChar(' ') + ->setHorizontalBorderChar('-') + ->setVerticalBorderChar('|') + ->setCrossingChar('+') + ->setCellHeaderFormat('%s') + ->setCellRowFormat('%s') + ->setCellRowContentFormat(' %s ') + ->setBorderFormat('%s') + ->setPadType(STR_PAD_RIGHT) + ; break; default: - throw new \InvalidArgumentException(sprintf('Invalid table layout "%s".', $layout)); + throw new InvalidArgumentException(sprintf('Invalid table layout "%s".', $layout)); break; }; @@ -70,35 +136,60 @@ class TableHelper extends Helper public function setHeaders(array $headers) { - $this->table->setHeaders($headers); + $this->headers = array_values($headers); return $this; } public function setRows(array $rows) { - $this->table->setRows($rows); + $this->rows = array(); - return $this; + return $this->addRows($rows); } public function addRows(array $rows) { - $this->table->addRows($rows); + foreach ($rows as $row) { + $this->addRow($row); + } return $this; } public function addRow(array $row) { - $this->table->addRow($row); + $this->rows[] = array_values($row); + + $keys = array_keys($this->rows); + $rowKey = array_pop($keys); + + foreach ($row as $key => $cellValue) { + if (!strstr($cellValue, "\n")) { + continue; + } + + $lines = explode("\n", $cellValue); + $this->rows[$rowKey][$key] = $lines[0]; + unset($lines[0]); + + foreach ($lines as $lineKey => $line) { + $nextRowKey = $rowKey + $lineKey + 1; + + if (isset($this->rows[$nextRowKey])) { + $this->rows[$nextRowKey][$key] = $line; + } else { + $this->rows[$nextRowKey] = array($key => $line); + } + } + } return $this; } public function setRow($column, array $row) { - $this->table->setRow($column, $row); + $this->rows[$column] = $row; return $this; } @@ -112,7 +203,11 @@ class TableHelper extends Helper */ public function setPaddingChar($paddingChar) { - $this->table->getStyle()->setPaddingChar($paddingChar); + if (!$paddingChar) { + throw new \LogicException('The padding char must not be empty'); + } + + $this->paddingChar = $paddingChar; return $this; } @@ -126,7 +221,7 @@ class TableHelper extends Helper */ public function setHorizontalBorderChar($horizontalBorderChar) { - $this->table->getStyle()->setHorizontalBorderChar($horizontalBorderChar); + $this->horizontalBorderChar = $horizontalBorderChar; return $this; } @@ -140,7 +235,7 @@ class TableHelper extends Helper */ public function setVerticalBorderChar($verticalBorderChar) { - $this->table->getStyle()->setVerticalBorderChar($verticalBorderChar); + $this->verticalBorderChar = $verticalBorderChar; return $this; } @@ -154,7 +249,7 @@ class TableHelper extends Helper */ public function setCrossingChar($crossingChar) { - $this->table->getStyle()->setCrossingChar($crossingChar); + $this->crossingChar = $crossingChar; return $this; } @@ -168,7 +263,7 @@ class TableHelper extends Helper */ public function setCellHeaderFormat($cellHeaderFormat) { - $this->table->getStyle()->setCellHeaderFormat($cellHeaderFormat); + $this->cellHeaderFormat = $cellHeaderFormat; return $this; } @@ -182,7 +277,7 @@ class TableHelper extends Helper */ public function setCellRowFormat($cellRowFormat) { - $this->table->getStyle()->setCellHeaderFormat($cellRowFormat); + $this->cellRowFormat = $cellRowFormat; return $this; } @@ -196,7 +291,7 @@ class TableHelper extends Helper */ public function setCellRowContentFormat($cellRowContentFormat) { - $this->table->getStyle()->setCellRowContentFormat($cellRowContentFormat); + $this->cellRowContentFormat = $cellRowContentFormat; return $this; } @@ -210,7 +305,7 @@ class TableHelper extends Helper */ public function setBorderFormat($borderFormat) { - $this->table->getStyle()->setBorderFormat($borderFormat); + $this->borderFormat = $borderFormat; return $this; } @@ -224,7 +319,7 @@ class TableHelper extends Helper */ public function setPadType($padType) { - $this->table->getStyle()->setPadType($padType); + $this->padType = $padType; return $this; } @@ -245,11 +340,174 @@ class TableHelper extends Helper */ public function render(OutputInterface $output) { - $p = new \ReflectionProperty($this->table, 'output'); - $p->setAccessible(true); - $p->setValue($this->table, $output); + $this->output = $output; + + $this->renderRowSeparator(); + $this->renderRow($this->headers, $this->cellHeaderFormat); + if (!empty($this->headers)) { + $this->renderRowSeparator(); + } + foreach ($this->rows as $row) { + $this->renderRow($row, $this->cellRowFormat); + } + if (!empty($this->rows)) { + $this->renderRowSeparator(); + } + + $this->cleanup(); + } + + /** + * Renders horizontal header separator. + * + * Example: +-----+-----------+-------+ + */ + private function renderRowSeparator() + { + if (0 === $count = $this->getNumberOfColumns()) { + return; + } + + if (!$this->horizontalBorderChar && !$this->crossingChar) { + return; + } + + $markup = $this->crossingChar; + for ($column = 0; $column < $count; $column++) { + $markup .= str_repeat($this->horizontalBorderChar, $this->getColumnWidth($column)).$this->crossingChar; + } + + $this->output->writeln(sprintf($this->borderFormat, $markup)); + } + + /** + * Renders vertical column separator. + */ + private function renderColumnSeparator() + { + $this->output->write(sprintf($this->borderFormat, $this->verticalBorderChar)); + } + + /** + * Renders table row. + * + * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * + * @param array $row + * @param string $cellFormat + */ + private function renderRow(array $row, $cellFormat) + { + if (empty($row)) { + return; + } + + $this->renderColumnSeparator(); + for ($column = 0, $count = $this->getNumberOfColumns(); $column < $count; $column++) { + $this->renderCell($row, $column, $cellFormat); + $this->renderColumnSeparator(); + } + $this->output->writeln(''); + } + + /** + * Renders table cell with padding. + * + * @param array $row + * @param int $column + * @param string $cellFormat + */ + private function renderCell(array $row, $column, $cellFormat) + { + $cell = isset($row[$column]) ? $row[$column] : ''; + $width = $this->getColumnWidth($column); + + // str_pad won't work properly with multi-byte strings, we need to fix the padding + if (function_exists('mb_strlen') && false !== $encoding = mb_detect_encoding($cell)) { + $width += strlen($cell) - mb_strlen($cell, $encoding); + } + + $width += $this->strlen($cell) - $this->computeLengthWithoutDecoration($cell); + + $content = sprintf($this->cellRowContentFormat, $cell); + + $this->output->write(sprintf($cellFormat, str_pad($content, $width, $this->paddingChar, $this->padType))); + } + + /** + * Gets number of columns for this table. + * + * @return int + */ + private function getNumberOfColumns() + { + if (null !== $this->numberOfColumns) { + return $this->numberOfColumns; + } + + $columns = array(0); + $columns[] = count($this->headers); + foreach ($this->rows as $row) { + $columns[] = count($row); + } + + return $this->numberOfColumns = max($columns); + } + + /** + * Gets column width. + * + * @param int $column + * + * @return int + */ + private function getColumnWidth($column) + { + if (isset($this->columnWidths[$column])) { + return $this->columnWidths[$column]; + } + + $lengths = array(0); + $lengths[] = $this->getCellWidth($this->headers, $column); + foreach ($this->rows as $row) { + $lengths[] = $this->getCellWidth($row, $column); + } + + return $this->columnWidths[$column] = max($lengths) + strlen($this->cellRowContentFormat) - 2; + } + + /** + * Gets cell width. + * + * @param array $row + * @param int $column + * + * @return int + */ + private function getCellWidth(array $row, $column) + { + return isset($row[$column]) ? $this->computeLengthWithoutDecoration($row[$column]) : 0; + } + + /** + * Called after rendering to cleanup cache data. + */ + private function cleanup() + { + $this->columnWidths = array(); + $this->numberOfColumns = null; + } + + private function computeLengthWithoutDecoration($string) + { + $formatter = $this->output->getFormatter(); + $isDecorated = $formatter->isDecorated(); + $formatter->setDecorated(false); + + $string = $formatter->format($string); + $formatter->setDecorated($isDecorated); - $this->table->render(); + return $this->strlen($string); } /** diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php b/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php index 6537e27..7f87f71 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php +++ b/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php @@ -72,7 +72,9 @@ class StringInput extends ArgvInput $tokens[] = stripcslashes($match[1]); } else { // should never happen + // @codeCoverageIgnoreStart throw new \InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); + // @codeCoverageIgnoreEnd } $cursor += strlen($match[0]); diff --git a/vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php b/vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php index 23d49d2..6415fa2 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php +++ b/vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php @@ -75,8 +75,10 @@ class StreamOutput extends Output protected function doWrite($message, $newline) { if (false === @fwrite($this->stream, $message.($newline ? PHP_EOL : ''))) { + // @codeCoverageIgnoreStart // should never happen throw new \RuntimeException('Unable to write output.'); + // @codeCoverageIgnoreEnd } fflush($this->stream); @@ -94,10 +96,12 @@ class StreamOutput extends Output */ protected function hasColorSupport() { + // @codeCoverageIgnoreStart if (DIRECTORY_SEPARATOR == '\\') { return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); } return function_exists('posix_isatty') && @posix_isatty($this->stream); + // @codeCoverageIgnoreEnd } } diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php index 59f0de1..32a23aa 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php @@ -925,28 +925,6 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase return $dispatcher; } - - public function testSetRunCustomDefaultCommand() - { - $command = new \FooCommand(); - - $application = new Application(); - $application->setAutoExit(false); - $application->add($command); - $application->setDefaultCommand($command->getName()); - - $tester = new ApplicationTester($application); - $tester->run(array()); - $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); - - $application = new CustomDefaultCommandApplication(); - $application->setAutoExit(false); - - $tester = new ApplicationTester($application); - $tester->run(array()); - - $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); - } } class CustomApplication extends Application @@ -971,18 +949,3 @@ class CustomApplication extends Application return new HelperSet(array(new FormatterHelper())); } } - -class CustomDefaultCommandApplication extends Application -{ - /** - * Overwrites the constructor in order to set a different default command. - */ - public function __construct() - { - parent::__construct(); - - $command = new \FooCommand(); - $this->add($command); - $this->setDefaultCommand($command->getName()); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt index b44d50b..4bdcd77 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt @@ -1,27 +1,27 @@ -  - [Exception]  - Third exception comment  -  +  + [Exception]  + Third exception comment  +  -  - [Exception]  - Second exception comment  -  +  + [Exception]  + Second exception comment  +  -  - [Exception]  - First exception 

    this is html

      -  +  + [Exception]  + First exception 

    this is html

      +  -foo3:bar +foo3:bar diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt index 8c8801b..c68a60f 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt @@ -1,11 +1,11 @@ -  - [Exception]  - エラーメッセージ  -  +  + [Exception]  + エラーメッセージ  +  -foo +foo diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php index c9e21fd..6890a9b 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php @@ -18,13 +18,13 @@ class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase public function testConstructor() { $style = new OutputFormatterStyle('green', 'black', array('bold', 'underscore')); - $this->assertEquals("\033[32;40;1;4mfoo\033[39;49;21;24m", $style->apply('foo')); + $this->assertEquals("\033[32;40;1;4mfoo\033[0m", $style->apply('foo')); $style = new OutputFormatterStyle('red', null, array('blink')); - $this->assertEquals("\033[31;5mfoo\033[39;25m", $style->apply('foo')); + $this->assertEquals("\033[31;5mfoo\033[0m", $style->apply('foo')); $style = new OutputFormatterStyle(null, 'white'); - $this->assertEquals("\033[47mfoo\033[49m", $style->apply('foo')); + $this->assertEquals("\033[47mfoo\033[0m", $style->apply('foo')); } public function testForeground() @@ -32,10 +32,10 @@ class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle(); $style->setForeground('black'); - $this->assertEquals("\033[30mfoo\033[39m", $style->apply('foo')); + $this->assertEquals("\033[30mfoo\033[0m", $style->apply('foo')); $style->setForeground('blue'); - $this->assertEquals("\033[34mfoo\033[39m", $style->apply('foo')); + $this->assertEquals("\033[34mfoo\033[0m", $style->apply('foo')); $this->setExpectedException('InvalidArgumentException'); $style->setForeground('undefined-color'); @@ -46,10 +46,10 @@ class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle(); $style->setBackground('black'); - $this->assertEquals("\033[40mfoo\033[49m", $style->apply('foo')); + $this->assertEquals("\033[40mfoo\033[0m", $style->apply('foo')); $style->setBackground('yellow'); - $this->assertEquals("\033[43mfoo\033[49m", $style->apply('foo')); + $this->assertEquals("\033[43mfoo\033[0m", $style->apply('foo')); $this->setExpectedException('InvalidArgumentException'); $style->setBackground('undefined-color'); @@ -60,19 +60,19 @@ class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle(); $style->setOptions(array('reverse', 'conceal')); - $this->assertEquals("\033[7;8mfoo\033[27;28m", $style->apply('foo')); + $this->assertEquals("\033[7;8mfoo\033[0m", $style->apply('foo')); $style->setOption('bold'); - $this->assertEquals("\033[7;8;1mfoo\033[27;28;21m", $style->apply('foo')); + $this->assertEquals("\033[7;8;1mfoo\033[0m", $style->apply('foo')); $style->unsetOption('reverse'); - $this->assertEquals("\033[8;1mfoo\033[28;21m", $style->apply('foo')); + $this->assertEquals("\033[8;1mfoo\033[0m", $style->apply('foo')); $style->setOption('bold'); - $this->assertEquals("\033[8;1mfoo\033[28;21m", $style->apply('foo')); + $this->assertEquals("\033[8;1mfoo\033[0m", $style->apply('foo')); $style->setOptions(array('bold')); - $this->assertEquals("\033[1mfoo\033[21m", $style->apply('foo')); + $this->assertEquals("\033[1mfoo\033[0m", $style->apply('foo')); try { $style->setOption('foo'); diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php index c36c08b..c8f0b98 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php @@ -31,7 +31,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $this->assertEquals("\\some info\\", OutputFormatter::escape('some info')); $this->assertEquals( - "\033[33mSymfony\\Component\\Console does work very well!\033[39m", + "\033[33mSymfony\\Component\\Console does work very well!\033[0m", $formatter->format('Symfony\Component\Console does work very well!') ); } @@ -46,19 +46,19 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $this->assertTrue($formatter->hasStyle('question')); $this->assertEquals( - "\033[37;41msome error\033[39;49m", + "\033[37;41msome error\033[0m", $formatter->format('some error') ); $this->assertEquals( - "\033[32msome info\033[39m", + "\033[32msome info\033[0m", $formatter->format('some info') ); $this->assertEquals( - "\033[33msome comment\033[39m", + "\033[33msome comment\033[0m", $formatter->format('some comment') ); $this->assertEquals( - "\033[30;46msome question\033[39;49m", + "\033[30;46msome question\033[0m", $formatter->format('some question') ); } @@ -68,7 +68,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "\033[37;41msome \033[39;49m\033[32msome info\033[39m\033[37;41m error\033[39;49m", + "\033[37;41msome \033[0m\033[32msome info\033[0m\033[37;41m error\033[0m", $formatter->format('some some info error') ); } @@ -78,7 +78,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "\033[37;41msome error\033[39;49m\033[32msome info\033[39m", + "\033[37;41msome error\033[0m\033[32msome info\033[0m", $formatter->format('some errorsome info') ); } @@ -88,7 +88,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "(\033[32m>=2.0,<2.3\033[39m)", + "(\033[32m>=2.0,<2.3\033[0m)", $formatter->format('(>=2.0,<2.3)') ); } @@ -98,7 +98,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "(\033[32mz>=2.0,=2.0,format('('.$formatter->escape('z>=2.0,)') ); } @@ -108,7 +108,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "\033[37;41merror\033[39;49m\033[32minfo\033[39m\033[33mcomment\033[39m\033[37;41merror\033[39;49m", + "\033[37;41merror\033[0m\033[32minfo\033[0m\033[33mcomment\033[0m\033[37;41merror\033[0m", $formatter->format('errorinfocommenterror') ); } @@ -126,7 +126,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle('blue', 'white'); $formatter->setStyle('b', $style); - $this->assertEquals("\033[34;47msome \033[39;49m\033[34;47mcustom\033[39;49m\033[34;47m msg\033[39;49m", $formatter->format('some custom msg')); + $this->assertEquals("\033[34;47msome \033[0m\033[34;47mcustom\033[0m\033[34;47m msg\033[0m", $formatter->format('some custom msg')); } public function testRedefineStyle() @@ -136,29 +136,29 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle('blue', 'white'); $formatter->setStyle('info', $style); - $this->assertEquals("\033[34;47msome custom msg\033[39;49m", $formatter->format('some custom msg')); + $this->assertEquals("\033[34;47msome custom msg\033[0m", $formatter->format('some custom msg')); } public function testInlineStyle() { $formatter = new OutputFormatter(true); - $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('some text')); - $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('some text')); + $this->assertEquals("\033[34;41msome text\033[0m", $formatter->format('some text')); + $this->assertEquals("\033[34;41msome text\033[0m", $formatter->format('some text')); } public function testNonStyleTag() { $formatter = new OutputFormatter(true); - $this->assertEquals("\033[32msome \033[39m\033[32m\033[39m\033[32m styled \033[39m\033[32m

    \033[39m\033[32msingle-char tag\033[39m\033[32m

    \033[39m", $formatter->format('some styled

    single-char tag

    ')); + $this->assertEquals("\033[32msome \033[0m\033[32m\033[0m\033[32m styled \033[0m\033[32m

    \033[0m\033[32msingle-char tag\033[0m\033[32m

    \033[0m", $formatter->format('some styled

    single-char tag

    ')); } public function testFormatLongString() { $formatter = new OutputFormatter(true); $long = str_repeat("\\", 14000); - $this->assertEquals("\033[37;41msome error\033[39;49m".$long, $formatter->format('some error'.$long)); + $this->assertEquals("\033[37;41msome error\033[0m".$long, $formatter->format('some error'.$long)); } public function testNotDecoratedFormatter() @@ -186,16 +186,16 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter->setDecorated(true); $this->assertEquals( - "\033[37;41msome error\033[39;49m", $formatter->format('some error') + "\033[37;41msome error\033[0m", $formatter->format('some error') ); $this->assertEquals( - "\033[32msome info\033[39m", $formatter->format('some info') + "\033[32msome info\033[0m", $formatter->format('some info') ); $this->assertEquals( - "\033[33msome comment\033[39m", $formatter->format('some comment') + "\033[33msome comment\033[0m", $formatter->format('some comment') ); $this->assertEquals( - "\033[30;46msome question\033[39;49m", $formatter->format('some question') + "\033[30;46msome question\033[0m", $formatter->format('some question') ); } @@ -205,7 +205,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $this->assertEquals(<<format(<< @@ -215,7 +215,7 @@ EOF $this->assertEquals(<<format(<<some text @@ -226,7 +226,7 @@ EOF $this->assertEquals(<<format(<< @@ -239,7 +239,7 @@ EOF \033[32m some text more text -\033[39m +\033[0m EOF , $formatter->format(<< diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php index 88adf69..40d856f 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php @@ -192,19 +192,9 @@ class ProgressHelperTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->generateOutput(' 0/200 [>---------------------------] 0%').$this->generateOutput(' 199/200 [===========================>] 99%').$this->generateOutput(' 200/200 [============================] 100%'), stream_get_contents($output->getStream())); } - public function testNonDecoratedOutput() + protected function getOutputStream() { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream(false)); - $progress->advance(); - - rewind($output->getStream()); - $this->assertEquals('', stream_get_contents($output->getStream())); - } - - protected function getOutputStream($decorated = true) - { - return new StreamOutput(fopen('php://memory', 'r+', false), StreamOutput::VERBOSITY_NORMAL, $decorated); + return new StreamOutput(fopen('php://memory', 'r+', false)); } protected $lastMessagesLength; diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php index cfb4afe..95bbbe6 100644 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php @@ -113,7 +113,7 @@ class OutputTest extends \PHPUnit_Framework_TestCase $output->getFormatter()->setStyle('FOO', $fooStyle); $output->setDecorated(true); $output->writeln('foo'); - $this->assertEquals("\033[33;41;5mfoo\033[39;49;25m\n", $output->output, '->writeln() decorates the output'); + $this->assertEquals("\033[33;41;5mfoo\033[0m\n", $output->output, '->writeln() decorates the output'); } /** diff --git a/vendor/symfony/console/Symfony/Component/Console/composer.json b/vendor/symfony/console/Symfony/Component/Console/composer.json index e7a8e2f..77777aa 100644 --- a/vendor/symfony/console/Symfony/Component/Console/composer.json +++ b/vendor/symfony/console/Symfony/Component/Console/composer.json @@ -19,12 +19,10 @@ "php": ">=5.3.3" }, "require-dev": { - "symfony/event-dispatcher": "~2.1", - "psr/log": "~1.0" + "symfony/event-dispatcher": "~2.1" }, "suggest": { - "symfony/event-dispatcher": "", - "psr/log": "For using the console logger" + "symfony/event-dispatcher": "" }, "autoload": { "psr-0": { "Symfony\\Component\\Console\\": "" } @@ -33,7 +31,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/composer.json b/vendor/symfony/css-selector/Symfony/Component/CssSelector/composer.json index 5b4231d..1ab133f 100644 --- a/vendor/symfony/css-selector/Symfony/Component/CssSelector/composer.json +++ b/vendor/symfony/css-selector/Symfony/Component/CssSelector/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md b/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md index 776468f..84335a1 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md +++ b/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md @@ -1,13 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - -* added ExceptionHandler::setHandler() -* added UndefinedMethodFatalErrorHandler -* deprecated DummyException - 2.4.0 ----- diff --git a/vendor/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php b/vendor/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php index eb1be7a..67db200 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php @@ -14,72 +14,46 @@ namespace Symfony\Component\Debug; /** * Autoloader checking if the class is really defined in the file found. * - * The ClassLoader will wrap all registered autoloaders - * and will throw an exception if a file is found but does + * The ClassLoader will wrap all registered autoloaders providing a + * findFile method and will throw an exception if a file is found but does * not declare the class. * * @author Fabien Potencier * @author Christophe Coevoet - * @author Nicolas Grekas * * @api */ class DebugClassLoader { - private $classLoader; - private $isFinder; - private $wasFinder; - private static $caseCheck; + private $classFinder; /** * Constructor. * - * @param callable|object $classLoader + * @param object $classFinder * * @api - * @deprecated since 2.5, passing an object is deprecated and support for it will be removed in 3.0 */ - public function __construct($classLoader) + public function __construct($classFinder) { - $this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile'); - - if ($this->wasFinder) { - $this->classLoader = array($classLoader, 'loadClass'); - $this->isFinder = true; - } else { - $this->classLoader = $classLoader; - $this->isFinder = is_array($classLoader) && method_exists($classLoader[0], 'findFile'); - } - - if (!isset(self::$caseCheck)) { - self::$caseCheck = false !== stripos(PHP_OS, 'win') ? (false !== stripos(PHP_OS, 'darwin') ? 2 : 1) : 0; - } + $this->classFinder = $classFinder; } /** * Gets the wrapped class loader. * - * @return callable|object a class loader - * - * @deprecated since 2.5, returning an object is deprecated and support for it will be removed in 3.0 + * @return object a class loader instance */ public function getClassLoader() { - if ($this->wasFinder) { - return $this->classLoader[0]; - } else { - return $this->classLoader; - } + return $this->classFinder; } /** - * Wraps all autoloaders + * Replaces all autoloaders implementing a findFile method by a DebugClassLoader wrapper. */ public static function enable() { - // Ensures we don't hit https://bugs.php.net/42098 - class_exists(__NAMESPACE__.'\ErrorHandler', true); - if (!is_array($functions = spl_autoload_functions())) { return; } @@ -89,8 +63,8 @@ class DebugClassLoader } foreach ($functions as $function) { - if (!is_array($function) || !$function[0] instanceof self) { - $function = array(new static($function), 'loadClass'); + if (is_array($function) && !$function[0] instanceof self && method_exists($function[0], 'findFile')) { + $function = array(new static($function[0]), 'loadClass'); } spl_autoload_register($function); @@ -112,7 +86,7 @@ class DebugClassLoader foreach ($functions as $function) { if (is_array($function) && $function[0] instanceof self) { - $function = $function[0]->getClassLoader(); + $function[0] = $function[0]->getClassLoader(); } spl_autoload_register($function); @@ -125,14 +99,10 @@ class DebugClassLoader * @param string $class A class name to resolve to file * * @return string|null - * - * @deprecated Deprecated since 2.5, to be removed in 3.0. */ public function findFile($class) { - if ($this->wasFinder) { - return $this->classLoader[0]->findFile($class); - } + return $this->classFinder->findFile($class); } /** @@ -146,79 +116,16 @@ class DebugClassLoader */ public function loadClass($class) { - ErrorHandler::stackErrors(); - - try { - if ($this->isFinder) { - if ($file = $this->classLoader[0]->findFile($class)) { - require $file; - } - } else { - call_user_func($this->classLoader, $class); - $file = false; - } - } catch (\Exception $e) { - ErrorHandler::unstackErrors(); - - throw $e; - } + if ($file = $this->classFinder->findFile($class)) { + require $file; - ErrorHandler::unstackErrors(); - - $exists = class_exists($class, false) || interface_exists($class, false) || (function_exists('trait_exists') && trait_exists($class, false)); - - if ('\\' === $class[0]) { - $class = substr($class, 1); - } - - if ($exists) { - $refl = new \ReflectionClass($class); - $name = $refl->getName(); - - if ($name !== $class) { - throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: %s vs %s', $class, $name)); - } - } - - if ($file) { - if (!$exists) { + if (!class_exists($class, false) && !interface_exists($class, false) && (!function_exists('trait_exists') || !trait_exists($class, false))) { if (false !== strpos($class, '/')) { throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class)); } throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file)); } - if (self::$caseCheck && preg_match('#([/\\\\][a-zA-Z_\x7F-\xFF][a-zA-Z0-9_\x7F-\xFF]*)+\.(php|hh)$#D', $file, $tail)) { - $tail = $tail[0]; - $real = $refl->getFilename(); - - if (2 === self::$caseCheck) { - // realpath() on MacOSX doesn't normalize the case of characters - $cwd = getcwd(); - $basename = strrpos($real, '/'); - chdir(substr($real, 0, $basename)); - $basename = substr($real, $basename + 1); - // glob() patterns are case-sensitive even if the underlying fs is not - if (!in_array($basename, glob($basename.'*', GLOB_NOSORT), true)) { - $real = getcwd().'/'; - $h = opendir('.'); - while (false !== $f = readdir($h)) { - if (0 === strcasecmp($f, $basename)) { - $real .= $f; - break; - } - } - closedir($h); - } - chdir($cwd); - } - - if ( 0 === substr_compare($real, $tail, -strlen($tail), strlen($tail), true) - && 0 !== substr_compare($real, $tail, -strlen($tail), strlen($tail), false) - ) { - throw new \RuntimeException(sprintf('Case mismatch between class and source file names: %s vs %s', $class, $real)); - } - } return true; } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/ErrorHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/ErrorHandler.php index b0699f3..e865f37 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/ErrorHandler.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/ErrorHandler.php @@ -11,13 +11,11 @@ namespace Symfony\Component\Debug; -use Psr\Log\LogLevel; use Psr\Log\LoggerInterface; use Symfony\Component\Debug\Exception\ContextErrorException; use Symfony\Component\Debug\Exception\FatalErrorException; -use Symfony\Component\Debug\Exception\OutOfMemoryException; +use Symfony\Component\Debug\Exception\DummyException; use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; -use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; @@ -26,7 +24,6 @@ use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; * * @author Fabien Potencier * @author Konstantin Myakshin - * @author Nicolas Grekas */ class ErrorHandler { @@ -45,7 +42,7 @@ class ErrorHandler E_ERROR => 'Error', E_CORE_ERROR => 'Core Error', E_COMPILE_ERROR => 'Compile Error', - E_PARSE => 'Parse Error', + E_PARSE => 'Parse', ); private $level; @@ -59,10 +56,6 @@ class ErrorHandler */ private static $loggers = array(); - private static $stackedErrors = array(); - - private static $stackedErrorLevels = array(); - /** * Registers the error handler. * @@ -109,7 +102,7 @@ class ErrorHandler * Sets a logger for the given channel. * * @param LoggerInterface $logger A logger interface - * @param string $channel The channel associated with the logger (deprecation, emergency or scream) + * @param string $channel The channel associated with the logger (deprecation or emergency) */ public static function setLogger(LoggerInterface $logger, $channel = 'deprecation') { @@ -117,181 +110,113 @@ class ErrorHandler } /** - * @throws \ErrorException When error_reporting returns error + * @throws ContextErrorException When error_reporting returns error */ public function handle($level, $message, $file = 'unknown', $line = 0, $context = array()) { + if (0 === $this->level) { + return false; + } + if ($level & (E_USER_DEPRECATED | E_DEPRECATED)) { if (isset(self::$loggers['deprecation'])) { - if (self::$stackedErrorLevels) { - self::$stackedErrors[] = func_get_args(); + if (version_compare(PHP_VERSION, '5.4', '<')) { + $stack = array_map( + function ($row) { + unset($row['args']); + + return $row; + }, + array_slice(debug_backtrace(false), 0, 10) + ); } else { - if (version_compare(PHP_VERSION, '5.4', '<')) { - $stack = array_map( - function ($row) { - unset($row['args']); - - return $row; - }, - array_slice(debug_backtrace(false), 0, 10) - ); - } else { - $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10); - } - - self::$loggers['deprecation']->warning($message, array('type' => self::TYPE_DEPRECATION, 'stack' => $stack)); + $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10); } - return true; - } - } elseif ($this->displayErrors && error_reporting() & $level && $this->level & $level) { - if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && is_array($context)) { - $c = $context; // Whatever the signature of the method, - unset($c['GLOBALS'], $context); // $context is always a reference in 5.3 - $context = $c; - } - - $exception = sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line); - if ($context && class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { - // Checking for class existence is a work around for https://bugs.php.net/42098 - $exception = new ContextErrorException($exception, 0, $level, $file, $line, $context); - } else { - $exception = new \ErrorException($exception, 0, $level, $file, $line); + self::$loggers['deprecation']->warning($message, array('type' => self::TYPE_DEPRECATION, 'stack' => $stack)); } - if (PHP_VERSION_ID <= 50407 && (PHP_VERSION_ID >= 50400 || PHP_VERSION_ID <= 50317)) { - // Exceptions thrown from error handlers are sometimes not caught by the exception - // handler and shutdown handlers are bypassed before 5.4.8/5.3.18. - // We temporarily re-enable display_errors to prevent any blank page related to this bug. - - $exception->errorHandlerCanary = new ErrorHandlerCanary(); - } - - throw $exception; + return true; } - if (isset(self::$loggers['scream']) && !(error_reporting() & $level)) { - if (self::$stackedErrorLevels) { - self::$stackedErrors[] = func_get_args(); - } else { - switch ($level) { - case E_USER_ERROR: - case E_RECOVERABLE_ERROR: - $logLevel = LogLevel::ERROR; - break; - - case E_WARNING: - case E_USER_WARNING: - $logLevel = LogLevel::WARNING; - break; - - default: - $logLevel = LogLevel::NOTICE; - break; - } - - self::$loggers['scream']->log($logLevel, $message, array( - 'type' => $level, - 'file' => $file, - 'line' => $line, - 'scream' => error_reporting(), - )); + if ($this->displayErrors && error_reporting() & $level && $this->level & $level) { + // make sure the ContextErrorException class is loaded (https://bugs.php.net/bug.php?id=65322) + if (!class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { + require __DIR__.'/Exception/ContextErrorException.php'; + } + if (!class_exists('Symfony\Component\Debug\Exception\FlattenException')) { + require __DIR__.'/Exception/FlattenException.php'; } - } - return false; - } + if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && is_array($context)) { + unset($context['GLOBALS']); + } - /** - * Configure the error handler for delayed handling. - * Ensures also that non-catchable fatal errors are never silenced. - * - * As shown by http://bugs.php.net/42098 and http://bugs.php.net/60724 - * PHP has a compile stage where it behaves unusually. To workaround it, - * we plug an error handler that only stacks errors for later. - * - * The most important feature of this is to prevent - * autoloading until unstackErrors() is called. - */ - public static function stackErrors() - { - self::$stackedErrorLevels[] = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR); - } + $exception = new ContextErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line), 0, $level, $file, $line, $context); - /** - * Unstacks stacked errors and forwards to the regular handler - */ - public static function unstackErrors() - { - $level = array_pop(self::$stackedErrorLevels); + // Exceptions thrown from error handlers are sometimes not caught by the exception + // handler, so we invoke it directly (https://bugs.php.net/bug.php?id=54275) + $exceptionHandler = set_exception_handler(function () {}); + restore_exception_handler(); - if (null !== $level) { - $e = error_reporting($level); - if ($e !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) { - // If the user changed the error level, do not overwrite it - error_reporting($e); - } - } + if (is_array($exceptionHandler) && $exceptionHandler[0] instanceof ExceptionHandler) { + $exceptionHandler[0]->handle($exception); - if (empty(self::$stackedErrorLevels)) { - $errors = self::$stackedErrors; - self::$stackedErrors = array(); + if (!class_exists('Symfony\Component\Debug\Exception\DummyException')) { + require __DIR__.'/Exception/DummyException.php'; + } - $errorHandler = set_error_handler('var_dump'); - restore_error_handler(); + // we must stop the PHP script execution, as the exception has + // already been dealt with, so, let's throw an exception that + // will be caught by a dummy exception handler + set_exception_handler(function (\Exception $e) use ($exceptionHandler) { + if (!$e instanceof DummyException) { + // happens if our dummy exception is caught by a + // catch-all from user code, in which case, let's the + // current handler handle this "new" exception + call_user_func($exceptionHandler, $e); + } + }); - if ($errorHandler) { - foreach ($errors as $e) { - call_user_func_array($errorHandler, $e); - } + throw new DummyException(); } } + + return false; } public function handleFatal() { - $this->reservedMemory = ''; - gc_collect_cycles(); - $error = error_get_last(); - - // get current exception handler - $exceptionHandler = set_exception_handler('var_dump'); - restore_exception_handler(); - - try { - while (self::$stackedErrorLevels) { - static::unstackErrors(); - } - } catch (\Exception $exception) { - if ($exceptionHandler) { - call_user_func($exceptionHandler, $exception); - - return; - } - - if ($this->displayErrors) { - ini_set('display_errors', 1); - } - - throw $exception; + if (null === $error = error_get_last()) { + return; } - if (!$error || !$this->level || !($error['type'] & (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_PARSE))) { + $this->reservedMemory = ''; + $type = $error['type']; + if (0 === $this->level || !in_array($type, array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE))) { return; } if (isset(self::$loggers['emergency'])) { $fatal = array( - 'type' => $error['type'], + 'type' => $type, 'file' => $error['file'], 'line' => $error['line'], ); - self::$loggers['emergency']->emergency($error['message'], $fatal); + self::$loggers['emergency']->emerg($error['message'], $fatal); } - if ($this->displayErrors && $exceptionHandler) { - $this->handleFatalError($exceptionHandler, $error); + if (!$this->displayErrors) { + return; + } + + // get current exception handler + $exceptionHandler = set_exception_handler(function () {}); + restore_exception_handler(); + + if (is_array($exceptionHandler) && $exceptionHandler[0] instanceof ExceptionHandler) { + $this->handleFatalError($exceptionHandler[0], $error); } } @@ -306,64 +231,22 @@ class ErrorHandler { return array( new UndefinedFunctionFatalErrorHandler(), - new UndefinedMethodFatalErrorHandler(), new ClassNotFoundFatalErrorHandler(), ); } - private function handleFatalError($exceptionHandler, array $error) + private function handleFatalError(ExceptionHandler $exceptionHandler, array $error) { - // Let PHP handle any further error - set_error_handler('var_dump', 0); - ini_set('display_errors', 1); - $level = isset($this->levels[$error['type']]) ? $this->levels[$error['type']] : $error['type']; $message = sprintf('%s: %s in %s line %d', $level, $error['message'], $error['file'], $error['line']); - if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) { - $exception = new OutOfMemoryException($message, 0, $error['type'], $error['file'], $error['line'], 3, false); - } else { - $exception = new FatalErrorException($message, 0, $error['type'], $error['file'], $error['line'], 3, true); - - foreach ($this->getFatalErrorHandlers() as $handler) { - if ($e = $handler->handleError($error, $exception)) { - $exception = $e; - break; - } - } - } - - try { - call_user_func($exceptionHandler, $exception); - } catch (\Exception $e) { - // The handler failed. Let PHP handle that now. - throw $exception; - } - } -} - -/** - * Private class used to work around https://bugs.php.net/54275 - * - * @author Nicolas Grekas - * - * @internal - */ -class ErrorHandlerCanary -{ - private static $displayErrors = null; + $exception = new FatalErrorException($message, 0, $error['type'], $error['file'], $error['line']); - public function __construct() - { - if (null === self::$displayErrors) { - self::$displayErrors = ini_set('display_errors', 1); + foreach ($this->getFatalErrorHandlers() as $handler) { + if ($ex = $handler->handleError($error, $exception)) { + return $exceptionHandler->handle($ex); + } } - } - public function __destruct() - { - if (null !== self::$displayErrors) { - ini_set('display_errors', self::$displayErrors); - self::$displayErrors = null; - } + $exceptionHandler->handle($exception); } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php index b91bf46..94169b4 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php @@ -28,6 +28,5 @@ class ClassNotFoundException extends FatalErrorException $previous->getLine(), $previous->getPrevious() ); - $this->setTrace($previous->getTrace()); } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php index 967e033..8891f2f 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Debug\Exception; /** - * @author Fabien Potencier + * Used to stop execution of a PHP script after handling a fatal error. * - * @deprecated since version 2.5, to be removed in 3.0. + * @author Fabien Potencier */ class DummyException extends \ErrorException { diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php index d5b5846..bf37ef8 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php @@ -14,58 +14,8 @@ namespace Symfony\Component\Debug\Exception; /** * Fatal Error Exception. * - * @author Fabien Potencier * @author Konstanton Myakshin - * @author Nicolas Grekas */ class FatalErrorException extends \ErrorException { - public function __construct($message, $code, $severity, $filename, $lineno, $traceOffset = null, $traceArgs = true) - { - parent::__construct($message, $code, $severity, $filename, $lineno); - - if (null !== $traceOffset) { - if (function_exists('xdebug_get_function_stack')) { - $trace = xdebug_get_function_stack(); - if (0 < $traceOffset) { - array_splice($trace, -$traceOffset); - } - - foreach ($trace as &$frame) { - if (!isset($frame['type'])) { - // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695 - if (isset($frame['class'])) { - $frame['type'] = '::'; - } - } elseif ('dynamic' === $frame['type']) { - $frame['type'] = '->'; - } elseif ('static' === $frame['type']) { - $frame['type'] = '::'; - } - - // XDebug also has a different name for the parameters array - if (!$traceArgs) { - unset($frame['params'], $frame['args']); - } elseif (isset($frame['params']) && !isset($frame['args'])) { - $frame['args'] = $frame['params']; - unset($frame['params']); - } - } - - unset($frame); - $trace = array_reverse($trace); - } else { - $trace = array(); - } - - $this->setTrace($trace); - } - } - - protected function setTrace($trace) - { - $traceReflector = new \ReflectionProperty('Exception', 'trace'); - $traceReflector->setAccessible(true); - $traceReflector->setValue($this, $trace); - } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php index eb49d46..878ac4d 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php @@ -172,7 +172,36 @@ class FlattenException public function setTraceFromException(\Exception $exception) { - $this->setTrace($exception->getTrace(), $exception->getFile(), $exception->getLine()); + $trace = $exception->getTrace(); + + if ($exception instanceof FatalErrorException) { + if (function_exists('xdebug_get_function_stack')) { + $trace = array_slice(array_reverse(xdebug_get_function_stack()), 4); + + foreach ($trace as $i => $frame) { + // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695 + if (!isset($frame['type'])) { + $trace[$i]['type'] = '??'; + } + + if ('dynamic' === $trace[$i]['type']) { + $trace[$i]['type'] = '->'; + } elseif ('static' === $trace[$i]['type']) { + $trace[$i]['type'] = '::'; + } + + // XDebug also has a different name for the parameters array + if (isset($frame['params']) && !isset($frame['args'])) { + $trace[$i]['args'] = $frame['params']; + unset($trace[$i]['params']); + } + } + } else { + $trace = array_slice(array_reverse($trace), 1); + } + } + + $this->setTrace($trace, $exception->getFile(), $exception->getLine()); } public function setTrace($trace, $file, $line) diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php index a66ae2a..572c8b3 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php @@ -28,6 +28,5 @@ class UndefinedFunctionException extends FatalErrorException $previous->getLine(), $previous->getPrevious() ); - $this->setTrace($previous->getTrace()); } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php index bfbd783..9688c71 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Debug; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Debug\Exception\FlattenException; -use Symfony\Component\Debug\Exception\OutOfMemoryException; if (!defined('ENT_SUBSTITUTE')) { define('ENT_SUBSTITUTE', 8); @@ -34,8 +33,6 @@ class ExceptionHandler { private $debug; private $charset; - private $handler; - private $caughtOutput = 0; public function __construct($debug = true, $charset = 'UTF-8') { @@ -60,86 +57,23 @@ class ExceptionHandler } /** - * Sets a user exception handler. - * - * @param callable $handler An handler that will be called on Exception - * - * @return callable|null The previous exception handler if any - */ - public function setHandler($handler) - { - if (isset($handler) && !is_callable($handler)) { - throw new \LogicException('The exception handler must be a valid PHP callable.'); - } - $old = $this->handler; - $this->handler = $handler; - - return $old; - } - - /** - * {@inheritdoc} - * * Sends a response for the given Exception. * * If you have the Symfony HttpFoundation component installed, * this method will use it to create and send the response. If not, * it will fallback to plain PHP functions. * + * @param \Exception $exception An \Exception instance + * * @see sendPhpResponse * @see createResponse */ public function handle(\Exception $exception) { - if ($exception instanceof OutOfMemoryException) { + if (class_exists('Symfony\Component\HttpFoundation\Response')) { + $this->createResponse($exception)->send(); + } else { $this->sendPhpResponse($exception); - - return; - } - - // To be as fail-safe as possible, the exception is first handled - // by our simple exception handler, then by the user exception handler. - // The latter takes precedence and any output from the former is cancelled, - // if and only if nothing bad happens in this handling path. - - $caughtOutput = 0; - - $this->caughtOutput = false; - ob_start(array($this, 'catchOutput')); - try { - if (class_exists('Symfony\Component\HttpFoundation\Response')) { - $response = $this->createResponse($exception); - $response->sendHeaders(); - $response->sendContent(); - } else { - $this->sendPhpResponse($exception); - } - } catch (\Exception $e) { - // Ignore this $e exception, we have to deal with $exception - } - if (false === $this->caughtOutput) { - ob_end_clean(); - } - if (isset($this->caughtOutput[0])) { - ob_start(array($this, 'cleanOutput')); - echo $this->caughtOutput; - $caughtOutput = ob_get_length(); - } - $this->caughtOutput = 0; - - if (!empty($this->handler)) { - try { - call_user_func($this->handler, $exception); - - if ($caughtOutput) { - $this->caughtOutput = $caughtOutput; - } - } catch (\Exception $e) { - if (!$caughtOutput) { - // All handlers failed. Let PHP handle that now. - throw $exception; - } - } } } @@ -381,30 +315,4 @@ EOF; return implode(', ', $result); } - - /** - * @internal - */ - public function catchOutput($buffer) - { - $this->caughtOutput = $buffer; - - return ''; - } - - /** - * @internal - */ - public function cleanOutput($buffer) - { - if ($this->caughtOutput) { - // use substr_replace() instead of substr() for mbstring overloading resistance - $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtOutput); - if (isset($cleanBuffer[0])) { - $buffer = $cleanBuffer; - } - } - - return $buffer; - } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php index f25fd90..1554a81 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -103,17 +103,8 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface } // get class loaders wrapped by DebugClassLoader - if ($function[0] instanceof DebugClassLoader) { - $function = $function[0]->getClassLoader(); - - // Since 2.5, returning an object from DebugClassLoader::getClassLoader() is @deprecated - if (is_object($function)) { - $function = array($function); - } - - if (!is_array($function)) { - continue; - } + if ($function[0] instanceof DebugClassLoader && method_exists($function[0], 'getClassLoader')) { + $function[0] = $function[0]->getClassLoader(); } if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) { diff --git a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php index f460c66..4b6fc90 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php @@ -80,7 +80,6 @@ class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface } if ($candidates) { - sort($candidates); $message .= ' Did you mean to call: '.implode(', ', array_map(function ($val) { return '"'.$val.'"'; }, $candidates)).'?'; diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php index 12224e0..a18e581 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php @@ -12,144 +12,45 @@ namespace Symfony\Component\Debug\Tests; use Symfony\Component\Debug\DebugClassLoader; -use Symfony\Component\Debug\ErrorHandler; -use Symfony\Component\Debug\Exception\ContextErrorException; class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase { - /** - * @var int Error reporting level before running tests. - */ - private $errorReporting; - private $loader; protected function setUp() { - $this->errorReporting = error_reporting(E_ALL | E_STRICT); $this->loader = new ClassLoader(); - spl_autoload_register(array($this->loader, 'loadClass'), true, true); - DebugClassLoader::enable(); + spl_autoload_register(array($this->loader, 'loadClass')); } protected function tearDown() { - DebugClassLoader::disable(); spl_autoload_unregister(array($this->loader, 'loadClass')); - error_reporting($this->errorReporting); } public function testIdempotence() { DebugClassLoader::enable(); + DebugClassLoader::enable(); $functions = spl_autoload_functions(); foreach ($functions as $function) { if (is_array($function) && $function[0] instanceof DebugClassLoader) { $reflClass = new \ReflectionClass($function[0]); - $reflProp = $reflClass->getProperty('classLoader'); + $reflProp = $reflClass->getProperty('classFinder'); $reflProp->setAccessible(true); $this->assertNotInstanceOf('Symfony\Component\Debug\DebugClassLoader', $reflProp->getValue($function[0])); + DebugClassLoader::disable(); + return; } } - $this->fail('DebugClassLoader did not register'); - } - - public function testUnsilencing() - { - ob_start(); - $bak = array( - ini_set('log_errors', 0), - ini_set('display_errors', 1), - ); - - // See below: this will fail with parse error - // but this should not be @-silenced. - @class_exists(__NAMESPACE__.'\TestingUnsilencing', true); - - ini_set('log_errors', $bak[0]); - ini_set('display_errors', $bak[1]); - $output = ob_get_clean(); - - $this->assertStringMatchesFormat('%aParse error%a', $output); - } - - public function testStacking() - { - // the ContextErrorException must not be loaded to test the workaround - // for https://bugs.php.net/65322. - if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) { - $this->markTestSkipped('The ContextErrorException class is already loaded.'); - } - - ErrorHandler::register(); - - try { - // Trigger autoloading + E_STRICT at compile time - // which in turn triggers $errorHandler->handle() - // that again triggers autoloading for ContextErrorException. - // Error stacking works around the bug above and everything is fine. - - eval(' - namespace '.__NAMESPACE__.'; - class ChildTestingStacking extends TestingStacking { function foo($bar) {} } - '); - $this->fail('ContextErrorException expected'); - } catch (\ErrorException $exception) { - // if an exception is thrown, the test passed - restore_error_handler(); - restore_exception_handler(); - $this->assertEquals(E_STRICT, $exception->getSeverity()); - $this->assertStringStartsWith(__FILE__, $exception->getFile()); - $this->assertRegexp('/^Runtime Notice: Declaration/', $exception->getMessage()); - } catch (\Exception $e) { - restore_error_handler(); - restore_exception_handler(); - - throw $e; - } - } - - /** - * @expectedException \RuntimeException - */ - public function testNameCaseMismatch() - { - class_exists(__NAMESPACE__.'\TestingCaseMismatch', true); - } - - /** - * @expectedException \RuntimeException - */ - public function testFileCaseMismatch() - { - if (!file_exists(__DIR__.'/Fixtures/CaseMismatch.php')) { - $this->markTestSkipped('Can only be run on case insensitive filesystems'); - } - - class_exists(__NAMESPACE__.'\Fixtures\CaseMismatch', true); - } - - /** - * @expectedException \RuntimeException - */ - public function testPsr4CaseMismatch() - { - class_exists(__NAMESPACE__.'\Fixtures\Psr4CaseMismatch', true); - } - - public function testNotPsr0() - { - $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\NotPSR0', true)); - } + DebugClassLoader::disable(); - public function testNotPsr0Bis() - { - $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\NotPSR0bis', true)); + $this->fail('DebugClassLoader did not register'); } } @@ -159,27 +60,7 @@ class ClassLoader { } - public function getClassMap() - { - return array(__NAMESPACE__.'\Fixtures\NotPSR0bis' => __DIR__.'/Fixtures/notPsr0Bis.php'); - } - public function findFile($class) { - if (__NAMESPACE__.'\TestingUnsilencing' === $class) { - eval('-- parse error --'); - } elseif (__NAMESPACE__.'\TestingStacking' === $class) { - eval('namespace '.__NAMESPACE__.'; class TestingStacking { function foo() {} }'); - } elseif (__NAMESPACE__.'\TestingCaseMismatch' === $class) { - eval('namespace '.__NAMESPACE__.'; class TestingCaseMisMatch {}'); - } elseif (__NAMESPACE__.'\Fixtures\CaseMismatch' === $class) { - return __DIR__.'/Fixtures/CaseMismatch.php'; - } elseif (__NAMESPACE__.'\Fixtures\Psr4CaseMismatch' === $class) { - return __DIR__.'/Fixtures/psr4/Psr4CaseMismatch.php'; - } elseif (__NAMESPACE__.'\Fixtures\NotPSR0' === $class) { - return __DIR__.'/Fixtures/reallyNotPsr0.php'; - } elseif (__NAMESPACE__.'\Fixtures\NotPSR0bis' === $class) { - return __DIR__.'/Fixtures/notPsr0Bis.php'; - } } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/ErrorHandlerTest.php index 4765285..e764b4d 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Debug\Tests; use Symfony\Component\Debug\ErrorHandler; -use Symfony\Component\Debug\Exception\ContextErrorException; +use Symfony\Component\Debug\Exception\DummyException; /** * ErrorHandlerTest @@ -44,35 +44,104 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase error_reporting($this->errorReporting); } - public function testNotice() + public function testCompileTimeError() { + // the ContextErrorException must not be loaded to test the workaround + // for https://bugs.php.net/bug.php?id=65322. + if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) { + $this->markTestSkipped('The ContextErrorException class is already loaded.'); + } + + $exceptionHandler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('handle')); + + // the following code forces some PHPUnit classes to be loaded + // so that they will be available in the exception handler + // as they won't be autoloaded by PHP + class_exists('PHPUnit_Framework_MockObject_Invocation_Object'); + $this->assertInstanceOf('stdClass', new \stdClass()); + $this->assertEquals(1, 1); + $this->assertStringStartsWith('foo', 'foobar'); + $this->assertArrayHasKey('bar', array('bar' => 'foo')); + + $that = $this; + $exceptionCheck = function ($exception) use ($that) { + $that->assertInstanceOf('Symfony\Component\Debug\Exception\ContextErrorException', $exception); + $that->assertEquals(E_STRICT, $exception->getSeverity()); + $that->assertEquals(2, $exception->getLine()); + $that->assertStringStartsWith('Runtime Notice: Declaration of _CompileTimeError::foo() should be compatible with', $exception->getMessage()); + $that->assertArrayHasKey('bar', $exception->getContext()); + }; + + $exceptionHandler->expects($this->once()) + ->method('handle') + ->will($this->returnCallback($exceptionCheck)) + ; + ErrorHandler::register(); + set_exception_handler(array($exceptionHandler, 'handle')); + + // dummy variable to check for in error handler. + $bar = 123; + // trigger compile time error try { - self::triggerNotice($this); - $this->fail('ContextErrorException expected'); - } catch (ContextErrorException $exception) { + eval(<<<'PHP' +class _BaseCompileTimeError { function foo() {} } +class _CompileTimeError extends _BaseCompileTimeError { function foo($invalid) {} } +PHP + ); + } catch (DummyException $e) { // if an exception is thrown, the test passed + } catch (\Exception $e) { restore_error_handler(); - $this->assertEquals(E_NOTICE, $exception->getSeverity()); - $this->assertEquals(__FILE__, $exception->getFile()); - $this->assertRegexp('/^Notice: Undefined variable: (foo|bar)/', $exception->getMessage()); - $this->assertArrayHasKey('foobar', $exception->getContext()); + restore_exception_handler(); + + throw $e; + } + + restore_error_handler(); + restore_exception_handler(); + } + + public function testNotice() + { + $exceptionHandler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('handle')); + set_exception_handler(array($exceptionHandler, 'handle')); + + $that = $this; + $exceptionCheck = function ($exception) use ($that) { + $that->assertInstanceOf('Symfony\Component\Debug\Exception\ContextErrorException', $exception); + $that->assertEquals(E_NOTICE, $exception->getSeverity()); + $that->assertEquals(__LINE__ + 44, $exception->getLine()); + $that->assertEquals(__FILE__, $exception->getFile()); + $that->assertRegexp('/^Notice: Undefined variable: (foo|bar)/', $exception->getMessage()); + $that->assertArrayHasKey('foobar', $exception->getContext()); $trace = $exception->getTrace(); - $this->assertEquals(__FILE__, $trace[0]['file']); - $this->assertEquals('Symfony\Component\Debug\ErrorHandler', $trace[0]['class']); - $this->assertEquals('handle', $trace[0]['function']); - $this->assertEquals('->', $trace[0]['type']); - - $this->assertEquals(__FILE__, $trace[1]['file']); - $this->assertEquals(__CLASS__, $trace[1]['class']); - $this->assertEquals('triggerNotice', $trace[1]['function']); - $this->assertEquals('::', $trace[1]['type']); - - $this->assertEquals(__CLASS__, $trace[2]['class']); - $this->assertEquals('testNotice', $trace[2]['function']); - $this->assertEquals('->', $trace[2]['type']); + $that->assertEquals(__FILE__, $trace[0]['file']); + $that->assertEquals('Symfony\Component\Debug\ErrorHandler', $trace[0]['class']); + $that->assertEquals('handle', $trace[0]['function']); + $that->assertEquals('->', $trace[0]['type']); + + $that->assertEquals(__FILE__, $trace[1]['file']); + $that->assertEquals(__CLASS__, $trace[1]['class']); + $that->assertEquals('triggerNotice', $trace[1]['function']); + $that->assertEquals('::', $trace[1]['type']); + + $that->assertEquals(__CLASS__, $trace[2]['class']); + $that->assertEquals('testNotice', $trace[2]['function']); + $that->assertEquals('->', $trace[2]['type']); + }; + + $exceptionHandler->expects($this->once()) + ->method('handle') + ->will($this->returnCallback($exceptionCheck)); + ErrorHandler::register(); + + try { + self::triggerNotice($this); + } catch (DummyException $e) { + // if an exception is thrown, the test passed } catch (\Exception $e) { restore_error_handler(); @@ -134,12 +203,12 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase restore_error_handler(); $handler = ErrorHandler::register(E_USER_DEPRECATED); - $this->assertFalse($handler->handle(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertTrue($handler->handle(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); restore_error_handler(); $handler = ErrorHandler::register(E_DEPRECATED); - $this->assertFalse($handler->handle(E_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertTrue($handler->handle(E_DEPRECATED, 'foo', 'foo.php', 12, array())); restore_error_handler(); @@ -162,29 +231,7 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase $handler = ErrorHandler::register(E_USER_DEPRECATED); $handler->setLogger($logger); - $this->assertTrue($handler->handle(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); - - restore_error_handler(); - - $logger = $this->getMock('Psr\Log\LoggerInterface'); - - $that = $this; - $logArgCheck = function ($level, $message, $context) use ($that) { - $that->assertEquals('Undefined variable: undefVar', $message); - $that->assertArrayHasKey('type', $context); - $that->assertEquals($context['type'], E_NOTICE); - }; - - $logger - ->expects($this->once()) - ->method('log') - ->will($this->returnCallback($logArgCheck)) - ; - - $handler = ErrorHandler::register(E_NOTICE); - $handler->setLogger($logger, 'scream'); - unset($undefVar); - @$undefVar++; + $handler->handle(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array()); restore_error_handler(); } catch (\Exception $e) { @@ -204,11 +251,10 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase $m = new \ReflectionMethod($handler, 'handleFatalError'); $m->setAccessible(true); - $m->invoke($handler, array($exceptionHandler, 'handle'), $error); + $m->invoke($handler, $exceptionHandler, $error); $this->assertInstanceof($class, $exceptionHandler->e); - // class names are case insensitive and PHP/HHVM do not return the same - $this->assertSame(strtolower($translatedMessage), strtolower($exceptionHandler->e->getMessage())); + $this->assertSame($translatedMessage, $exceptionHandler->e->getMessage()); $this->assertSame($error['type'], $exceptionHandler->e->getSeverity()); $this->assertSame($error['file'], $exceptionHandler->e->getFile()); $this->assertSame($error['line'], $exceptionHandler->e->getLine()); diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php index 27d50ff..511f204 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php @@ -25,8 +25,7 @@ class UndefinedFunctionFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); $this->assertInstanceof('Symfony\Component\Debug\Exception\UndefinedFunctionException', $exception); - // class names are case insensitive and PHP/HHVM do not return the same - $this->assertSame(strtolower($translatedMessage), strtolower($exception->getMessage())); + $this->assertSame($translatedMessage, $exception->getMessage()); $this->assertSame($error['type'], $exception->getSeverity()); $this->assertSame($error['file'], $exception->getFile()); $this->assertSame($error['line'], $exception->getLine()); diff --git a/vendor/symfony/debug/Symfony/Component/Debug/composer.json b/vendor/symfony/debug/Symfony/Component/Debug/composer.json index b9cd2d3..17dcb3e 100644 --- a/vendor/symfony/debug/Symfony/Component/Debug/composer.json +++ b/vendor/symfony/debug/Symfony/Component/Debug/composer.json @@ -33,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/CHANGELOG.md b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/CHANGELOG.md index 48fd323..bc51805 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/CHANGELOG.md +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/CHANGELOG.md @@ -1,15 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - -* [BC BREAK] The default value for checkbox and radio inputs without a value attribute have changed - from '1' to 'on' to match the HTML specification. -* [BC BREAK] The typehints on the `Link`, `Form` and `FormField` classes have been changed from - `\DOMNode` to `DOMElement`. Using any other type of `DOMNode` was triggering fatal errors in previous - versions. Code extending these classes will need to update the typehints when overwriting these methods. - 2.4.0 ----- diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php index 54b5216..ba209ab 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php @@ -14,7 +14,7 @@ namespace Symfony\Component\DomCrawler; use Symfony\Component\CssSelector\CssSelector; /** - * Crawler eases navigation of a list of \DOMElement objects. + * Crawler eases navigation of a list of \DOMNode objects. * * @author Fabien Potencier * @@ -637,7 +637,9 @@ class Crawler extends \SplObjectStorage public function filter($selector) { if (!class_exists('Symfony\\Component\\CssSelector\\CssSelector')) { + // @codeCoverageIgnoreStart throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector is not installed (you can use filterXPath instead).'); + // @codeCoverageIgnoreEnd } // The CssSelector already prefixes the selector with descendant-or-self:: @@ -909,7 +911,9 @@ class Crawler extends \SplObjectStorage if ($i == $position) { return $node; } + // @codeCoverageIgnoreStart } + // @codeCoverageIgnoreEnd } /** diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php index 56e74dc..9af67c1 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php @@ -161,11 +161,11 @@ class ChoiceFormField extends FormField * * This method should only be used internally. * - * @param \DOMElement $node + * @param \DOMNode $node A \DOMNode * * @throws \LogicException When choice provided is not multiple nor radio */ - public function addChoice(\DOMElement $node) + public function addChoice(\DOMNode $node) { if (!$this->multiple && 'radio' !== $this->type) { throw new \LogicException(sprintf('Unable to add a choice for "%s" as it is not multiple or is not a radio button.', $this->name)); @@ -259,15 +259,15 @@ class ChoiceFormField extends FormField /** * Returns option value with associated disabled flag * - * @param \DOMElement $node + * @param \DOMNode $node * * @return array */ - private function buildOptionValue(\DOMElement $node) + private function buildOptionValue($node) { $option = array(); - $defaultValue = (isset($node->nodeValue) && !empty($node->nodeValue)) ? $node->nodeValue : 'on'; + $defaultValue = (isset($node->nodeValue) && !empty($node->nodeValue)) ? $node->nodeValue : '1'; $option['value'] = $node->hasAttribute('value') ? $node->getAttribute('value') : $defaultValue; $option['disabled'] = $node->hasAttribute('disabled'); diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php index 785e301..9db4335 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php @@ -19,7 +19,7 @@ namespace Symfony\Component\DomCrawler\Field; abstract class FormField { /** - * @var \DOMElement + * @var \DOMNode */ protected $node; /** @@ -46,9 +46,9 @@ abstract class FormField /** * Constructor. * - * @param \DOMElement $node The node associated with this field + * @param \DOMNode $node The node associated with this field */ - public function __construct(\DOMElement $node) + public function __construct(\DOMNode $node) { $this->node = $node; $this->name = $node->getAttribute('name'); diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php index 8770c40..e8faf49 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php @@ -23,7 +23,7 @@ use Symfony\Component\DomCrawler\Field\FormField; class Form extends Link implements \ArrayAccess { /** - * @var \DOMElement + * @var \DOMNode */ private $button; @@ -35,15 +35,15 @@ class Form extends Link implements \ArrayAccess /** * Constructor. * - * @param \DOMElement $node A \DOMElement instance - * @param string $currentUri The URI of the page where the form is embedded - * @param string $method The method to use for the link (if null, it defaults to the method defined by the form) + * @param \DOMNode $node A \DOMNode instance + * @param string $currentUri The URI of the page where the form is embedded + * @param string $method The method to use for the link (if null, it defaults to the method defined by the form) * * @throws \LogicException if the node is not a button inside a form tag * * @api */ - public function __construct(\DOMElement $node, $currentUri, $method = null) + public function __construct(\DOMNode $node, $currentUri, $method = null) { parent::__construct($node, $currentUri, $method); @@ -53,7 +53,7 @@ class Form extends Link implements \ArrayAccess /** * Gets the form node associated with this form. * - * @return \DOMElement A \DOMElement instance + * @return \DOMNode A \DOMNode instance */ public function getFormNode() { @@ -359,13 +359,13 @@ class Form extends Link implements \ArrayAccess /** * Sets the node for the form. * - * Expects a 'submit' button \DOMElement and finds the corresponding form element, or the form element itself. + * Expects a 'submit' button \DOMNode and finds the corresponding form element. * - * @param \DOMElement $node A \DOMElement instance + * @param \DOMNode $node A \DOMNode instance * * @throws \LogicException If given node is not a button or input or does not have a form ancestor */ - protected function setNode(\DOMElement $node) + protected function setNode(\DOMNode $node) { $this->button = $node; if ('button' === $node->nodeName || ('input' === $node->nodeName && in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image')))) { @@ -446,7 +446,7 @@ class Form extends Link implements \ArrayAccess } } - private function addField(\DOMElement $node) + private function addField(\DOMNode $node) { if (!$node->hasAttribute('name') || !$node->getAttribute('name')) { return; diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php index 9ddf2b2..05d5e92 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php @@ -21,7 +21,7 @@ namespace Symfony\Component\DomCrawler; class Link { /** - * @var \DOMElement + * @var \DOMNode A \DOMNode instance */ protected $node; /** @@ -36,15 +36,15 @@ class Link /** * Constructor. * - * @param \DOMElement $node A \DOMElement instance - * @param string $currentUri The URI of the page where the link is embedded (or the base href) - * @param string $method The method to use for the link (get by default) + * @param \DOMNode $node A \DOMNode instance + * @param string $currentUri The URI of the page where the link is embedded (or the base href) + * @param string $method The method to use for the link (get by default) * * @throws \InvalidArgumentException if the node is not a link * * @api */ - public function __construct(\DOMElement $node, $currentUri, $method = 'GET') + public function __construct(\DOMNode $node, $currentUri, $method = 'GET') { if (!in_array(strtolower(substr($currentUri, 0, 4)), array('http', 'file'))) { throw new \InvalidArgumentException(sprintf('Current URI must be an absolute URL ("%s").', $currentUri)); @@ -58,7 +58,7 @@ class Link /** * Gets the node associated with this link. * - * @return \DOMElement A \DOMElement instance + * @return \DOMNode A \DOMNode instance */ public function getNode() { @@ -180,13 +180,13 @@ class Link } /** - * Sets current \DOMElement instance. + * Sets current \DOMNode instance. * - * @param \DOMElement $node A \DOMElement instance + * @param \DOMNode $node A \DOMNode instance * * @throws \LogicException If given node is not an anchor */ - protected function setNode(\DOMElement $node) + protected function setNode(\DOMNode $node) { if ('a' !== $node->nodeName && 'area' !== $node->nodeName) { throw new \LogicException(sprintf('Unable to click on a "%s" tag.', $node->nodeName)); diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/CrawlerTest.php index 15bcb7d..44c3a56 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/CrawlerTest.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/CrawlerTest.php @@ -47,7 +47,7 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase $crawler = new Crawler(); $crawler->add($this->createNodeList()->item(0)); - $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from a \DOMElement'); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from an \DOMNode'); $crawler = new Crawler(); $crawler->add('Foo'); @@ -284,7 +284,7 @@ EOF $crawler = new Crawler(); $crawler->addNode($this->createNodeList()->item(0)); - $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNode() adds nodes from a \DOMElement'); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNode() adds nodes from an \DOMNode'); } public function testClear() diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php index 9b31945..c2970f6 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php @@ -221,7 +221,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $this->assertNull($field->getValue(), '->getValue() returns null if the checkbox is not checked'); $this->assertFalse($field->isMultiple(), '->hasValue() returns false for checkboxes'); try { - $field->addChoice(new \DOMElement('input')); + $field->addChoice(new \DOMNode()); $this->fail('->addChoice() throws a \LogicException for checkboxes'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException for checkboxes'); @@ -231,7 +231,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $field = new ChoiceFormField($node); $this->assertTrue($field->hasValue(), '->hasValue() returns true when the checkbox is checked'); - $this->assertEquals('on', $field->getValue(), '->getValue() returns 1 if the checkbox is checked and has no value attribute'); + $this->assertEquals('1', $field->getValue(), '->getValue() returns 1 if the checkbox is checked and has no value attribute'); $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked', 'value' => 'foo')); $field = new ChoiceFormField($node); @@ -279,7 +279,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name')); $field = new ChoiceFormField($node); $field->tick(); - $this->assertEquals('on', $field->getValue(), '->tick() ticks checkboxes'); + $this->assertEquals(1, $field->getValue(), '->tick() ticks checkboxes'); } public function testUntick() @@ -305,7 +305,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked')); $field = new ChoiceFormField($node); $field->select(true); - $this->assertEquals('on', $field->getValue(), '->select() changes the value of the field'); + $this->assertEquals(1, $field->getValue(), '->select() changes the value of the field'); $field->select(false); $this->assertNull($field->getValue(), '->select() changes the value of the field'); diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/composer.json b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/composer.json index 0246346..2040ddc 100644 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/composer.json +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md b/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md index f1dd7d5..7ad2308 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md +++ b/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md @@ -1,10 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - * added support for GLOB_BRACE in the paths passed to Finder::in() - 2.3.0 ----- diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Finder.php b/vendor/symfony/finder/Symfony/Component/Finder/Finder.php index f8fa71f..db4d851 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Finder.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Finder.php @@ -661,7 +661,7 @@ class Finder implements \IteratorAggregate, \Countable foreach ((array) $dirs as $dir) { if (is_dir($dir)) { $resolvedDirs[] = $dir; - } elseif ($glob = glob($dir, GLOB_BRACE | GLOB_ONLYDIR)) { + } elseif ($glob = glob($dir, GLOB_ONLYDIR)) { $resolvedDirs = array_merge($resolvedDirs, $glob); } else { throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir)); diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php index 958f843..bad682e 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php @@ -44,6 +44,10 @@ class DateRangeFilterIterator extends FilterIterator { $fileinfo = $this->current(); + if (!$fileinfo->isFile()) { + return true; + } + $filedate = $fileinfo->getMTime(); foreach ($this->comparators as $compare) { if (!$compare->test($filedate)) { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php index 0b7a6b7..a42b0d7 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php @@ -336,17 +336,6 @@ class FinderTest extends Iterator\RealIteratorTestCase /** * @dataProvider getAdaptersTestData */ - public function testInWithGlobBrace($adapter) - { - $finder = $this->buildFinder($adapter); - $finder->in(array(__DIR__.'/Fixtures/{A,copy/A}/B/C'))->getIterator(); - - $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); - } - - /** - * @dataProvider getAdaptersTestData - */ public function testGetIterator($adapter) { $finder = $this->buildFinder($adapter); diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php index 008f966..18896d5 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php @@ -57,8 +57,12 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase ); $untilLastMonth = array( + '.git', + 'foo', 'foo/bar.tmp', 'test.php', + 'toto', + '.foo', ); return array( diff --git a/vendor/symfony/finder/Symfony/Component/Finder/composer.json b/vendor/symfony/finder/Symfony/Component/Finder/composer.json index b6e6997..7de4713 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/composer.json +++ b/vendor/symfony/finder/Symfony/Component/Finder/composer.json @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md index 0da734b..061d47e 100644 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md @@ -1,12 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - - * added `JsonResponse::setEncodingOptions()` & `JsonResponse::getEncodingOptions()` for easier manipulation - of the options used while encoding data to JSON format. - 2.4.0 ----- diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php index 31f349c..0bba18f 100644 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php @@ -291,7 +291,7 @@ class UploadedFile extends File public function getErrorMessage() { static $errors = array( - UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).', + UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d kb).', UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', UPLOAD_ERR_NO_FILE => 'No file was uploaded.', diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php index 2e40d40..22e6d2a 100644 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php @@ -26,7 +26,6 @@ class JsonResponse extends Response { protected $data; protected $callback; - protected $encodingOptions; /** * Constructor. @@ -42,10 +41,6 @@ class JsonResponse extends Response if (null === $data) { $data = new \ArrayObject(); } - - // Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML. - $this->encodingOptions = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT; - $this->setData($data); } @@ -85,7 +80,7 @@ class JsonResponse extends Response } /** - * Sets the data to be sent as JSON. + * Sets the data to be sent as json. * * @param mixed $data * @@ -95,7 +90,8 @@ class JsonResponse extends Response */ public function setData($data = array()) { - $this->data = @json_encode($data, $this->encodingOptions); + // Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML. + $this->data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT); if (JSON_ERROR_NONE !== json_last_error()) { throw new \InvalidArgumentException($this->transformJsonError()); @@ -105,31 +101,7 @@ class JsonResponse extends Response } /** - * Returns options used while encoding data to JSON. - * - * @return int - */ - public function getEncodingOptions() - { - return $this->encodingOptions; - } - - /** - * Sets options used while encoding data to JSON. - * - * @param int $encodingOptions - * - * @return JsonResponse - */ - public function setEncodingOptions($encodingOptions) - { - $this->encodingOptions = (int) $encodingOptions; - - return $this->setData(json_decode($this->data)); - } - - /** - * Updates the content and headers according to the JSON data and callback. + * Updates the content and headers according to the json data and callback. * * @return JsonResponse */ diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php index 95e432b..eeec855 100644 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php @@ -376,7 +376,24 @@ class Response if (function_exists('fastcgi_finish_request')) { fastcgi_finish_request(); } elseif ('cli' !== PHP_SAPI) { - static::closeOutputBuffers(0, true); + // ob_get_level() never returns 0 on some Windows configurations, so if + // the level is the same two times in a row, the loop should be stopped. + $previous = null; + $obStatus = ob_get_status(1); + while (($level = ob_get_level()) > 0 && $level !== $previous) { + $previous = $level; + if ($obStatus[$level - 1]) { + if (version_compare(PHP_VERSION, '5.4', '>=')) { + if (isset($obStatus[$level - 1]['flags']) && ($obStatus[$level - 1]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE)) { + ob_end_flush(); + } + } else { + if (isset($obStatus[$level - 1]['del']) && $obStatus[$level - 1]['del']) { + ob_end_flush(); + } + } + } + } flush(); } @@ -1226,36 +1243,7 @@ class Response } /** - * Cleans or flushes output buffers up to target level. - * - * Resulting level can be greater than target level if a non-removable buffer has been encountered. - * - * @param int $targetLevel The target output buffering level - * @param bool $flush Whether to flush or clean the buffers - */ - public static function closeOutputBuffers($targetLevel, $flush) - { - $status = ob_get_status(true); - $level = count($status); - - while ($level-- > $targetLevel - && (!empty($status[$level]['del']) - || (isset($status[$level]['flags']) - && ($status[$level]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE) - && ($status[$level]['flags'] & ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE)) - ) - ) - ) { - if ($flush) { - ob_end_flush(); - } else { - ob_end_clean(); - } - } - } - - /** - * Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9 + * Check if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9 * * @link http://support.microsoft.com/kb/323308 */ diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php index c7ea726..ef392ca 100644 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php @@ -166,25 +166,6 @@ class JsonResponseTest extends \PHPUnit_Framework_TestCase $this->assertEquals('"\u003C\u003E\u0027\u0026\u0022"', $response->getContent()); } - public function testGetEncodingOptions() - { - $response = new JsonResponse(); - - $this->assertEquals(JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT, $response->getEncodingOptions()); - } - - public function testSetEncodingOptions() - { - $response = new JsonResponse(); - $response->setData(array(array(1, 2, 3))); - - $this->assertEquals('[[1,2,3]]', $response->getContent()); - - $response->setEncodingOptions(JSON_FORCE_OBJECT); - - $this->assertEquals('{"0":{"0":1,"1":2,"2":3}}', $response->getContent()); - } - /** * @expectedException \InvalidArgumentException */ diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json index db57eb5..81d3e4a 100644 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md index 2b2e827..66219ae 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md @@ -1,11 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - - * deprecated `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`, use `Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass` instead - 2.4.0 ----- diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php index 48cde66..ba2ea44 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\DataCollector; -use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Debug\ErrorHandler; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; @@ -46,8 +46,11 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte public function lateCollect() { if (null !== $this->logger) { - $this->data = $this->computeErrorsCount(); - $this->data['logs'] = $this->sanitizeLogs($this->logger->getLogs()); + $this->data = array( + 'error_count' => $this->logger->countErrors(), + 'logs' => $this->sanitizeLogs($this->logger->getLogs()), + 'deprecation_count' => $this->computeDeprecationCount() + ); } } @@ -73,21 +76,11 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return isset($this->data['logs']) ? $this->data['logs'] : array(); } - public function getPriorities() - { - return isset($this->data['priorities']) ? $this->data['priorities'] : array(); - } - public function countDeprecations() { return isset($this->data['deprecation_count']) ? $this->data['deprecation_count'] : 0; } - public function countScreams() - { - return isset($this->data['scream_count']) ? $this->data['scream_count'] : 0; - } - /** * {@inheritdoc} */ @@ -126,36 +119,15 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return $context; } - private function computeErrorsCount() + private function computeDeprecationCount() { - $count = array( - 'error_count' => $this->logger->countErrors(), - 'deprecation_count' => 0, - 'scream_count' => 0, - 'priorities' => array(), - ); - + $count = 0; foreach ($this->logger->getLogs() as $log) { - if (isset($count['priorities'][$log['priority']])) { - ++$count['priorities'][$log['priority']]['count']; - } else { - $count['priorities'][$log['priority']] = array( - 'count' => 1, - 'name' => $log['priorityName'], - ); - } - - if (isset($log['context']['type'])) { - if (ErrorHandler::TYPE_DEPRECATION === $log['context']['type']) { - ++$count['deprecation_count']; - } elseif (isset($log['context']['scream'])) { - ++$count['scream_count']; - } + if (isset($log['context']['type']) && ErrorHandler::TYPE_DEPRECATION === $log['context']['type']) { + $count++; } } - ksort($count['priorities']); - return $count; } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index 9c19f06..9371748 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -48,17 +48,14 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $responseHeaders['Set-Cookie'] = $cookies; } - // attributes are serialized and as they can be anything, they need to be converted to strings. $attributes = array(); foreach ($request->attributes->all() as $key => $value) { if ('_route' === $key && is_object($value)) { - $attributes[$key] = $this->varToString($value->getPath()); + $attributes['_route'] = $this->varToString($value->getPath()); } elseif ('_route_params' === $key) { - // we need to keep route params as an array (see getRouteParams()) - foreach ($value as $k => $v) { - $value[$k] = $this->varToString($v); + foreach ($value as $key => $v) { + $attributes['_route_params'][$key] = $this->varToString($v); } - $attributes[$key] = $value; } else { $attributes[$key] = $this->varToString($value); } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php index 31b60e6..ceafa68 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php @@ -19,38 +19,23 @@ class ValueExporter /** * Converts a PHP value to a string. * - * @param mixed $value The PHP value - * @param int $depth only for internal usage - * @param bool $deep only for internal usage + * @param mixed $value The PHP value * * @return string The string representation of the given value */ - public function exportValue($value, $depth = 1, $deep = false) + public function exportValue($value) { if (is_object($value)) { return sprintf('Object(%s)', get_class($value)); } if (is_array($value)) { - if (empty($value)) { - return '[]'; - } - - $indent = str_repeat(' ', $depth); - $a = array(); foreach ($value as $k => $v) { - if (is_array($v)) { - $deep = true; - } - $a[] = sprintf('%s => %s', $k, $this->exportValue($v, $depth + 1, $deep)); - } - - if ($deep) { - return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1)); + $a[] = sprintf('%s => %s', $k, $this->exportValue($v)); } - return sprintf("[%s]", implode(', ', $a)); + return sprintf("Array(%s)", implode(', ', $a)); } if (is_resource($value)) { diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php index ed2417b..4e5a0c1 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -11,10 +11,14 @@ namespace Symfony\Component\HttpKernel\Debug; -use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher; -use Symfony\Component\HttpKernel\Profiler\Profiler; +use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Profiler\Profiler; +use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\Event; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface; /** * Collects some data about event listeners. @@ -23,8 +27,30 @@ use Symfony\Component\EventDispatcher\Event; * * @author Fabien Potencier */ -class TraceableEventDispatcher extends BaseTraceableEventDispatcher +class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEventDispatcherInterface { + private $logger; + private $called = array(); + private $stopwatch; + private $dispatcher; + private $wrappedListeners = array(); + private $firstCalledEvent = array(); + private $lastEventId = 0; + + /** + * Constructor. + * + * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance + * @param Stopwatch $stopwatch A Stopwatch instance + * @param LoggerInterface $logger A LoggerInterface instance + */ + public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null) + { + $this->dispatcher = $dispatcher; + $this->stopwatch = $stopwatch; + $this->logger = $logger; + } + /** * Sets the profiler. * @@ -43,8 +69,262 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher /** * {@inheritdoc} */ - protected function preDispatch($eventName, Event $event) + public function addListener($eventName, $listener, $priority = 0) + { + $this->dispatcher->addListener($eventName, $listener, $priority); + } + + /** + * {@inheritdoc} + */ + public function addSubscriber(EventSubscriberInterface $subscriber) + { + $this->dispatcher->addSubscriber($subscriber); + } + + /** + * {@inheritdoc} + */ + public function removeListener($eventName, $listener) + { + return $this->dispatcher->removeListener($eventName, $listener); + } + + /** + * {@inheritdoc} + */ + public function removeSubscriber(EventSubscriberInterface $subscriber) + { + return $this->dispatcher->removeSubscriber($subscriber); + } + + /** + * {@inheritdoc} + */ + public function getListeners($eventName = null) + { + return $this->dispatcher->getListeners($eventName); + } + + /** + * {@inheritdoc} + */ + public function hasListeners($eventName = null) + { + return $this->dispatcher->hasListeners($eventName); + } + + /** + * {@inheritdoc} + */ + public function dispatch($eventName, Event $event = null) + { + if (null === $event) { + $event = new Event(); + } + + $eventId = ++$this->lastEventId; + + $this->preDispatch($eventName, $eventId, $event); + + $e = $this->stopwatch->start($eventName, 'section'); + + $this->firstCalledEvent[$eventName] = $this->stopwatch->start($eventName.'.loading', 'event_listener_loading'); + + if (!$this->dispatcher->hasListeners($eventName)) { + $this->firstCalledEvent[$eventName]->stop(); + } + + $this->dispatcher->dispatch($eventName, $event); + + unset($this->firstCalledEvent[$eventName]); + + if ($e->isStarted()) { + $e->stop(); + } + + $this->postDispatch($eventName, $eventId, $event); + + return $event; + } + + /** + * {@inheritdoc} + */ + public function getCalledListeners() + { + return $this->called; + } + + /** + * {@inheritdoc} + */ + public function getNotCalledListeners() + { + $notCalled = array(); + + foreach ($this->getListeners() as $name => $listeners) { + foreach ($listeners as $listener) { + $info = $this->getListenerInfo($listener, null, $name); + if (!isset($this->called[$name.'.'.$info['pretty']])) { + $notCalled[$name.'.'.$info['pretty']] = $info; + } + } + } + + return $notCalled; + } + + /** + * Proxies all method calls to the original event dispatcher. + * + * @param string $method The method name + * @param array $arguments The method arguments + * + * @return mixed + */ + public function __call($method, $arguments) + { + return call_user_func_array(array($this->dispatcher, $method), $arguments); + } + + /** + * This is a private method and must not be used. + * + * This method is public because it is used in a closure. + * Whenever Symfony will require PHP 5.4, this could be changed + * to a proper private method. + */ + public function logSkippedListeners($eventName, $eventId, Event $event, $listener) + { + if (null === $this->logger) { + return; + } + + $info = $this->getListenerInfo($listener, $eventId, $eventName); + + $this->logger->debug(sprintf('Listener "%s" stopped propagation of the event "%s".', $info['pretty'], $eventName)); + + $skippedListeners = $this->getListeners($eventName); + $skipped = false; + + foreach ($skippedListeners as $skippedListener) { + $skippedListener = $this->unwrapListener($skippedListener, $eventId); + + if ($skipped) { + $info = $this->getListenerInfo($skippedListener, $eventId, $eventName); + $this->logger->debug(sprintf('Listener "%s" was not called for event "%s".', $info['pretty'], $eventName)); + } + + if ($skippedListener === $listener) { + $skipped = true; + } + } + } + + /** + * This is a private method. + * + * This method is public because it is used in a closure. + * Whenever Symfony will require PHP 5.4, this could be changed + * to a proper private method. + */ + public function preListenerCall($eventName, $eventId, $listener) + { + // is it the first called listener? + if (isset($this->firstCalledEvent[$eventName])) { + $this->firstCalledEvent[$eventName]->stop(); + + unset($this->firstCalledEvent[$eventName]); + } + + $info = $this->getListenerInfo($listener, $eventId, $eventName); + + if (null !== $this->logger) { + $this->logger->debug(sprintf('Notified event "%s" to listener "%s".', $eventName, $info['pretty'])); + } + + $this->called[$eventName.'.'.$info['pretty']] = $info; + + return $this->stopwatch->start(isset($info['class']) ? $info['class'] : $info['type'], 'event_listener'); + } + + /** + * Returns information about the listener + * + * @param object $listener The listener + * @param string $eventName The event name + * + * @return array Information about the listener + */ + private function getListenerInfo($listener, $eventId, $eventName) + { + $listener = $this->unwrapListener($listener, $eventId); + + $info = array( + 'event' => $eventName, + ); + if ($listener instanceof \Closure) { + $info += array( + 'type' => 'Closure', + 'pretty' => 'closure' + ); + } elseif (is_string($listener)) { + try { + $r = new \ReflectionFunction($listener); + $file = $r->getFileName(); + $line = $r->getStartLine(); + } catch (\ReflectionException $e) { + $file = null; + $line = null; + } + $info += array( + 'type' => 'Function', + 'function' => $listener, + 'file' => $file, + 'line' => $line, + 'pretty' => $listener, + ); + } elseif (is_array($listener) || (is_object($listener) && is_callable($listener))) { + if (!is_array($listener)) { + $listener = array($listener, '__invoke'); + } + $class = is_object($listener[0]) ? get_class($listener[0]) : $listener[0]; + try { + $r = new \ReflectionMethod($class, $listener[1]); + $file = $r->getFileName(); + $line = $r->getStartLine(); + } catch (\ReflectionException $e) { + $file = null; + $line = null; + } + $info += array( + 'type' => 'Method', + 'class' => $class, + 'method' => $listener[1], + 'file' => $file, + 'line' => $line, + 'pretty' => $class.'::'.$listener[1], + ); + } + + return $info; + } + + private function preDispatch($eventName, $eventId, Event $event) { + // wrap all listeners before they are called + $this->wrappedListeners[$eventId] = new \SplObjectStorage(); + + $listeners = $this->dispatcher->getListeners($eventName); + + foreach ($listeners as $listener) { + $this->dispatcher->removeListener($eventName, $listener); + $wrapped = $this->wrapListener($eventName, $eventId, $listener); + $this->wrappedListeners[$eventId][$wrapped] = $listener; + $this->dispatcher->addListener($eventName, $wrapped); + } + switch ($eventName) { case KernelEvents::REQUEST: $this->stopwatch->openSection(); @@ -58,7 +338,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher break; case KernelEvents::TERMINATE: $token = $event->getResponse()->headers->get('X-Debug-Token'); - // There is a very special case when using built-in AppCache class as kernel wrapper, in the case + // There is a very special case when using builtin AppCache class as kernel wrapper, in the case // of an ESI request leading to a `stale` response [B] inside a `fresh` cached response [A]. // In this case, `$token` contains the [B] debug token, but the open `stopwatch` section ID // is equal to the [A] debug token. Trying to reopen section with the [B] token throws an exception @@ -70,10 +350,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher } } - /** - * {@inheritdoc} - */ - protected function postDispatch($eventName, Event $event) + private function postDispatch($eventName, $eventId, Event $event) { switch ($eventName) { case KernelEvents::CONTROLLER: @@ -92,5 +369,49 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher } catch (\LogicException $e) {} break; } + + foreach ($this->wrappedListeners[$eventId] as $wrapped) { + $this->dispatcher->removeListener($eventName, $wrapped); + $this->dispatcher->addListener($eventName, $this->wrappedListeners[$eventId][$wrapped]); + } + + unset($this->wrappedListeners[$eventId]); + } + + private function wrapListener($eventName, $eventId, $listener) + { + $self = $this; + + return function (Event $event) use ($self, $eventName, $eventId, $listener) { + $e = $self->preListenerCall($eventName, $eventId, $listener); + + call_user_func($listener, $event, $eventName, $self); + + if ($e->isStarted()) { + $e->stop(); + } + + if ($event->isPropagationStopped()) { + $self->logSkippedListeners($eventName, $eventId, $event, $listener); + } + }; + } + + private function unwrapListener($listener, $eventId) + { + // get the original listener + if (is_object($listener)) { + if (null === $eventId) { + foreach (array_keys($this->wrappedListeners) as $eventId) { + if (isset($this->wrappedListeners[$eventId][$listener])) { + return $this->wrappedListeners[$eventId][$listener]; + } + } + } elseif (isset($this->wrappedListeners[$eventId][$listener])) { + return $this->wrappedListeners[$eventId][$listener]; + } + } + + return $listener; } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php index 0e14e91..e48c409 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php @@ -11,13 +11,96 @@ namespace Symfony\Component\HttpKernel\DependencyInjection; -use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass as BaseRegisterListenersPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * Compiler pass to register tagged services for an event dispatcher. - * - * @deprecated Deprecated in 2.5, to be removed in 3.0. Use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass instead. */ -class RegisterListenersPass extends BaseRegisterListenersPass +class RegisterListenersPass implements CompilerPassInterface { + /** + * @var string + */ + protected $dispatcherService; + + /** + * @var string + */ + protected $listenerTag; + + /** + * @var string + */ + protected $subscriberTag; + + /** + * Constructor. + * + * @param string $dispatcherService Service name of the event dispatcher in processed container + * @param string $listenerTag Tag name used for listener + * @param string $subscriberTag Tag name used for subscribers + */ + public function __construct($dispatcherService = 'event_dispatcher', $listenerTag = 'kernel.event_listener', $subscriberTag = 'kernel.event_subscriber') + { + $this->dispatcherService = $dispatcherService; + $this->listenerTag = $listenerTag; + $this->subscriberTag = $subscriberTag; + } + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) { + return; + } + + $definition = $container->findDefinition($this->dispatcherService); + + foreach ($container->findTaggedServiceIds($this->listenerTag) as $id => $events) { + $def = $container->getDefinition($id); + if (!$def->isPublic()) { + throw new \InvalidArgumentException(sprintf('The service "%s" must be public as event listeners are lazy-loaded.', $id)); + } + + if ($def->isAbstract()) { + throw new \InvalidArgumentException(sprintf('The service "%s" must not be abstract as event listeners are lazy-loaded.', $id)); + } + + foreach ($events as $event) { + $priority = isset($event['priority']) ? $event['priority'] : 0; + + if (!isset($event['event'])) { + throw new \InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag)); + } + + if (!isset($event['method'])) { + $event['method'] = 'on'.preg_replace_callback(array( + '/(?<=\b)[a-z]/i', + '/[^a-z0-9]/i', + ), function ($matches) { return strtoupper($matches[0]); }, $event['event']); + $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); + } + + $definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority)); + } + } + + foreach ($container->findTaggedServiceIds($this->subscriberTag) as $id => $attributes) { + $def = $container->getDefinition($id); + if (!$def->isPublic()) { + throw new \InvalidArgumentException(sprintf('The service "%s" must be public as event subscribers are lazy-loaded.', $id)); + } + + // We must assume that the class value has been correctly filled, even if the service is created by a factory + $class = $def->getClass(); + + $refClass = new \ReflectionClass($class); + $interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface'; + if (!$refClass->implementsInterface($interface)) { + throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface)); + } + + $definition->addMethodCall('addSubscriberService', array($id, $class)); + } + } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php index 025b647..13940ab 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php @@ -12,7 +12,7 @@ namespace Symfony\Component\HttpKernel\EventListener; use Psr\Log\LoggerInterface; -use Symfony\Component\Debug\ErrorHandler; +use Symfony\Component\HttpKernel\Debug\ErrorHandler; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\KernelEvents; @@ -38,12 +38,11 @@ class ErrorsLoggerListener implements EventSubscriberInterface { if (null !== $this->logger) { ErrorHandler::setLogger($this->logger, $this->channel); - $this->logger = null; } } public static function getSubscribedEvents() { - return array(KernelEvents::REQUEST => array('injectLogger', 2048)); + return array(KernelEvents::REQUEST => 'injectLogger'); } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php index a6ab82e..c6ca3d4 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php @@ -93,7 +93,9 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer } // let's clean up the output buffers that were created by the sub-request - Response::closeOutputBuffers($level, false); + while (ob_get_level() > $level) { + ob_get_clean(); + } if (isset($options['alt'])) { $alt = $options['alt']; diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index 84a10f7..7931f01 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -522,7 +522,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface protected function lock(Request $request, Response $entry) { // try to acquire a lock to call the backend - $lock = $this->store->lock($request); + $lock = $this->store->lock($request, $entry); // there is already another process calling the backend if (true !== $lock) { diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php index 68d89c9..fda4075 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php @@ -86,25 +86,6 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface } /** - * @throws \LogicException If the request stack is empty - * - * @internal - */ - public function terminateWithException(\Exception $exception) - { - if (!$request = $this->requestStack->getMasterRequest()) { - throw new \LogicException('Request stack is empty', 0, $exception); - } - - $response = $this->handleException($exception, $request, self::MASTER_REQUEST); - - $response->sendHeaders(); - $response->sendContent(); - - $this->terminate($request, $response); - } - - /** * Handles a request to convert it to a response. * * Exceptions are not caught. diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php index 24fc68f..b2de8e2 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php @@ -59,11 +59,11 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.5.0'; - const VERSION_ID = '20500'; + const VERSION = '2.4.6'; + const VERSION_ID = '20406'; const MAJOR_VERSION = '2'; - const MINOR_VERSION = '5'; - const RELEASE_VERSION = '0'; + const MINOR_VERSION = '4'; + const RELEASE_VERSION = '6'; const EXTRA_VERSION = ''; /** diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php index f31d245..a451b7a 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php @@ -11,8 +11,10 @@ namespace Symfony\Component\HttpKernel\Tests\Bundle; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle; @@ -36,11 +38,10 @@ class BundleTest extends \PHPUnit_Framework_TestCase public function testRegisterCommandsIngoreCommandAsAService() { $container = new ContainerBuilder(); - $commandClass = 'Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand'; - $definition = new Definition($commandClass); + $container->addCompilerPass(new AddConsoleCommandPass()); + $definition = new Definition('Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand'); $definition->addTag('console.command'); $container->setDefinition('my-command', $definition); - $container->setAlias('console.command.'.strtolower(str_replace('\\', '_', $commandClass)), 'my-command'); $container->compile(); $application = $this->getMock('Symfony\Component\Console\Application'); diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php index cdb06af..7cd4d06 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php @@ -19,7 +19,7 @@ class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase /** * @dataProvider getCollectTestData */ - public function testCollect($nb, $logs, $expectedLogs, $expectedDeprecationCount, $expectedScreamCount, $expectedPriorities = null) + public function testCollect($nb, $logs, $expectedLogs, $expectedDeprecationCount) { $logger = $this->getMock('Symfony\Component\HttpKernel\Log\DebugLoggerInterface'); $logger->expects($this->once())->method('countErrors')->will($this->returnValue($nb)); @@ -32,11 +32,6 @@ class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase $this->assertSame($nb, $c->countErrors()); $this->assertSame($expectedLogs ? $expectedLogs : $logs, $c->getLogs()); $this->assertSame($expectedDeprecationCount, $c->countDeprecations()); - $this->assertSame($expectedScreamCount, $c->countScreams()); - - if (isset($expectedPriorities)) { - $this->assertSame($expectedPriorities, $c->getPriorities()); - } } public function getCollectTestData() @@ -44,36 +39,30 @@ class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase return array( array( 1, - array(array('message' => 'foo', 'context' => array(), 'priority' => 100, 'priorityName' => 'DEBUG')), + array(array('message' => 'foo', 'context' => array())), null, - 0, - 0, + 0 ), array( 1, - array(array('message' => 'foo', 'context' => array('foo' => fopen(__FILE__, 'r')), 'priority' => 100, 'priorityName' => 'DEBUG')), - array(array('message' => 'foo', 'context' => array('foo' => 'Resource(stream)'), 'priority' => 100, 'priorityName' => 'DEBUG')), - 0, - 0, + array(array('message' => 'foo', 'context' => array('foo' => fopen(__FILE__, 'r')))), + array(array('message' => 'foo', 'context' => array('foo' => 'Resource(stream)'))), + 0 ), array( 1, - array(array('message' => 'foo', 'context' => array('foo' => new \stdClass()), 'priority' => 100, 'priorityName' => 'DEBUG')), - array(array('message' => 'foo', 'context' => array('foo' => 'Object(stdClass)'), 'priority' => 100, 'priorityName' => 'DEBUG')), - 0, - 0, + array(array('message' => 'foo', 'context' => array('foo' => new \stdClass()))), + array(array('message' => 'foo', 'context' => array('foo' => 'Object(stdClass)'))), + 0 ), array( 1, array( - array('message' => 'foo', 'context' => array('type' => ErrorHandler::TYPE_DEPRECATION), 'priority' => 100, 'priorityName' => 'DEBUG'), - array('message' => 'foo2', 'context' => array('type' => ErrorHandler::TYPE_DEPRECATION), 'priority' => 100, 'priorityName' => 'DEBUG'), - array('message' => 'foo3', 'context' => array('type' => E_USER_WARNING, 'scream' => 0), 'priority' => 100, 'priorityName' => 'DEBUG'), + array('message' => 'foo', 'context' => array('type' => ErrorHandler::TYPE_DEPRECATION)), + array('message' => 'foo2', 'context' => array('type' => ErrorHandler::TYPE_DEPRECATION)) ), null, - 2, - 1, - array(100 => array('count' => 3, 'name' => 'DEBUG')), + 2 ), ); } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php index f542774..bb80781 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -22,19 +22,20 @@ use Symfony\Component\EventDispatcher\EventDispatcher; class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase { - public function testCollect() + /** + * @dataProvider provider + */ + public function testCollect(Request $request, Response $response) { $c = new RequestDataCollector(); - $c->collect($this->createRequest(), $this->createResponse()); - - $attributes = $c->getRequestAttributes(); + $c->collect($request, $response); $this->assertSame('request', $c->getName()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getRequestHeaders()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestServer()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestCookies()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $attributes); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestAttributes()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestRequest()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestQuery()); $this->assertSame('html', $c->getFormat()); @@ -42,8 +43,6 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase $this->assertSame(array('name' => 'foo'), $c->getRouteParams()); $this->assertSame(array(), $c->getSessionAttributes()); $this->assertSame('en', $c->getLocale()); - $this->assertRegExp('/Resource\(stream#\d+\)/', $attributes->get('resource')); - $this->assertSame('Object(stdClass)', $attributes->get('object')); $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getResponseHeaders()); $this->assertSame('OK', $c->getStatusText()); @@ -53,8 +52,10 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase /** * Test various types of controller callables. + * + * @dataProvider provider */ - public function testControllerInspection() + public function testControllerInspection(Request $request, Response $response) { // make sure we always match the line number $r1 = new \ReflectionMethod($this, 'testControllerInspection'); @@ -135,8 +136,7 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase ); $c = new RequestDataCollector(); - $request = $this->createRequest(); - $response = $this->createResponse(); + foreach ($controllerTests as $controllerTest) { $this->injectController($c, $controllerTest[1], $request); $c->collect($request, $response); @@ -144,20 +144,17 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase } } - protected function createRequest() + public function provider() { + if (!class_exists('Symfony\Component\HttpFoundation\Request')) { + return array(array(null, null)); + } + $request = Request::create('http://test.com/foo?bar=baz'); $request->attributes->set('foo', 'bar'); $request->attributes->set('_route', 'foobar'); $request->attributes->set('_route_params', array('name' => 'foo')); - $request->attributes->set('resource', fopen(__FILE__, 'r')); - $request->attributes->set('object', new \stdClass()); - - return $request; - } - protected function createResponse() - { $response = new Response(); $response->setStatusCode(200); $response->headers->set('Content-Type', 'application/json'); @@ -165,7 +162,9 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase $response->headers->setCookie(new Cookie('bar','foo',new \DateTime('@946684800'))); $response->headers->setCookie(new Cookie('bazz','foo','2000-12-12')); - return $response; + return array( + array($request, $response) + ); } /** diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php index 399f1a7..d30837d 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php @@ -12,6 +12,8 @@ namespace Symfony\Component\HttpKernel\Tests\Debug; use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\EventDispatcher\Event; use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher; use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpFoundation\Request; @@ -20,6 +22,148 @@ use Symfony\Component\Stopwatch\Stopwatch; class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase { + public function testAddRemoveListener() + { + $dispatcher = new EventDispatcher(); + $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); + + $tdispatcher->addListener('foo', $listener = function () { ; }); + $listeners = $dispatcher->getListeners('foo'); + $this->assertCount(1, $listeners); + $this->assertSame($listener, $listeners[0]); + + $tdispatcher->removeListener('foo', $listener); + $this->assertCount(0, $dispatcher->getListeners('foo')); + } + + public function testGetListeners() + { + $dispatcher = new EventDispatcher(); + $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); + + $tdispatcher->addListener('foo', $listener = function () { ; }); + $this->assertSame($dispatcher->getListeners('foo'), $tdispatcher->getListeners('foo')); + } + + public function testHasListeners() + { + $dispatcher = new EventDispatcher(); + $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); + + $this->assertFalse($dispatcher->hasListeners('foo')); + $this->assertFalse($tdispatcher->hasListeners('foo')); + + $tdispatcher->addListener('foo', $listener = function () { ; }); + $this->assertTrue($dispatcher->hasListeners('foo')); + $this->assertTrue($tdispatcher->hasListeners('foo')); + } + + public function testAddRemoveSubscriber() + { + $dispatcher = new EventDispatcher(); + $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); + + $subscriber = new EventSubscriber(); + + $tdispatcher->addSubscriber($subscriber); + $listeners = $dispatcher->getListeners('foo'); + $this->assertCount(1, $listeners); + $this->assertSame(array($subscriber, 'call'), $listeners[0]); + + $tdispatcher->removeSubscriber($subscriber); + $this->assertCount(0, $dispatcher->getListeners('foo')); + } + + public function testGetCalledListeners() + { + $dispatcher = new EventDispatcher(); + $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); + $tdispatcher->addListener('foo', $listener = function () { ; }); + + $this->assertEquals(array(), $tdispatcher->getCalledListeners()); + $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getNotCalledListeners()); + + $tdispatcher->dispatch('foo'); + + $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getCalledListeners()); + $this->assertEquals(array(), $tdispatcher->getNotCalledListeners()); + } + + public function testLogger() + { + $logger = $this->getMock('Psr\Log\LoggerInterface'); + + $dispatcher = new EventDispatcher(); + $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); + $tdispatcher->addListener('foo', $listener1 = function () { ; }); + $tdispatcher->addListener('foo', $listener2 = function () { ; }); + + $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); + $logger->expects($this->at(1))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); + + $tdispatcher->dispatch('foo'); + } + + public function testLoggerWithStoppedEvent() + { + $logger = $this->getMock('Psr\Log\LoggerInterface'); + + $dispatcher = new EventDispatcher(); + $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); + $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); }); + $tdispatcher->addListener('foo', $listener2 = function () { ; }); + + $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); + $logger->expects($this->at(1))->method('debug')->with("Listener \"closure\" stopped propagation of the event \"foo\"."); + $logger->expects($this->at(2))->method('debug')->with("Listener \"closure\" was not called for event \"foo\"."); + + $tdispatcher->dispatch('foo'); + } + + public function testDispatchCallListeners() + { + $called = array(); + + $dispatcher = new EventDispatcher(); + $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); + $tdispatcher->addListener('foo', $listener1 = function () use (&$called) { $called[] = 'foo1'; }); + $tdispatcher->addListener('foo', $listener2 = function () use (&$called) { $called[] = 'foo2'; }); + + $tdispatcher->dispatch('foo'); + + $this->assertEquals(array('foo1', 'foo2'), $called); + } + + public function testDispatchNested() + { + $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $loop = 1; + $dispatcher->addListener('foo', $listener1 = function () use ($dispatcher, &$loop) { + ++$loop; + if (2 == $loop) { + $dispatcher->dispatch('foo'); + } + }); + + $dispatcher->dispatch('foo'); + } + + public function testDispatchReusedEventNested() + { + $nestedCall = false; + $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $dispatcher->addListener('foo', function (Event $e) use ($dispatcher) { + $dispatcher->dispatch('bar', $e); + }); + $dispatcher->addListener('bar', function (Event $e) use (&$nestedCall) { + $nestedCall = true; + }); + + $this->assertFalse($nestedCall); + $dispatcher->dispatch('foo'); + $this->assertTrue($nestedCall); + } + public function testStopwatchSections() { $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch = new Stopwatch()); @@ -32,10 +176,14 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array( '__section__', 'kernel.request', + 'kernel.request.loading', 'kernel.controller', + 'kernel.controller.loading', 'controller', 'kernel.response', + 'kernel.response.loading', 'kernel.terminate', + 'kernel.terminate.loading', ), array_keys($events)); } @@ -84,3 +232,11 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase return new HttpKernel($dispatcher, $resolver); } } + +class EventSubscriber implements EventSubscriberInterface +{ + public static function getSubscribedEvents() + { + return array('foo' => 'call'); + } +} diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php new file mode 100644 index 0000000..b82053e --- /dev/null +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass; + +class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase +{ + /** + * Tests that event subscribers not implementing EventSubscriberInterface + * trigger an exception. + * + * @expectedException \InvalidArgumentException + */ + public function testEventSubscriberWithoutInterface() + { + // one service, not implementing any interface + $services = array( + 'my_event_subscriber' => array(0 => array()), + ); + + $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); + $definition->expects($this->atLeastOnce()) + ->method('isPublic') + ->will($this->returnValue(true)); + $definition->expects($this->atLeastOnce()) + ->method('getClass') + ->will($this->returnValue('stdClass')); + + $builder = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); + $builder->expects($this->any()) + ->method('hasDefinition') + ->will($this->returnValue(true)); + + // We don't test kernel.event_listener here + $builder->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->onConsecutiveCalls(array(), $services)); + + $builder->expects($this->atLeastOnce()) + ->method('getDefinition') + ->will($this->returnValue($definition)); + + $registerListenersPass = new RegisterListenersPass(); + $registerListenersPass->process($builder); + } + + public function testValidEventSubscriber() + { + $services = array( + 'my_event_subscriber' => array(0 => array()), + ); + + $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); + $definition->expects($this->atLeastOnce()) + ->method('isPublic') + ->will($this->returnValue(true)); + $definition->expects($this->atLeastOnce()) + ->method('getClass') + ->will($this->returnValue('Symfony\Component\HttpKernel\Tests\DependencyInjection\SubscriberService')); + + $builder = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); + $builder->expects($this->any()) + ->method('hasDefinition') + ->will($this->returnValue(true)); + + // We don't test kernel.event_listener here + $builder->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->onConsecutiveCalls(array(), $services)); + + $builder->expects($this->atLeastOnce()) + ->method('getDefinition') + ->will($this->returnValue($definition)); + + $builder->expects($this->atLeastOnce()) + ->method('findDefinition') + ->will($this->returnValue($definition)); + + $registerListenersPass = new RegisterListenersPass(); + $registerListenersPass->process($builder); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The service "foo" must be public as event listeners are lazy-loaded. + */ + public function testPrivateEventListener() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass')->setPublic(false)->addTag('kernel.event_listener', array()); + $container->register('event_dispatcher', 'stdClass'); + + $registerListenersPass = new RegisterListenersPass(); + $registerListenersPass->process($container); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The service "foo" must be public as event subscribers are lazy-loaded. + */ + public function testPrivateEventSubscriber() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass')->setPublic(false)->addTag('kernel.event_subscriber', array()); + $container->register('event_dispatcher', 'stdClass'); + + $registerListenersPass = new RegisterListenersPass(); + $registerListenersPass->process($container); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The service "foo" must not be abstract as event listeners are lazy-loaded. + */ + public function testAbstractEventListener() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_listener', array()); + $container->register('event_dispatcher', 'stdClass'); + + $registerListenersPass = new RegisterListenersPass(); + $registerListenersPass->process($container); + } +} + +class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface +{ + public static function getSubscribedEvents() {} +} diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json index dd01364..a09b001 100644 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.3", "symfony/event-dispatcher": "~2.1", "symfony/http-foundation": "~2.4", - "symfony/debug": "~2.5", + "symfony/debug": "~2.3", "psr/log": "~1.0" }, "require-dev": { @@ -49,7 +49,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/process/Symfony/Component/Process/CHANGELOG.md b/vendor/symfony/process/Symfony/Component/Process/CHANGELOG.md index 2f3c1be..3d13b99 100644 --- a/vendor/symfony/process/Symfony/Component/Process/CHANGELOG.md +++ b/vendor/symfony/process/Symfony/Component/Process/CHANGELOG.md @@ -1,15 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - - * added support for PTY mode - * added the convenience method "mustRun" - * deprecation: Process::setStdin() is deprecated in favor of Process::setInput() - * deprecation: Process::getStdin() is deprecated in favor of Process::getInput() - * deprecation: Process::setInput() and ProcessBuilder::setInput() do not accept non-scalar types - 2.4.0 ----- diff --git a/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php b/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php index 7523a5e..8909359 100644 --- a/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php +++ b/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php @@ -28,20 +28,16 @@ class ProcessFailedException extends RuntimeException throw new InvalidArgumentException('Expected a failed process, but the given process was successful.'); } - $error = sprintf('The command "%s" failed.'."\nExit Code: %s(%s)", - $process->getCommandLine(), - $process->getExitCode(), - $process->getExitCodeText() - ); - - if (!$process->isOutputDisabled()) { - $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", + parent::__construct( + sprintf( + 'The command "%s" failed.'."\nExit Code: %s(%s)\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", + $process->getCommandLine(), + $process->getExitCode(), + $process->getExitCodeText(), $process->getOutput(), $process->getErrorOutput() - ); - } - - parent::__construct($error); + ) + ); $this->process = $process; } diff --git a/vendor/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php b/vendor/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php index cda8699..9001f41 100644 --- a/vendor/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php +++ b/vendor/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php @@ -34,8 +34,8 @@ class PhpExecutableFinder public function find() { // HHVM support - if (defined('HHVM_VERSION')) { - return (false !== ($hhvm = getenv('PHP_BINARY')) ? $hhvm : PHP_BINARY).' --php'; + if (defined('HHVM_VERSION') && false !== $hhvm = getenv('PHP_BINARY')) { + return $hhvm; } // PHP_BINARY return the current sapi executable diff --git a/vendor/symfony/process/Symfony/Component/Process/Process.php b/vendor/symfony/process/Symfony/Component/Process/Process.php index e5edf59..2e7bb49 100644 --- a/vendor/symfony/process/Symfony/Component/Process/Process.php +++ b/vendor/symfony/process/Symfony/Component/Process/Process.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Process; use Symfony\Component\Process\Exception\InvalidArgumentException; use Symfony\Component\Process\Exception\LogicException; -use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Exception\ProcessTimedOutException; use Symfony\Component\Process\Exception\RuntimeException; @@ -45,7 +44,7 @@ class Process private $commandline; private $cwd; private $env; - private $input; + private $stdin; private $starttime; private $lastOutputTime; private $timeout; @@ -54,7 +53,6 @@ class Process private $exitcode; private $fallbackExitcode; private $processInformation; - private $outputDisabled = false; private $stdout; private $stderr; private $enhanceWindowsCompatibility = true; @@ -64,7 +62,6 @@ class Process private $incrementalOutputOffset = 0; private $incrementalErrorOutputOffset = 0; private $tty; - private $pty; private $useFileHandles = false; /** @var ProcessPipes */ @@ -128,7 +125,7 @@ class Process * @param string $commandline The command line to run * @param string|null $cwd The working directory or null to use the working dir of the current PHP process * @param array|null $env The environment variables or null to inherit - * @param string|null $input The input + * @param string|null $stdin The STDIN content * @param int|float|null $timeout The timeout in seconds or null to disable * @param array $options An array of options for proc_open * @@ -136,7 +133,7 @@ class Process * * @api */ - public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) + public function __construct($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) { if (!function_exists('proc_open')) { throw new RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); @@ -156,11 +153,9 @@ class Process $this->setEnv($env); } - $this->input = $input; + $this->stdin = $stdin; $this->setTimeout($timeout); $this->useFileHandles = defined('PHP_WINDOWS_VERSION_BUILD'); - $this->pty = false; - $this->enhanceWindowsCompatibility = true; $this->enhanceSigchildCompatibility = !defined('PHP_WINDOWS_VERSION_BUILD') && $this->isSigchildEnabled(); $this->options = array_replace(array('suppress_errors' => true, 'binary_pipes' => true), $options); } @@ -193,7 +188,6 @@ class Process * * @throws RuntimeException When process can't be launched * @throws RuntimeException When process stopped after receiving signal - * @throws LogicException In case a callback is provided and output has been disabled * * @api */ @@ -205,26 +199,7 @@ class Process } /** - * Runs the process. - * - * This is identical to run() except that an exception is thrown if the process - * exits with a non-zero exit code. - * - * @param callable|null $callback - * - * @return self - */ - public function mustRun($callback = null) - { - if (0 !== $this->run($callback)) { - throw new ProcessFailedException($this); - } - - return $this; - } - - /** - * Starts the process and returns after writing the input to STDIN. + * Starts the process and returns after sending the STDIN. * * This method blocks until all STDIN data is sent to the process then it * returns while the process runs in the background. @@ -245,16 +220,12 @@ class Process * * @throws RuntimeException When process can't be launched * @throws RuntimeException When process is already running - * @throws LogicException In case a callback is provided and output has been disabled */ public function start($callback = null) { if ($this->isRunning()) { throw new RuntimeException('Process is already running'); } - if ($this->outputDisabled && null !== $callback) { - throw new LogicException('Output has been disabled, enable it to allow the use of a callback.'); - } $this->resetProcessData(); $this->starttime = $this->lastOutputTime = microtime(true); @@ -288,7 +259,7 @@ class Process return; } - $this->processPipes->write(false, $this->input); + $this->processPipes->write(false, $this->stdin); $this->updateStatus(false); $this->checkTimeout(); } @@ -399,70 +370,16 @@ class Process } /** - * Disables fetching output and error output from the underlying process. - * - * @return Process - * - * @throws RuntimeException In case the process is already running - */ - public function disableOutput() - { - if ($this->isRunning()) { - throw new RuntimeException('Disabling output while the process is running is not possible.'); - } - if (null !== $this->idleTimeout) { - throw new LogicException('Output can not be disabled while an idle timeout is set.'); - } - - $this->outputDisabled = true; - - return $this; - } - - /** - * Enables fetching output and error output from the underlying process. - * - * @return Process - * - * @throws RuntimeException In case the process is already running - */ - public function enableOutput() - { - if ($this->isRunning()) { - throw new RuntimeException('Enabling output while the process is running is not possible.'); - } - - $this->outputDisabled = false; - - return $this; - } - - /** - * Returns true in case the output is disabled, false otherwise. - * - * @return bool - */ - public function isOutputDisabled() - { - return $this->outputDisabled; - } - - /** * Returns the current output of the process (STDOUT). * * @return string The process output * - * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @api */ public function getOutput() { - if ($this->outputDisabled) { - throw new LogicException('Output has been disabled.'); - } - $this->requireProcessIsStarted(__FUNCTION__); $this->readPipes(false, defined('PHP_WINDOWS_VERSION_BUILD') ? !$this->processInformation['running'] : true); @@ -476,7 +393,6 @@ class Process * In comparison with the getOutput method which always return the whole * output, this one returns the new output since the last call. * - * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @return string The process output since the last call @@ -511,17 +427,12 @@ class Process * * @return string The process error output * - * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @api */ public function getErrorOutput() { - if ($this->outputDisabled) { - throw new LogicException('Output has been disabled.'); - } - $this->requireProcessIsStarted(__FUNCTION__); $this->readPipes(false, defined('PHP_WINDOWS_VERSION_BUILD') ? !$this->processInformation['running'] : true); @@ -536,7 +447,6 @@ class Process * whole error output, this one returns the new error output since the last * call. * - * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @return string The process error output since the last call @@ -903,10 +813,6 @@ class Process */ public function setIdleTimeout($timeout) { - if (null !== $timeout && $this->outputDisabled) { - throw new LogicException('Idle timeout can not be set while the output is disabled.'); - } - $this->idleTimeout = $this->validateTimeout($timeout); return $this; @@ -943,30 +849,6 @@ class Process } /** - * Sets PTY mode. - * - * @param bool $bool - * - * @return self - */ - public function setPty($bool) - { - $this->pty = (bool) $bool; - - return $this; - } - - /** - * Returns PTY state. - * - * @return bool - */ - public function isPty() - { - return $this->pty; - } - - /** * Gets the working directory. * * @return string|null The current working directory or null on failure @@ -1038,63 +920,29 @@ class Process * Gets the contents of STDIN. * * @return string|null The current contents - * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. - * This method is deprecated in favor of getInput. */ public function getStdin() { - return $this->getInput(); - } - - /** - * Gets the Process input. - * - * @return null|string The Process input - */ - public function getInput() - { - return $this->input; + return $this->stdin; } /** * Sets the contents of STDIN. * - * Deprecation: As of Symfony 2.5, this method only accepts scalar values. - * * @param string|null $stdin The new contents * * @return self The current Process instance * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. - * This method is deprecated in favor of setInput. - * * @throws LogicException In case the process is running * @throws InvalidArgumentException In case the argument is invalid */ public function setStdin($stdin) { - return $this->setInput($stdin); - } - - /** - * Sets the input. - * - * This content will be passed to the underlying process standard input. - * - * @param string|null $input The content - * - * @return self The current Process instance - * - * @throws LogicException In case the process is running - */ - public function setInput($input) - { if ($this->isRunning()) { - throw new LogicException('Input can not be set while the process is running.'); + throw new LogicException('STDIN can not be set while the process is running.'); } - $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); + $this->stdin = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $stdin); return $this; } @@ -1205,41 +1053,14 @@ class Process } /** - * Returns whether PTY is supported on the current operating system. - * - * @return bool - */ - public static function isPtySupported() - { - static $result; - - if (null !== $result) { - return $result; - } - - if (defined('PHP_WINDOWS_VERSION_BUILD')) { - return $result = false; - } - - $proc = @proc_open('echo 1', array(array('pty'), array('pty'), array('pty')), $pipes); - if (is_resource($proc)) { - proc_close($proc); - - return $result = true; - } - - return $result = false; - } - - /** * Creates the descriptors needed by the proc_open. * * @return array */ private function getDescriptors() { - $this->processPipes = new ProcessPipes($this->useFileHandles, $this->tty, $this->pty); - $descriptors = $this->processPipes->getDescriptors($this->outputDisabled); + $this->processPipes = new ProcessPipes($this->useFileHandles, $this->tty); + $descriptors = $this->processPipes->getDescriptors(); if (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { // last exit code is output on the fourth pipe and caught to work around --enable-sigchild diff --git a/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php b/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php index 40b8d70..c0f1615 100644 --- a/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php +++ b/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php @@ -24,12 +24,11 @@ class ProcessBuilder private $arguments; private $cwd; private $env = array(); - private $input; + private $stdin; private $timeout = 60; private $options = array(); private $inheritEnv = true; private $prefix = array(); - private $outputDisabled = false; /** * Constructor @@ -156,17 +155,15 @@ class ProcessBuilder /** * Sets the input of the process. * - * Deprecation: As of Symfony 2.5, this method only accepts string values. - * - * @param string|null $input The input as a string + * @param string|null $stdin The input as a string * * @return ProcessBuilder * * @throws InvalidArgumentException In case the argument is invalid */ - public function setInput($input) + public function setInput($stdin) { - $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); + $this->stdin = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $stdin); return $this; } @@ -217,30 +214,6 @@ class ProcessBuilder } /** - * Disables fetching output and error output from the underlying process. - * - * @return Process - */ - public function disableOutput() - { - $this->outputDisabled = true; - - return $this; - } - - /** - * Enables fetching output and error output from the underlying process. - * - * @return Process - */ - public function enableOutput() - { - $this->outputDisabled = false; - - return $this; - } - - /** * Creates a Process instance and returns it. * * @return Process @@ -265,12 +238,6 @@ class ProcessBuilder $env = $this->env; } - $process = new Process($script, $this->cwd, $env, $this->input, $this->timeout, $options); - - if ($this->outputDisabled) { - $process->disableOutput(); - } - - return $process; + return new Process($script, $this->cwd, $env, $this->stdin, $this->timeout, $options); } } diff --git a/vendor/symfony/process/Symfony/Component/Process/ProcessPipes.php b/vendor/symfony/process/Symfony/Component/Process/ProcessPipes.php index 82bf5c2..f35d1c1 100644 --- a/vendor/symfony/process/Symfony/Component/Process/ProcessPipes.php +++ b/vendor/symfony/process/Symfony/Component/Process/ProcessPipes.php @@ -30,16 +30,13 @@ class ProcessPipes private $useFiles; /** @var bool */ private $ttyMode; - /** @var bool */ - private $ptyMode; const CHUNK_SIZE = 16384; - public function __construct($useFiles, $ttyMode, $ptyMode = false) + public function __construct($useFiles, $ttyMode) { $this->useFiles = (bool) $useFiles; $this->ttyMode = (bool) $ttyMode; - $this->ptyMode = (bool) $ptyMode; // Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big. // Workaround for this problem is to use temporary files instead of pipes on Windows platform. @@ -107,22 +104,10 @@ class ProcessPipes /** * Returns an array of descriptors for the use of proc_open. * - * @param bool $disableOutput Whether to redirect STDOUT and STDERR to /dev/null or not. - * * @return array */ - public function getDescriptors($disableOutput) + public function getDescriptors() { - if ($disableOutput) { - $nullstream = fopen(defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null', 'c'); - - return array( - array('pipe', 'r'), - $nullstream, - $nullstream, - ); - } - if ($this->useFiles) { // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/bug.php?id=51800) // We're not using file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650 @@ -140,12 +125,6 @@ class ProcessPipes array('file', '/dev/tty', 'w'), array('file', '/dev/tty', 'w'), ); - } elseif ($this->ptyMode && Process::isPtySupported()) { - return array( - array('pty'), - array('pty'), - array('pty'), - ); } return array( diff --git a/vendor/symfony/process/Symfony/Component/Process/ProcessUtils.php b/vendor/symfony/process/Symfony/Component/Process/ProcessUtils.php index 35ae17c..441522d 100644 --- a/vendor/symfony/process/Symfony/Component/Process/ProcessUtils.php +++ b/vendor/symfony/process/Symfony/Component/Process/ProcessUtils.php @@ -75,7 +75,7 @@ class ProcessUtils } /** - * Validates and normalizes a Process input + * Validates and normalized a Process input * * @param string $caller The name of method call that validates the input * @param mixed $input The input to validate @@ -87,11 +87,7 @@ class ProcessUtils public static function validateInput($caller, $input) { if (null !== $input) { - if (is_scalar($input)) { - return (string) $input; - } - // deprecated as of Symfony 2.5, to be removed in 3.0 - if (is_object($input) && method_exists($input, '__toString')) { + if (is_scalar($input) || (is_object($input) && method_exists($input, '__toString'))) { return (string) $input; } diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php index 4e0f4b5..57b6e16 100644 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php @@ -151,39 +151,39 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase $expectedLength = (1024 * $size) + 1; $p = $this->getProcess(sprintf('php -r %s', escapeshellarg($code))); - $p->setInput($expected); + $p->setStdin($expected); $p->run(); $this->assertEquals($expectedLength, strlen($p->getOutput())); $this->assertEquals($expectedLength, strlen($p->getErrorOutput())); } - public function testSetInputWhileRunningThrowsAnException() + public function testSetStdinWhileRunningThrowsAnException() { $process = $this->getProcess('php -r "usleep(500000);"'); $process->start(); try { - $process->setInput('foobar'); + $process->setStdin('foobar'); $process->stop(); $this->fail('A LogicException should have been raised.'); } catch (LogicException $e) { - $this->assertEquals('Input can not be set while the process is running.', $e->getMessage()); + $this->assertEquals('STDIN can not be set while the process is running.', $e->getMessage()); } $process->stop(); } /** - * @dataProvider provideInvalidInputValues + * @dataProvider provideInvalidStdinValues * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException - * @expectedExceptionMessage Symfony\Component\Process\Process::setInput only accepts strings. + * @expectedExceptionMessage Symfony\Component\Process\Process::setStdin only accepts strings. */ - public function testInvalidInput($value) + public function testInvalidStdin($value) { $process = $this->getProcess('php -v'); - $process->setInput($value); + $process->setStdin($value); } - public function provideInvalidInputValues() + public function provideInvalidStdinValues() { return array( array(array()), @@ -193,16 +193,16 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } /** - * @dataProvider provideInputValues + * @dataProvider provideStdinValues */ - public function testValidInput($expected, $value) + public function testValidStdin($expected, $value) { $process = $this->getProcess('php -v'); - $process->setInput($value); - $this->assertSame($expected, $process->getInput()); + $process->setStdin($value); + $this->assertSame($expected, $process->getStdin()); } - public function provideInputValues() + public function provideStdinValues() { return array( array(null, null), @@ -365,43 +365,6 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase $this->assertNull($process->getExitCodeText()); } - public function testPTYCommand() - { - if (!Process::isPtySupported()) { - $this->markTestSkipped('PTY is not supported on this operating system.'); - } - - $process = $this->getProcess('echo "foo"'); - $process->setPty(true); - $process->run(); - - $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); - $this->assertEquals("foo\r\n", $process->getOutput()); - } - - public function testMustRun() - { - $process = $this->getProcess('echo foo'); - - $this->assertSame($process, $process->mustRun()); - $this->assertEquals("foo".PHP_EOL, $process->getOutput()); - } - - public function testSuccessfulMustRunHasCorrectExitCode() - { - $process = $this->getProcess('echo foo')->mustRun(); - $this->assertEquals(0, $process->getExitCode()); - } - - /** - * @expectedException Symfony\Component\Process\Exception\ProcessFailedException - */ - public function testMustRunThrowsException() - { - $process = $this->getProcess('exit 1'); - $process->mustRun(); - } - public function testExitCodeText() { $process = $this->getProcess(''); @@ -685,9 +648,9 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase */ public function testIdleTimeout() { - $process = $this->getProcess('php -r "sleep(3);"'); + $process = $this->getProcess('sleep 3'); $process->setTimeout(10); - $process->setIdleTimeout(0.5); + $process->setIdleTimeout(1); try { $process->run(); @@ -696,7 +659,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } catch (ProcessTimedOutException $ex) { $this->assertTrue($ex->isIdleTimeout()); $this->assertFalse($ex->isGeneralTimeout()); - $this->assertEquals(0.5, $ex->getExceededTimeout()); + $this->assertEquals(1.0, $ex->getExceededTimeout()); } } @@ -705,9 +668,9 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase */ public function testIdleTimeoutNotExceededWhenOutputIsSent() { - $process = $this->getProcess('php -r "echo \'foo\'; sleep(1); echo \'foo\'; sleep(1); echo \'foo\'; sleep(1); "'); - $process->setTimeout(2); - $process->setIdleTimeout(1.5); + $process = $this->getProcess('echo "foo" && sleep 1 && echo "foo" && sleep 1 && echo "foo" && sleep 1 && echo "foo" && sleep 5'); + $process->setTimeout(5); + $process->setIdleTimeout(3); try { $process->run(); @@ -715,7 +678,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } catch (ProcessTimedOutException $ex) { $this->assertTrue($ex->isGeneralTimeout()); $this->assertFalse($ex->isIdleTimeout()); - $this->assertEquals(2, $ex->getExceededTimeout()); + $this->assertEquals(5.0, $ex->getExceededTimeout()); } } @@ -723,7 +686,6 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase { $process = $this->getProcess('php -r "$n = 1000; while ($n--) {echo \'\'; usleep(1000); }"'); $process->setTimeout(0.1); - try { $process->run(); $this->fail('An exception should have been raised.'); @@ -731,7 +693,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } $process->start(); - usleep(1000); + usleep(10000); $process->stop(); } @@ -887,108 +849,6 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase $process->signal('Céphalopodes'); } - public function testDisableOutputDisablesTheOutput() - { - $p = $this->getProcess('php -r "usleep(500000);"'); - $this->assertFalse($p->isOutputDisabled()); - $p->disableOutput(); - $this->assertTrue($p->isOutputDisabled()); - $p->enableOutput(); - $this->assertFalse($p->isOutputDisabled()); - } - - public function testDisableOutputWhileRunningThrowsException() - { - $p = $this->getProcess('php -r "usleep(500000);"'); - $p->start(); - $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Disabling output while the process is running is not possible.'); - $p->disableOutput(); - } - - public function testEnableOutputWhileRunningThrowsException() - { - $p = $this->getProcess('php -r "usleep(500000);"'); - $p->disableOutput(); - $p->start(); - $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Enabling output while the process is running is not possible.'); - $p->enableOutput(); - } - - public function testEnableOrDisableOutputAfterRunDoesNotThrowException() - { - $p = $this->getProcess('php -r "usleep(500000);"'); - $p->disableOutput(); - $p->start(); - $p->wait(); - $p->enableOutput(); - $p->disableOutput(); - } - - public function testDisableOutputWhileIdleTimeoutIsSet() - { - $process = $this->getProcess('sleep 3'); - $process->setIdleTimeout(1); - $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output can not be disabled while an idle timeout is set.'); - $process->disableOutput(); - } - - public function testSetIdleTimeoutWhileOutputIsDisabled() - { - $process = $this->getProcess('sleep 3'); - $process->disableOutput(); - $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Idle timeout can not be set while the output is disabled.'); - $process->setIdleTimeout(1); - } - - public function testSetNullIdleTimeoutWhileOutputIsDisabled() - { - $process = $this->getProcess('sleep 3'); - $process->disableOutput(); - $process->setIdleTimeout(null); - } - - /** - * @dataProvider provideStartMethods - */ - public function testStartWithACallbackAndDisabledOutput($startMethod) - { - $p = $this->getProcess('php -r "usleep(500000);"'); - $p->disableOutput(); - $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'); - call_user_func(array($p, $startMethod), function () {}); - } - - public function provideStartMethods() - { - return array( - array('start'), - array('run'), - array('mustRun'), - ); - } - - /** - * @dataProvider provideOutputFetchingMethods - */ - public function testGetOutputWhileDisabled($fetchMethod) - { - $p = $this->getProcess('php -r "usleep(500000);"'); - $p->disableOutput(); - $p->start(); - $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output has been disabled.'); - call_user_func(array($p, $fetchMethod)); - } - - public function provideOutputFetchingMethods() - { - return array( - array('getOutput'), - array('getIncrementalOutput'), - array('getErrorOutput'), - array('getIncrementalErrorOutput'), - ); - } - public function responsesCodeProvider() { return array( @@ -1034,7 +894,6 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase array('WorkingDirectory'), array('Env'), array('Stdin'), - array('Input'), array('Options') ); @@ -1042,16 +901,16 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } /** - * @param string $commandline - * @param null|string $cwd - * @param null|array $env - * @param null|string $input - * @param int $timeout - * @param array $options + * @param string $commandline + * @param null $cwd + * @param array $env + * @param null $stdin + * @param int $timeout + * @param array $options * * @return Process */ - abstract protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()); + abstract protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()); } class Stringifiable diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php index 56e4052..c543b49 100644 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php @@ -194,25 +194,6 @@ class ProcessBuilderTest extends \PHPUnit_Framework_TestCase } } - public function testShouldReturnProcessWithDisabledOutput() - { - $process = ProcessBuilder::create(array('/usr/bin/php')) - ->disableOutput() - ->getProcess(); - - $this->assertTrue($process->isOutputDisabled()); - } - - public function testShouldReturnProcessWithEnabledOutput() - { - $process = ProcessBuilder::create(array('/usr/bin/php')) - ->disableOutput() - ->enableOutput() - ->getProcess(); - - $this->assertFalse($process->isOutputDisabled()); - } - /** * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException * @expectedExceptionMessage Symfony\Component\Process\ProcessBuilder::setInput only accepts strings. diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php index c48648f..5da55e7 100644 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php @@ -54,33 +54,25 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase $process = $this->getMock( 'Symfony\Component\Process\Process', - array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled'), + array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText'), array($cmd) ); $process->expects($this->once()) ->method('isSuccessful') ->will($this->returnValue(false)); - $process->expects($this->once()) ->method('getOutput') ->will($this->returnValue($output)); - $process->expects($this->once()) ->method('getErrorOutput') ->will($this->returnValue($errorOutput)); - $process->expects($this->once()) ->method('getExitCode') ->will($this->returnValue($exitCode)); - $process->expects($this->once()) ->method('getExitCodeText') ->will($this->returnValue($exitText)); - $process->expects($this->once()) - ->method('isOutputDisabled') - ->will($this->returnValue(false)); - $exception = new ProcessFailedException($process); $this->assertEquals( @@ -88,49 +80,4 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase $exception->getMessage() ); } - - /** - * Tests that ProcessFailedException does not extract information from - * process output if it was previously disabled - */ - public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput() - { - $cmd = 'php'; - $exitCode = 1; - $exitText = 'General error'; - - $process = $this->getMock( - 'Symfony\Component\Process\Process', - array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput'), - array($cmd) - ); - $process->expects($this->once()) - ->method('isSuccessful') - ->will($this->returnValue(false)); - - $process->expects($this->never()) - ->method('getOutput'); - - $process->expects($this->never()) - ->method('getErrorOutput'); - - $process->expects($this->once()) - ->method('getExitCode') - ->will($this->returnValue($exitCode)); - - $process->expects($this->once()) - ->method('getExitCodeText') - ->will($this->returnValue($exitText)); - - $process->expects($this->once()) - ->method('isOutputDisabled') - ->will($this->returnValue(true)); - - $exception = new ProcessFailedException($process); - - $this->assertEquals( - "The command \"$cmd\" failed.\nExit Code: $exitCode($exitText)", - $exception->getMessage() - ); - } } diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php index d0a0f25..798e66a 100644 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php @@ -51,23 +51,7 @@ class SigchildDisabledProcessTest extends AbstractProcessTest /** * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testSuccessfulMustRunHasCorrectExitCode() - { - parent::testSuccessfulMustRunHasCorrectExitCode(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - */ - public function testMustRunThrowsException() - { - parent::testMustRunThrowsException(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException + * @expectedExceptionMessage his PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. */ public function testProcessIsSignaledIfStopped() { @@ -230,9 +214,9 @@ class SigchildDisabledProcessTest extends AbstractProcessTest /** * {@inheritdoc} */ - protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) + protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) { - $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $input, $timeout, $options); + $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options); $process->setEnhanceSigchildCompatibility(false); return $process; diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php index 05b9dad..65dd4bb 100644 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php @@ -123,9 +123,9 @@ class SigchildEnabledProcessTest extends AbstractProcessTest /** * {@inheritdoc} */ - protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) + protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) { - $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $input, $timeout, $options); + $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options); $process->setEnhanceSigchildCompatibility(true); return $process; diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php index 5c0f6d6..69ad3d5 100644 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php @@ -150,9 +150,9 @@ class SimpleProcessTest extends AbstractProcessTest /** * {@inheritdoc} */ - protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) + protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) { - return new Process($commandline, $cwd, $env, $input, $timeout, $options); + return new Process($commandline, $cwd, $env, $stdin, $timeout, $options); } private function skipIfPHPSigchild() diff --git a/vendor/symfony/process/Symfony/Component/Process/composer.json b/vendor/symfony/process/Symfony/Component/Process/composer.json index b5dbfe1..a05735b 100644 --- a/vendor/symfony/process/Symfony/Component/Process/composer.json +++ b/vendor/symfony/process/Symfony/Component/Process/composer.json @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md b/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md index 8b604ea..f0c616d 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md +++ b/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md @@ -1,13 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - - * [DEPRECATION] The `ApacheMatcherDumper` and `ApacheUrlMatcher` were deprecated and - will be removed in Symfony 3.0, since the performance gains were minimal and - it's hard to replicate the behaviour of PHP implementation. - 2.3.0 ----- diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php b/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php index 8d42030..c52fab4 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php @@ -92,7 +92,6 @@ EOF; $properties[] = $route->getRequirements(); $properties[] = $compiledRoute->getTokens(); $properties[] = $compiledRoute->getHostTokens(); - $properties[] = $route->getSchemes(); $routes .= sprintf(" '%s' => %s,\n", $name, str_replace("\n", '', var_export($properties, true))); } @@ -115,9 +114,9 @@ EOF; throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', \$name)); } - list(\$variables, \$defaults, \$requirements, \$tokens, \$hostTokens, \$requiredSchemes) = self::\$declaredRoutes[\$name]; + list(\$variables, \$defaults, \$requirements, \$tokens, \$hostTokens) = self::\$declaredRoutes[\$name]; - return \$this->doGenerate(\$variables, \$defaults, \$requirements, \$tokens, \$parameters, \$name, \$referenceType, \$hostTokens, \$requiredSchemes); + return \$this->doGenerate(\$variables, \$defaults, \$requirements, \$tokens, \$parameters, \$name, \$referenceType, \$hostTokens); } EOF; } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php b/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php index 899da20..c827ca7 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -137,7 +137,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt // the Route has a cache of its own and is not recompiled as long as it does not get modified $compiledRoute = $route->compile(); - return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $referenceType, $compiledRoute->getHostTokens(), $route->getSchemes()); + return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $referenceType, $compiledRoute->getHostTokens()); } /** @@ -145,7 +145,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt * @throws InvalidParameterException When a parameter value for a placeholder is not correct because * it does not match the requirement */ - protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = array()) + protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens) { $variables = array_flip($variables); $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters); @@ -204,24 +204,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt $schemeAuthority = ''; if ($host = $this->context->getHost()) { $scheme = $this->context->getScheme(); - - if ($requiredSchemes) { - $schemeMatched = false; - foreach ($requiredSchemes as $requiredScheme) { - if ($scheme === $requiredScheme) { - $schemeMatched = true; - - break; - } - } - - if (!$schemeMatched) { - $referenceType = self::ABSOLUTE_URL; - $scheme = current($requiredSchemes); - } - - } elseif (isset($requirements['_scheme']) && ($req = strtolower($requirements['_scheme'])) && $scheme !== $req) { - // We do this for BC; to be removed if _scheme is not supported anymore + if (isset($requirements['_scheme']) && ($req = strtolower($requirements['_scheme'])) && $scheme !== $req) { $referenceType = self::ABSOLUTE_URL; $scheme = $req; } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php index f6d4425..eb79a64 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php @@ -108,12 +108,58 @@ abstract class AnnotationClassLoader implements LoaderInterface throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); } + $globals = array( + 'path' => '', + 'requirements' => array(), + 'options' => array(), + 'defaults' => array(), + 'schemes' => array(), + 'methods' => array(), + 'host' => '', + 'condition' => '', + ); + $class = new \ReflectionClass($class); if ($class->isAbstract()) { throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class)); } - $globals = $this->getGlobals($class); + if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) { + // for BC reasons + if (null !== $annot->getPath()) { + $globals['path'] = $annot->getPath(); + } elseif (null !== $annot->getPattern()) { + $globals['path'] = $annot->getPattern(); + } + + if (null !== $annot->getRequirements()) { + $globals['requirements'] = $annot->getRequirements(); + } + + if (null !== $annot->getOptions()) { + $globals['options'] = $annot->getOptions(); + } + + if (null !== $annot->getDefaults()) { + $globals['defaults'] = $annot->getDefaults(); + } + + if (null !== $annot->getSchemes()) { + $globals['schemes'] = $annot->getSchemes(); + } + + if (null !== $annot->getMethods()) { + $globals['methods'] = $annot->getMethods(); + } + + if (null !== $annot->getHost()) { + $globals['host'] = $annot->getHost(); + } + + if (null !== $annot->getCondition()) { + $globals['condition'] = $annot->getCondition(); + } + } $collection = new RouteCollection(); $collection->addResource(new FileResource($class->getFileName())); @@ -158,7 +204,7 @@ abstract class AnnotationClassLoader implements LoaderInterface $condition = $globals['condition']; } - $route = $this->createRoute($globals['path'].$annot->getPath(), $defaults, $requirements, $options, $host, $schemes, $methods, $condition); + $route = new Route($globals['path'].$annot->getPath(), $defaults, $requirements, $options, $host, $schemes, $methods, $condition); $this->configureRoute($route, $class, $method, $annot); @@ -206,63 +252,5 @@ abstract class AnnotationClassLoader implements LoaderInterface return $name; } - protected function getGlobals(\ReflectionClass $class) - { - $globals = array( - 'path' => '', - 'requirements' => array(), - 'options' => array(), - 'defaults' => array(), - 'schemes' => array(), - 'methods' => array(), - 'host' => '', - 'condition' => '', - ); - - if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) { - // for BC reasons - if (null !== $annot->getPath()) { - $globals['path'] = $annot->getPath(); - } elseif (null !== $annot->getPattern()) { - $globals['path'] = $annot->getPattern(); - } - - if (null !== $annot->getRequirements()) { - $globals['requirements'] = $annot->getRequirements(); - } - - if (null !== $annot->getOptions()) { - $globals['options'] = $annot->getOptions(); - } - - if (null !== $annot->getDefaults()) { - $globals['defaults'] = $annot->getDefaults(); - } - - if (null !== $annot->getSchemes()) { - $globals['schemes'] = $annot->getSchemes(); - } - - if (null !== $annot->getMethods()) { - $globals['methods'] = $annot->getMethods(); - } - - if (null !== $annot->getHost()) { - $globals['host'] = $annot->getHost(); - } - - if (null !== $annot->getCondition()) { - $globals['condition'] = $annot->getCondition(); - } - } - - return $globals; - } - - protected function createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition) - { - return new Route($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); - } - abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot); } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php index 35b1dc5..55aac6b 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -16,10 +16,6 @@ use Symfony\Component\Routing\Exception\MethodNotAllowedException; /** * ApacheUrlMatcher matches URL based on Apache mod_rewrite matching (see ApacheMatcherDumper). * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. - * The performance gains are minimal and it's very hard to replicate - * the behavior of PHP implementation. - * * @author Fabien Potencier * @author Arnaud Le Blanc */ diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index fc76c19..5b32684 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -16,10 +16,6 @@ use Symfony\Component\Routing\Route; /** * Dumps a set of Apache mod_rewrite rules. * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. - * The performance gains are minimal and it's very hard to replicate - * the behavior of PHP implementation. - * * @author Fabien Potencier * @author Kris Wallsmith */ diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index b108fc1..19e74b0 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -288,15 +288,14 @@ EOF; EOF; } - if ($schemes = $route->getSchemes()) { + if ($scheme = $route->getRequirement('_scheme')) { if (!$supportsRedirections) { - throw new \LogicException('The "schemes" requirement is only supported for URL matchers that implement RedirectableUrlMatcherInterface.'); + throw new \LogicException('The "_scheme" requirement is only supported for URL matchers that implement RedirectableUrlMatcherInterface.'); } - $schemes = str_replace("\n", '', var_export(array_flip($schemes), true)); + $code .= <<context->getScheme()])) { - return \$this->redirect(\$pathinfo, '$name', key(\$requiredSchemes)); + if (\$this->context->getScheme() !== '$scheme') { + return \$this->redirect(\$pathinfo, '$name', '$scheme'); } @@ -314,11 +313,8 @@ EOF; } $vars[] = "array('_route' => '$name')"; - $code .= sprintf( - " return \$this->mergeDefaults(array_replace(%s), %s);\n", - implode(', ', $vars), - str_replace("\n", '', var_export($route->getDefaults(), true)) - ); + $code .= sprintf(" return \$this->mergeDefaults(array_replace(%s), %s);\n" + , implode(', ', $vars), str_replace("\n", '', var_export($route->getDefaults(), true))); } elseif ($route->getDefaults()) { $code .= sprintf(" return %s;\n", str_replace("\n", '', var_export(array_replace($route->getDefaults(), array('_route' => $name)), true))); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php index 236f55a..3435a57 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php @@ -56,10 +56,9 @@ abstract class RedirectableUrlMatcher extends UrlMatcher implements Redirectable } // check HTTP scheme requirement - $scheme = $this->context->getScheme(); - $schemes = $route->getSchemes(); - if ($schemes && !$route->hasScheme($scheme)) { - return array(self::ROUTE_MATCH, $this->redirect($pathinfo, $name, current($schemes))); + $scheme = $route->getRequirement('_scheme'); + if ($scheme && $this->context->getScheme() !== $scheme) { + return array(self::ROUTE_MATCH, $this->redirect($pathinfo, $name, $scheme)); } return array(self::REQUIREMENT_MATCH, null); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php index 22af699..1dd57f0 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php @@ -103,11 +103,9 @@ class TraceableUrlMatcher extends UrlMatcher } // check HTTP scheme requirement - if ($requiredSchemes = $route->getSchemes()) { - $scheme = $this->context->getScheme(); - - if (!$route->hasScheme($scheme)) { - $this->addTrace(sprintf('Scheme "%s" does not match any of the required schemes ("%s"); the user will be redirected to first required scheme', $scheme, implode(', ', $requiredSchemes)), self::ROUTE_ALMOST_MATCHES, $name, $route); + if ($scheme = $route->getRequirement('_scheme')) { + if ($this->context->getScheme() !== $scheme) { + $this->addTrace(sprintf('Scheme "%s" does not match the requirement ("%s"); the user will be redirected', $this->context->getScheme(), $scheme), self::ROUTE_ALMOST_MATCHES, $name, $route); return true; } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php index 8d081a8..5c56078 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -205,8 +205,8 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface } // check HTTP scheme requirement - $scheme = $this->context->getScheme(); - $status = $route->getSchemes() && !$route->hasScheme($scheme) ? self::REQUIREMENT_MISMATCH : self::REQUIREMENT_MATCH; + $scheme = $route->getRequirement('_scheme'); + $status = $scheme && $scheme !== $this->context->getScheme() ? self::REQUIREMENT_MISMATCH : self::REQUIREMENT_MATCH; return array($status, null); } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Route.php b/vendor/symfony/routing/Symfony/Component/Routing/Route.php index ad8ec49..65c00d8 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Route.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Route.php @@ -248,25 +248,6 @@ class Route implements \Serializable } /** - * Checks if a scheme requirement has been set. - * - * @param string $scheme - * - * @return bool true if the scheme requirement exists, otherwise false - */ - public function hasScheme($scheme) - { - $scheme = strtolower($scheme); - foreach ($this->schemes as $requiredScheme) { - if ($scheme === $requiredScheme) { - return true; - } - } - - return false; - } - - /** * Returns the uppercased HTTP methods this route is restricted to. * So an empty array means that any method is allowed. * diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php index acf1163..d7b99d6 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php @@ -321,9 +321,8 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // secure if ($pathinfo === '/secure') { - $requiredSchemes = array ( 'https' => 0,); - if (!isset($requiredSchemes[$this->context->getScheme()])) { - return $this->redirect($pathinfo, 'secure', key($requiredSchemes)); + if ($this->context->getScheme() !== 'https') { + return $this->redirect($pathinfo, 'secure', 'https'); } return array('_route' => 'secure'); @@ -331,9 +330,8 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // nonsecure if ($pathinfo === '/nonsecure') { - $requiredSchemes = array ( 'http' => 0,); - if (!isset($requiredSchemes[$this->context->getScheme()])) { - return $this->redirect($pathinfo, 'nonsecure', key($requiredSchemes)); + if ($this->context->getScheme() !== 'http') { + return $this->redirect($pathinfo, 'nonsecure', 'http'); } return array('_route' => 'nonsecure'); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php index 4165741..ab5f4cd 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -60,7 +60,7 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase $this->routeCollection->add('Test2', new Route('/testing2')); file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump()); - include $this->testTmpFilepath; + include ($this->testTmpFilepath); $projectUrlGenerator = new \ProjectUrlGenerator(new RequestContext('/app.php')); @@ -81,7 +81,7 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase public function testDumpWithoutRoutes() { file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'WithoutRoutesUrlGenerator'))); - include $this->testTmpFilepath; + include ($this->testTmpFilepath); $projectUrlGenerator = new \WithoutRoutesUrlGenerator(new RequestContext('/app.php')); @@ -96,7 +96,7 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase $this->routeCollection->add('Test', new Route('/test')); file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'NonExistingRoutesUrlGenerator'))); - include $this->testTmpFilepath; + include ($this->testTmpFilepath); $projectUrlGenerator = new \NonExistingRoutesUrlGenerator(new RequestContext()); $url = $projectUrlGenerator->generate('NonExisting', array()); @@ -107,44 +107,11 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase $this->routeCollection->add('Test', new Route('/testing/{foo}', array('foo' => 'bar'))); file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'DefaultRoutesUrlGenerator'))); - include $this->testTmpFilepath; + include ($this->testTmpFilepath); $projectUrlGenerator = new \DefaultRoutesUrlGenerator(new RequestContext()); $url = $projectUrlGenerator->generate('Test', array()); $this->assertEquals($url, '/testing'); } - - public function testDumpWithSchemeRequirement() - { - $this->routeCollection->add('Test1', new Route('/testing', array(), array(), array(), '', array('ftp', 'https'))); - $this->routeCollection->add('Test2', new Route('/testing_bc', array(), array('_scheme' => 'https'))); // BC - - file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'SchemeUrlGenerator'))); - include $this->testTmpFilepath; - - $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php')); - - $absoluteUrl = $projectUrlGenerator->generate('Test1', array(), true); - $absoluteUrlBC = $projectUrlGenerator->generate('Test2', array(), true); - $relativeUrl = $projectUrlGenerator->generate('Test1', array(), false); - $relativeUrlBC = $projectUrlGenerator->generate('Test2', array(), false); - - $this->assertEquals($absoluteUrl, 'ftp://localhost/app.php/testing'); - $this->assertEquals($absoluteUrlBC, 'https://localhost/app.php/testing_bc'); - $this->assertEquals($relativeUrl, 'ftp://localhost/app.php/testing'); - $this->assertEquals($relativeUrlBC, 'https://localhost/app.php/testing_bc'); - - $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php', 'GET', 'localhost', 'https')); - - $absoluteUrl = $projectUrlGenerator->generate('Test1', array(), true); - $absoluteUrlBC = $projectUrlGenerator->generate('Test2', array(), true); - $relativeUrl = $projectUrlGenerator->generate('Test1', array(), false); - $relativeUrlBC = $projectUrlGenerator->generate('Test2', array(), false); - - $this->assertEquals($absoluteUrl, 'https://localhost/app.php/testing'); - $this->assertEquals($absoluteUrlBC, 'https://localhost/app.php/testing_bc'); - $this->assertEquals($relativeUrl, '/app.php/testing'); - $this->assertEquals($relativeUrlBC, '/app.php/testing_bc'); - } } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php index 143e344..2ab21b2 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -244,40 +244,22 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase public function testSchemeRequirementDoesNothingIfSameCurrentScheme() { - $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); // BC + $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); $this->assertEquals('/app.php/', $this->getGenerator($routes)->generate('test')); - $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'https'))); // BC - $this->assertEquals('/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); - - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('http'))); - $this->assertEquals('/app.php/', $this->getGenerator($routes)->generate('test')); - - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('https'))); + $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'https'))); $this->assertEquals('/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); } public function testSchemeRequirementForcesAbsoluteUrl() { - $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'https'))); // BC - $this->assertEquals('https://localhost/app.php/', $this->getGenerator($routes)->generate('test')); - - $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); // BC - $this->assertEquals('http://localhost/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); - - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('https'))); + $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'https'))); $this->assertEquals('https://localhost/app.php/', $this->getGenerator($routes)->generate('test')); - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('http'))); + $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); $this->assertEquals('http://localhost/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); } - public function testSchemeRequirementCreatesUrlForFirstRequiredScheme() - { - $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('Ftp', 'https'))); - $this->assertEquals('ftp://localhost/app.php/', $this->getGenerator($routes)->generate('test')); - } - public function testPathWithTwoStartingSlashes() { $routes = $this->getRoutes('test', new Route('//path-and-not-domain')); @@ -461,27 +443,9 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase $this->assertNull($generator->generate('test', array('foo' => 'baz'), false)); } - public function testGenerateNetworkPathBC() - { - $routes = $this->getRoutes('test', new Route('/{name}', array(), array('_scheme' => 'http'), array(), '{locale}.example.com')); - - $this->assertSame('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', - array('name' =>'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'network path with different host' - ); - $this->assertSame('//fr.example.com/app.php/Fabien?query=string', $this->getGenerator($routes, array('host' => 'fr.example.com'))->generate('test', - array('name' =>'Fabien', 'locale' => 'fr', 'query' => 'string'), UrlGeneratorInterface::NETWORK_PATH), 'network path although host same as context' - ); - $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test', - array('name' =>'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'absolute URL because scheme requirement does not match context' - ); - $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', - array('name' =>'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::ABSOLUTE_URL), 'absolute URL with same scheme because it is requested' - ); - } - public function testGenerateNetworkPath() { - $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com', array('http'))); + $routes = $this->getRoutes('test', new Route('/{name}', array(), array('_scheme' => 'http'), array(), '{locale}.example.com')); $this->assertSame('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', array('name' =>'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'network path with different host' @@ -503,8 +467,7 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase $routes->add('article', new Route('/{author}/{article}/')); $routes->add('comments', new Route('/{author}/{article}/comments')); $routes->add('host', new Route('/{article}', array(), array(), array(), '{author}.example.com')); - $routes->add('schemeBC', new Route('/{author}', array(), array('_scheme' => 'https'))); // BC - $routes->add('scheme', new Route('/{author}/blog', array(), array(), array(), '', array('https'))); + $routes->add('scheme', new Route('/{author}', array(), array('_scheme' => 'https'))); $routes->add('unrelated', new Route('/about')); $generator = $this->getGenerator($routes, array('host' => 'example.com', 'pathInfo' => '/fabien/symfony-is-great/')); @@ -524,12 +487,9 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase $this->assertSame('//bernhard.example.com/app.php/forms-are-great', $generator->generate('host', array('author' =>'bernhard', 'article' => 'forms-are-great'), UrlGeneratorInterface::RELATIVE_PATH) ); - $this->assertSame('https://example.com/app.php/bernhard', $generator->generate('schemeBC', + $this->assertSame('https://example.com/app.php/bernhard', $generator->generate('scheme', array('author' =>'bernhard'), UrlGeneratorInterface::RELATIVE_PATH) ); - $this->assertSame('https://example.com/app.php/bernhard/blog', $generator->generate('scheme', - array('author' =>'bernhard'), UrlGeneratorInterface::RELATIVE_PATH) - ); $this->assertSame('../../about', $generator->generate('unrelated', array(), UrlGeneratorInterface::RELATIVE_PATH) ); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php index 3b39a66..c609979 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -125,32 +125,6 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $this->assertEquals($routeDatas['condition'], $route->getCondition(), '->load preserves condition annotation'); } - public function testClassRouteLoad() - { - $classRouteDatas = array('path' => '/classRoutePrefix'); - - $routeDatas = array( - 'name' => 'route1', - 'path' => '/', - ); - - $this->reader - ->expects($this->once()) - ->method('getClassAnnotation') - ->will($this->returnValue($this->getAnnotatedRoute($classRouteDatas))) - ; - - $this->reader - ->expects($this->once()) - ->method('getMethodAnnotations') - ->will($this->returnValue(array($this->getAnnotatedRoute($routeDatas)))) - ; - $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass'); - $route = $routeCollection->get($routeDatas['name']); - - $this->assertSame($classRouteDatas['path'].$routeDatas['path'], $route->getPath(), '->load preserves class route path annotation'); - } - private function getAnnotatedRoute($datas) { return new Route($datas); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php index e6c8029..f83b9ec 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php @@ -64,7 +64,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase $this->assertSame('MyBundle:Blog:show', $route->getDefault('_controller')); $this->assertSame('\w+', $route->getRequirement('slug')); $this->assertSame('en|fr|de', $route->getRequirement('_locale')); - $this->assertNull($route->getDefault('slug')); + $this->assertSame(null, $route->getDefault('slug')); $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php index 5cbb605..2ad4fc8 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php @@ -41,7 +41,7 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase $matcher->match('/foo'); } - public function testSchemeRedirectBC() + public function testSchemeRedirect() { $coll = new RouteCollection(); $coll->add('foo', new Route('/foo', array(), array('_scheme' => 'https'))); @@ -55,32 +55,4 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase ; $matcher->match('/foo'); } - - public function testSchemeRedirectRedirectsToFirstScheme() - { - $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('FTP', 'HTTPS'))); - - $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext())); - $matcher - ->expects($this->once()) - ->method('redirect') - ->with('/foo', 'foo', 'ftp') - ->will($this->returnValue(array('_route' => 'foo'))) - ; - $matcher->match('/foo'); - } - - public function testNoSchemaRedirectIfOnOfMultipleSchemesMatches() - { - $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https', 'http'))); - - $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext())); - $matcher - ->expects($this->never()) - ->method('redirect') - ; - $matcher->match('/foo'); - } } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php index b03b0c3..b31cada 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php @@ -313,20 +313,10 @@ class UrlMatcherTest extends \PHPUnit_Framework_TestCase /** * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException */ - public function testSchemeRequirementBC() - { - $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array('_scheme' => 'https'))); - $matcher = new UrlMatcher($coll, new RequestContext()); - $matcher->match('/foo'); - } - /** - * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException - */ public function testSchemeRequirement() { $coll = new RouteCollection(); - $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https'))); + $coll->add('foo', new Route('/foo', array(), array('_scheme' => 'https'))); $matcher = new UrlMatcher($coll, new RequestContext()); $matcher->match('/foo'); } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php index cbd5ccb..47f285b 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php @@ -153,15 +153,10 @@ class RouteTest extends \PHPUnit_Framework_TestCase { $route = new Route('/'); $this->assertEquals(array(), $route->getSchemes(), 'schemes is initialized with array()'); - $this->assertFalse($route->hasScheme('http')); $route->setSchemes('hTTp'); $this->assertEquals(array('http'), $route->getSchemes(), '->setSchemes() accepts a single scheme string and lowercases it'); - $this->assertTrue($route->hasScheme('htTp')); - $this->assertFalse($route->hasScheme('httpS')); $route->setSchemes(array('HttpS', 'hTTp')); $this->assertEquals(array('https', 'http'), $route->getSchemes(), '->setSchemes() accepts an array of schemes and lowercases them'); - $this->assertTrue($route->hasScheme('htTp')); - $this->assertTrue($route->hasScheme('httpS')); } public function testSchemeIsBC() @@ -170,9 +165,6 @@ class RouteTest extends \PHPUnit_Framework_TestCase $route->setRequirement('_scheme', 'http|https'); $this->assertEquals('http|https', $route->getRequirement('_scheme')); $this->assertEquals(array('http', 'https'), $route->getSchemes()); - $this->assertTrue($route->hasScheme('https')); - $this->assertTrue($route->hasScheme('http')); - $this->assertFalse($route->hasScheme('ftp')); $route->setSchemes(array('hTTp')); $this->assertEquals('http', $route->getRequirement('_scheme')); $route->setSchemes(array()); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/composer.json b/vendor/symfony/routing/Symfony/Component/Routing/composer.json index 9a88cc1..3517b23 100644 --- a/vendor/symfony/routing/Symfony/Component/Routing/composer.json +++ b/vendor/symfony/routing/Symfony/Component/Routing/composer.json @@ -38,7 +38,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php index 11c3cda..21ce8d0 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php @@ -47,23 +47,23 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn $this->providerKey = $providerKey; } - /** - * {@inheritdoc} - */ - public function authenticate(TokenInterface $token) - { - if (!$this->supports($token)) { - return; - } + /** + * {@inheritdoc} + */ + public function authenticate(TokenInterface $token) + { + if (!$this->supports($token)) { + return; + } if (!$user = $token->getUser()) { throw new BadCredentialsException('No pre-authenticated principal found in request.'); } - /* +/* if (null === $token->getCredentials()) { throw new BadCredentialsException('No pre-authenticated credentials found in request.'); } - */ +*/ $user = $this->userProvider->loadUserByUsername($user); $this->userChecker->checkPostAuth($user); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index 84856f6..726f62e 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -22,10 +22,6 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; */ class AccessDecisionManager implements AccessDecisionManagerInterface { - const STRATEGY_AFFIRMATIVE = 'affirmative'; - const STRATEGY_CONSENSUS = 'consensus'; - const STRATEGY_UNANIMOUS = 'unanimous'; - private $voters; private $strategy; private $allowIfAllAbstainDecisions; @@ -41,7 +37,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface * * @throws \InvalidArgumentException */ - public function __construct(array $voters, $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true) + public function __construct(array $voters, $strategy = 'affirmative', $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true) { if (!$voters) { throw new \InvalidArgumentException('You must at least add one voter.'); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php index 97d707b..b27c2b0 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php @@ -89,9 +89,7 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface /** * Checks if the password is too long. * - * @param string $password The password - * - * @return bool true if the password is too long, false otherwise + * @return bool true if the password is too long, false otherwise */ protected function isPasswordTooLong($password) { diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php index 77021ec..0337380 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php @@ -30,32 +30,19 @@ class EncoderFactory implements EncoderFactoryInterface */ public function getEncoder($user) { - $encoderKey = null; - - if ($user instanceof EncoderAwareInterface && (null !== $encoderName = $user->getEncoderName())) { - if (!array_key_exists($encoderName, $this->encoders)) { - throw new \RuntimeException(sprintf('The encoder "%s" was not configured.', $encoderName)); + foreach ($this->encoders as $class => $encoder) { + if ((is_object($user) && !$user instanceof $class) || (!is_object($user) && !is_subclass_of($user, $class) && $user != $class)) { + continue; } - $encoderKey = $encoderName; - } else { - foreach ($this->encoders as $class => $encoder) { - if ((is_object($user) && $user instanceof $class) || (!is_object($user) && (is_subclass_of($user, $class) || $user == $class))) { - $encoderKey = $class; - break; - } + if (!$encoder instanceof PasswordEncoderInterface) { + return $this->encoders[$class] = $this->createEncoder($encoder); } - } - - if (null === $encoderKey) { - throw new \RuntimeException(sprintf('No encoder has been configured for account "%s".', is_object($user) ? get_class($user) : $user)); - } - if (!$this->encoders[$encoderKey] instanceof PasswordEncoderInterface) { - $this->encoders[$encoderKey] = $this->createEncoder($this->encoders[$encoderKey]); + return $this->encoders[$class]; } - return $this->encoders[$encoderKey]; + throw new \RuntimeException(sprintf('No encoder has been configured for account "%s".', is_object($user) ? get_class($user) : $user)); } /** diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/README.md b/vendor/symfony/security-core/Symfony/Component/Security/Core/README.md index 4585a5d..7fc281d 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/README.md +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/README.md @@ -11,7 +11,7 @@ Resources Documentation: -http://symfony.com/doc/2.5/book/security.html +http://symfony.com/doc/2.4/book/security.html Tests ----- diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchy.php index 793007e..2e7df0e 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchy.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchy.php @@ -19,7 +19,7 @@ namespace Symfony\Component\Security\Core\Role; class RoleHierarchy implements RoleHierarchyInterface { private $hierarchy; - protected $map; + private $map; /** * Constructor. @@ -52,7 +52,7 @@ class RoleHierarchy implements RoleHierarchyInterface return $reachableRoles; } - protected function buildRoleMap() + private function buildRoleMap() { $this->map = array(); foreach ($this->hierarchy as $main => $roles) { diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php index f63ef79..b053d73 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php @@ -129,7 +129,7 @@ class AuthenticationProviderManagerTest extends \PHPUnit_Framework_TestCase } elseif (null !== $exception) { $provider->expects($this->once()) ->method('authenticate') - ->will($this->throwException($this->getMock($exception, null, array(), '', true))) + ->will($this->throwException($this->getMock($exception, null, array(), '', false))) ; } diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php index ae96f10..3e285d7 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php @@ -14,7 +14,6 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder; use Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { @@ -38,7 +37,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); $userProvider->expects($this->once()) ->method('loadUserByUsername') - ->will($this->throwException(new UsernameNotFoundException())) + ->will($this->throwException($this->getMock('Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException', null, array(), '', false))) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')); @@ -56,7 +55,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); $userProvider->expects($this->once()) ->method('loadUserByUsername') - ->will($this->throwException(new \RuntimeException())) + ->will($this->throwException($this->getMock('RuntimeException', null, array(), '', false))) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php index 5fd7b05..4a8bf6c 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider; -use Symfony\Component\Security\Core\Exception\LockedException; class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { @@ -80,7 +79,7 @@ class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_Test $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException(new LockedException())) + ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\LockedException', null, array(), '', false))) ; $provider = $this->getProvider($user, $userChecker); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php index d278ba4..43da274 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider; -use Symfony\Component\Security\Core\Exception\AccountExpiredException; +use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; use Symfony\Component\Security\Core\Role\Role; class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase @@ -52,7 +52,7 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException(new AccountExpiredException())) + ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\AccountExpiredException', null, array(), '', false))) ; $provider = $this->getProvider($userChecker); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php index 0503054..db47589 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php @@ -11,12 +11,10 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; -use Symfony\Component\Security\Core\Exception\AccountExpiredException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\CredentialsExpiredException; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider; use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Security\Core\Role\SwitchUserRole; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { @@ -43,7 +41,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $provider = $this->getProvider(false, false); $provider->expects($this->once()) ->method('retrieveUser') - ->will($this->throwException(new UsernameNotFoundException())) + ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\UsernameNotFoundException', null, array(), '', false))) ; $provider->authenticate($this->getSupportedToken()); @@ -57,7 +55,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $provider = $this->getProvider(false, true); $provider->expects($this->once()) ->method('retrieveUser') - ->will($this->throwException(new UsernameNotFoundException())) + ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\UsernameNotFoundException', null, array(), '', false))) ; $provider->authenticate($this->getSupportedToken()); @@ -85,7 +83,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPreAuth') - ->will($this->throwException(new CredentialsExpiredException())) + ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\CredentialsExpiredException', null, array(), '', false))) ; $provider = $this->getProvider($userChecker); @@ -105,7 +103,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException(new AccountExpiredException())) + ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\AccountExpiredException', null, array(), '', false))) ; $provider = $this->getProvider($userChecker); @@ -130,7 +128,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase ; $provider->expects($this->once()) ->method('checkAuthentication') - ->will($this->throwException(new BadCredentialsException())) + ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\BadCredentialsException', null, array(), '', false))) ; $provider->authenticate($this->getSupportedToken()); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php index e182838..b0557a3 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php @@ -77,34 +77,34 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase { return array( // affirmative - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 0, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 2, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 1, 0), false, true, false), - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), false, true, false), - array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), true, true, true), + array('affirmative', $this->getVoters(1, 0, 0), false, true, true), + array('affirmative', $this->getVoters(1, 2, 0), false, true, true), + array('affirmative', $this->getVoters(0, 1, 0), false, true, false), + array('affirmative', $this->getVoters(0, 0, 1), false, true, false), + array('affirmative', $this->getVoters(0, 0, 1), true, true, true), // consensus - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 0, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 2, 0), false, true, false), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 1, 0), false, true, true), + array('consensus', $this->getVoters(1, 0, 0), false, true, true), + array('consensus', $this->getVoters(1, 2, 0), false, true, false), + array('consensus', $this->getVoters(2, 1, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), false, true, false), + array('consensus', $this->getVoters(0, 0, 1), false, true, false), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), true, true, true), + array('consensus', $this->getVoters(0, 0, 1), true, true, true), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, true, true), + array('consensus', $this->getVoters(2, 2, 0), false, true, true), + array('consensus', $this->getVoters(2, 2, 1), false, true, true), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, false, false), - array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, false, false), + array('consensus', $this->getVoters(2, 2, 0), false, false, false), + array('consensus', $this->getVoters(2, 2, 1), false, false, false), // unanimous - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 0), false, true, true), - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 1), false, true, true), - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 1, 0), false, true, false), + array('unanimous', $this->getVoters(1, 0, 0), false, true, true), + array('unanimous', $this->getVoters(1, 0, 1), false, true, true), + array('unanimous', $this->getVoters(1, 1, 0), false, true, false), - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), false, true, false), - array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), true, true, true), + array('unanimous', $this->getVoters(0, 0, 2), false, true, false), + array('unanimous', $this->getVoters(0, 0, 2), true, true, true), ); } diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php index 3d34d04..18c8c4a 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Security\Core\Tests\Encoder; use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; use Symfony\Component\Security\Core\Encoder\EncoderFactory; -use Symfony\Component\Security\Core\Encoder\EncoderAwareInterface; use Symfony\Component\Security\Core\User\User; use Symfony\Component\Security\Core\User\UserInterface; @@ -79,59 +78,6 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); } - - public function testGetNamedEncoderForEncoderAware() - { - $factory = new EncoderFactory(array( - 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha256'), - 'encoder_name' => new MessageDigestPasswordEncoder('sha1') - )); - - $encoder = $factory->getEncoder(new EncAwareUser('user', 'pass')); - $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); - $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); - } - - public function testGetNullNamedEncoderForEncoderAware() - { - $factory = new EncoderFactory(array( - 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), - 'encoder_name' => new MessageDigestPasswordEncoder('sha256') - )); - - $user = new EncAwareUser('user', 'pass'); - $user->encoderName = null; - $encoder = $factory->getEncoder($user); - $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); - $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); - } - - /** - * @expectedException RuntimeException - */ - public function testGetInvalidNamedEncoderForEncoderAware() - { - $factory = new EncoderFactory(array( - 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), - 'encoder_name' => new MessageDigestPasswordEncoder('sha256') - )); - - $user = new EncAwareUser('user', 'pass'); - $user->encoderName = 'invalid_encoder_name'; - $encoder = $factory->getEncoder($user); - } - - public function testGetEncoderForEncoderAwareWithClassName() - { - $factory = new EncoderFactory(array( - 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), - 'encoder_name' => new MessageDigestPasswordEncoder('sha256') - )); - - $encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser'); - $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); - $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); - } } class SomeUser implements UserInterface @@ -146,13 +92,3 @@ class SomeUser implements UserInterface class SomeChildUser extends SomeUser { } - -class EncAwareUser extends SomeUser implements EncoderAwareInterface -{ - public $encoderName = 'encoder_name'; - - public function getEncoderName() - { - return $this->encoderName; - } -} diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php index 5f9ad2a..ab455f3 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php @@ -17,7 +17,6 @@ use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; class UserPasswordValidator extends ConstraintValidator { @@ -35,10 +34,6 @@ class UserPasswordValidator extends ConstraintValidator */ public function validate($password, Constraint $constraint) { - if (!$constraint instanceof UserPassword) { - throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UserPassword'); - } - $user = $this->securityContext->getToken()->getUser(); if (!$user instanceof UserInterface) { diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/composer.json b/vendor/symfony/security-core/Symfony/Component/Security/Core/composer.json index 249d4c1..acadcf7 100644 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/composer.json +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/composer.json @@ -40,7 +40,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/CHANGELOG.md b/vendor/symfony/translation/Symfony/Component/Translation/CHANGELOG.md index 8aedc37..b8027ab 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/CHANGELOG.md +++ b/vendor/symfony/translation/Symfony/Component/Translation/CHANGELOG.md @@ -1,13 +1,6 @@ CHANGELOG ========= -2.5.0 ------ - - * added relative file path template to the file dumpers - * added optional backup to the file dumpers - * changed IcuResFileDumper to extend FileDumper - 2.3.0 ----- diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php index 7672400..853f177 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php @@ -25,40 +25,6 @@ use Symfony\Component\Translation\MessageCatalogue; abstract class FileDumper implements DumperInterface { /** - * A template for the relative paths to files. - * - * @var string - */ - protected $relativePathTemplate = '%domain%.%locale%.%extension%'; - - /** - * Make file backup before the dump. - * - * @var bool - */ - private $backup = true; - - /** - * Sets the template for the relative paths to files. - * - * @param string $relativePathTemplate A template for the relative paths to files - */ - public function setRelativePathTemplate($relativePathTemplate) - { - $this->relativePathTemplate = $relativePathTemplate; - } - - /** - * Sets backup flag. - * - * @param bool - */ - public function setBackup($backup) - { - $this->backup = $backup; - } - - /** * {@inheritdoc} */ public function dump(MessageCatalogue $messages, $options = array()) @@ -69,17 +35,11 @@ abstract class FileDumper implements DumperInterface // save a file for each domain foreach ($messages->getDomains() as $domain) { + $file = $domain.'.'.$messages->getLocale().'.'.$this->getExtension(); // backup - $fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale()); + $fullpath = $options['path'].'/'.$file; if (file_exists($fullpath)) { - if ($this->backup) { - copy($fullpath, $fullpath.'~'); - } - } else { - $directory = dirname($fullpath); - if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { - throw new \RuntimeException(sprintf('Unable to create directory "%s".', $directory)); - } + copy($fullpath, $fullpath.'~'); } // save file file_put_contents($fullpath, $this->format($messages, $domain)); @@ -102,21 +62,4 @@ abstract class FileDumper implements DumperInterface * @return string file extension */ abstract protected function getExtension(); - - /** - * Gets the relative file path using the template. - * - * @param string $domain The domain - * @param string $locale The locale - * - * @return string The relative file path - */ - private function getRelativePath($domain, $locale) - { - return strtr($this->relativePathTemplate, array( - '%domain%' => $domain, - '%locale%' => $locale, - '%extension%' => $this->getExtension() - )); - } } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php index 0a2ed9f..2da7cf3 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php @@ -18,12 +18,35 @@ use Symfony\Component\Translation\MessageCatalogue; * * @author Stealth35 */ -class IcuResFileDumper extends FileDumper +class IcuResFileDumper implements DumperInterface { /** * {@inheritdoc} */ - protected $relativePathTemplate = '%domain%/%locale%.%extension%'; + public function dump(MessageCatalogue $messages, $options = array()) + { + if (!array_key_exists('path', $options)) { + throw new \InvalidArgumentException('The file dumper need a path options.'); + } + + // save a file for each domain + foreach ($messages->getDomains() as $domain) { + $file = $messages->getLocale().'.'.$this->getExtension(); + $path = $options['path'].'/'.$domain.'/'; + + if (!file_exists($path)) { + mkdir($path); + } + + // backup + if (file_exists($path.$file)) { + copy($path.$file, $path.$file.'~'); + } + + // save file + file_put_contents($path.$file, $this->format($messages, $domain)); + } + } /** * {@inheritdoc} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/MessageSelector.php b/vendor/symfony/translation/Symfony/Component/Translation/MessageSelector.php index cdf814e..1802d16 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/MessageSelector.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/MessageSelector.php @@ -82,7 +82,7 @@ class MessageSelector return $standardRules[0]; } - throw new \InvalidArgumentException(sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $message, $locale, $number)); + throw new \InvalidArgumentException(sprintf('Unable to choose a translation for "%s" with locale "%s". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $message, $locale)); } return $standardRules[$position]; diff --git a/vendor/symfony/translation/Symfony/Component/Translation/PluralizationRules.php b/vendor/symfony/translation/Symfony/Component/Translation/PluralizationRules.php index 221be60..b09a787 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/PluralizationRules.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/PluralizationRules.php @@ -18,6 +18,7 @@ namespace Symfony\Component\Translation; */ class PluralizationRules { + // @codeCoverageIgnoreStart private static $rules = array(); /** @@ -211,4 +212,6 @@ class PluralizationRules self::$rules[$locale] = $rule; } + + // @codeCoverageIgnoreEnd } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/README.md b/vendor/symfony/translation/Symfony/Component/Translation/README.md index 641db87..bfcdfe1 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/README.md +++ b/vendor/symfony/translation/Symfony/Component/Translation/README.md @@ -26,7 +26,7 @@ https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/TranslationServic Documentation: -http://symfony.com/doc/2.5/book/translation.html +http://symfony.com/doc/2.4/book/translation.html You can run the unit tests with the following command: diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php index 4c188ac..cb30c66 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php @@ -26,13 +26,14 @@ class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir() . '/IcuResFileDumperTest'; + mkdir($tempDir); $dumper = new IcuResFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resourcebundle/res/en.res'), file_get_contents($tempDir.'/messages/en.res')); - @unlink($tempDir.'/messages/en.res'); - @rmdir($tempDir.'/messages'); - @rmdir($tempDir); + unlink($tempDir.'/messages/en.res'); + rmdir($tempDir.'/messages'); + rmdir($tempDir); } } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php b/vendor/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php index 8d90797..9d70c12 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php @@ -40,16 +40,6 @@ class TranslationWriter } /** - * Disables dumper backup. - */ - public function disableBackup() - { - foreach ($this->dumpers as $dumper) { - $dumper->setBackup(false); - } - } - - /** * Obtains the list of supported formats. * * @return array diff --git a/vendor/symfony/translation/Symfony/Component/Translation/composer.json b/vendor/symfony/translation/Symfony/Component/Translation/composer.json index 37fef30..dd485bb 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/composer.json +++ b/vendor/symfony/translation/Symfony/Component/Translation/composer.json @@ -33,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.4-dev" } } }