diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index bb00effea9..f1b14619b9 100644 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -1,17 +1,17 @@ auth = $auth; - $this->registrar = $registrar; - $this->middleware('guest', ['except' => 'getLogout']); } @@ -74,7 +68,7 @@ class AuthController extends Controller */ public function postRegister(Request $request) { - $validator = $this->registrar->validator($request->all()); + $validator = $this->validator($request->all()); if ($validator->fails()) { $this->throwValidationException( @@ -87,11 +81,11 @@ class AuthController extends Controller $data = $request->all(); $data['password'] = bcrypt($data['password']); - $this->auth->login($this->registrar->create($data)); + Auth::login($this->create($data)); // get the email address - if ($this->auth->user() instanceof User) { - $email = $this->auth->user()->email; + if (Auth::user() instanceof User) { + $email = Auth::user()->email; $address = route('index'); // send email. Mail::send( @@ -108,7 +102,7 @@ class AuthController extends Controller // first user ever? if (User::count() == 1) { $admin = Role::where('name', 'owner')->first(); - $this->auth->user()->attachRole($admin); + Auth::user()->attachRole($admin); } @@ -119,4 +113,37 @@ class AuthController extends Controller return redirect('/'); } + /** + * Get a validator for an incoming registration request. + * + * @param array $data + * + * @return \Illuminate\Contracts\Validation\Validator + */ + public function validator(array $data) + { + return Validator::make( + $data, [ + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|confirmed|min:6', + ] + ); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * + * @return User + */ + public function create(array $data) + { + return User::create( + [ + 'email' => $data['email'], + 'password' => $data['password'], + ] + ); + } } diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php index e5ca5e6225..2fa89f2c20 100644 --- a/app/Http/Controllers/Auth/PasswordController.php +++ b/app/Http/Controllers/Auth/PasswordController.php @@ -1,8 +1,6 @@ auth = $auth; - $this->passwords = $passwords; - $this->middleware('guest'); } diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index f2cc4bc3a6..d23a30bf2c 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -48,7 +48,7 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito { /** @var Collection $set */ $set = Auth::user()->categories()->orderBy('name', 'ASC')->get(); - $set->sortBy( + $set = $set->sortBy( function (Category $category) { return $category->name; } diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 6df1b60915..5b5de681f4 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -109,7 +109,7 @@ class TagRepository implements TagRepositoryInterface { /** @var Collection $tags */ $tags = Auth::user()->tags()->get(); - $tags->sortBy( + $tags = $tags->sortBy( function (Tag $tag) { return $tag->tag; } diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index f2a9d5675d..2c35b3fc95 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -27,7 +27,7 @@ require __DIR__.'/../vendor/autoload.php'; | */ -$compiledPath = __DIR__.'/../storage/framework/compiled.php'; +$compiledPath = __DIR__.'/cache/compiled.php'; if (file_exists($compiledPath)) { diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore new file mode 100644 index 0000000000..c96a04f008 --- /dev/null +++ b/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/composer.json b/composer.json index f123bbe2b4..257945bd6e 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require": { - "laravel/framework": "5.0.*", + "laravel/framework": "5.1.*", "davejamesmiller/laravel-breadcrumbs": "~3.0", "grumpydictator/gchart": "~1", "watson/validating": "~1.0", diff --git a/composer.lock b/composer.lock index 4b2fb181d8..cdb07e61da 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "077d2b2548df62c8ef92871c6e52c856", + "hash": "6cb9252bccae017b844cb8babbb6f1d3", "packages": [ { "name": "classpreloader/classpreloader", @@ -755,48 +755,6 @@ ], "time": "2015-01-01 16:31:18" }, - { - "name": "ircmaxell/password-compat", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "type": "library", - "autoload": { - "files": [ - "lib/password.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", - "keywords": [ - "hashing", - "password" - ], - "time": "2014-11-20 16:49:30" - }, { "name": "jakub-onderka/php-console-color", "version": "0.1", @@ -943,16 +901,16 @@ }, { "name": "laravel/framework", - "version": "v5.0.33", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "b11c8ab88245f920b30e5f30e16b141ac8d461d3" + "reference": "3a44db7e70146dc1282b39887b5faa67c8583015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/b11c8ab88245f920b30e5f30e16b141ac8d461d3", - "reference": "b11c8ab88245f920b30e5f30e16b141ac8d461d3", + "url": "https://api.github.com/repos/laravel/framework/zipball/3a44db7e70146dc1282b39887b5faa67c8583015", + "reference": "3a44db7e70146dc1282b39887b5faa67c8583015", "shasum": "" }, "require": { @@ -960,31 +918,31 @@ "danielstjules/stringy": "~1.8", "doctrine/inflector": "~1.0", "ext-mbstring": "*", - "ext-mcrypt": "*", "ext-openssl": "*", - "ircmaxell/password-compat": "~1.0", "jeremeamia/superclosure": "~2.0", "league/flysystem": "~1.0", "monolog/monolog": "~1.11", "mtdowling/cron-expression": "~1.0", - "nesbot/carbon": "~1.0", - "php": ">=5.4.0", + "nesbot/carbon": "~1.19", + "php": ">=5.5.9", "psy/psysh": "0.4.*", "swiftmailer/swiftmailer": "~5.1", - "symfony/console": "2.6.*", - "symfony/debug": "2.6.*", - "symfony/finder": "2.6.*", - "symfony/http-foundation": "2.6.*", - "symfony/http-kernel": "2.6.*", - "symfony/process": "2.6.*", - "symfony/routing": "2.6.*", - "symfony/security-core": "2.6.*", - "symfony/translation": "2.6.*", - "symfony/var-dumper": "2.6.*", + "symfony/console": "2.7.*", + "symfony/css-selector": "2.7.*", + "symfony/debug": "2.7.*", + "symfony/dom-crawler": "2.7.*", + "symfony/finder": "2.7.*", + "symfony/http-foundation": "2.7.*", + "symfony/http-kernel": "2.7.*", + "symfony/process": "2.7.*", + "symfony/routing": "2.7.*", + "symfony/translation": "2.7.*", + "symfony/var-dumper": "2.7.*", "vlucas/phpdotenv": "~1.0" }, "replace": { "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", "illuminate/bus": "self.version", "illuminate/cache": "self.version", "illuminate/config": "self.version", @@ -1014,27 +972,29 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "~2.4", - "iron-io/iron_mq": "~1.5", - "mockery/mockery": "~0.9", + "aws/aws-sdk-php": "~3.0", + "iron-io/iron_mq": "~2.0", + "mockery/mockery": "~0.9.1", "pda/pheanstalk": "~3.0", "phpunit/phpunit": "~4.0", "predis/predis": "~1.0" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~2.4).", + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers (~5.0).", - "iron-io/iron_mq": "Required to use the iron queue driver (~1.5).", - "league/flysystem-aws-s3-v2": "Required to use the Flysystem S3 driver (~1.0).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers (~5.3|~6.0).", + "iron-io/iron_mq": "Required to use the iron queue driver (~2.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", - "predis/predis": "Required to use the redis cache and queue drivers (~1.0)." + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1065,7 +1025,7 @@ "framework", "laravel" ], - "time": "2015-06-09 13:12:19" + "time": "2015-06-09 14:13:59" }, { "name": "league/commonmark", @@ -1647,21 +1607,20 @@ }, { "name": "symfony/console", - "version": "v2.6.9", - "target-dir": "Symfony/Component/Console", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "b5ec0c11a204718f2b656357f5505a8e578f30dd" + "reference": "7f0bec04961c61c961df0cb8c2ae88dbfd83f399" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/b5ec0c11a204718f2b656357f5505a8e578f30dd", - "reference": "b5ec0c11a204718f2b656357f5505a8e578f30dd", + "url": "https://api.github.com/repos/symfony/Console/zipball/7f0bec04961c61c961df0cb8c2ae88dbfd83f399", + "reference": "7f0bec04961c61c961df0cb8c2ae88dbfd83f399", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "psr/log": "~1.0", @@ -1677,11 +1636,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Console\\": "" } }, @@ -1701,25 +1660,77 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-05-29 14:42:58" + "time": "2015-05-29 16:22:24" }, { - "name": "symfony/debug", - "version": "v2.6.9", - "target-dir": "Symfony/Component/Debug", + "name": "symfony/css-selector", + "version": "v2.7.0", "source": { "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "4851a041c48e76b91a221db84ab5850daa6a7b33" + "url": "https://github.com/symfony/CssSelector.git", + "reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/4851a041c48e76b91a221db84ab5850daa6a7b33", - "reference": "4851a041c48e76b91a221db84ab5850daa6a7b33", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/0b5c07b516226b7dd32afbbc82fe547a469c5092", + "reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2015-05-15 13:33:16" + }, + { + "name": "symfony/debug", + "version": "v2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/Debug.git", + "reference": "1df2971b27a6ff73dae4ea622f42802000ec332d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Debug/zipball/1df2971b27a6ff73dae4ea622f42802000ec332d", + "reference": "1df2971b27a6ff73dae4ea622f42802000ec332d", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", "psr/log": "~1.0" }, "conflict": { @@ -1738,11 +1749,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Debug\\": "" } }, @@ -1762,7 +1773,60 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2015-05-20 13:09:45" + "time": "2015-05-22 14:54:25" + }, + { + "name": "symfony/dom-crawler", + "version": "v2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/DomCrawler.git", + "reference": "11d8eb8ccc1533f4c2d89a025f674894fda520b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/11d8eb8ccc1533f4c2d89a025f674894fda520b3", + "reference": "11d8eb8ccc1533f4c2d89a025f674894fda520b3", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/css-selector": "~2.3", + "symfony/phpunit-bridge": "~2.7" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2015-05-22 14:54:25" }, { "name": "symfony/event-dispatcher", @@ -1873,21 +1937,20 @@ }, { "name": "symfony/finder", - "version": "v2.6.9", - "target-dir": "Symfony/Component/Finder", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/Finder.git", - "reference": "ffedd3e0ff8155188155e9322fe21b9ee012ac14" + "reference": "ccb8ed8339cf24824f2ef35dacec30d92ff44368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/ffedd3e0ff8155188155e9322fe21b9ee012ac14", - "reference": "ffedd3e0ff8155188155e9322fe21b9ee012ac14", + "url": "https://api.github.com/repos/symfony/Finder/zipball/ccb8ed8339cf24824f2ef35dacec30d92ff44368", + "reference": "ccb8ed8339cf24824f2ef35dacec30d92ff44368", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "symfony/phpunit-bridge": "~2.7" @@ -1895,11 +1958,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Finder\\": "" } }, @@ -1919,25 +1982,24 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-05-15 13:32:45" + "time": "2015-05-15 14:02:48" }, { "name": "symfony/http-foundation", - "version": "v2.6.9", - "target-dir": "Symfony/Component/HttpFoundation", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "f9b28dcc6d3e50f5568b42dda7292656a9fe8432" + "reference": "729de183da037c125c5f6366bd4f0631ba1a1abb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/f9b28dcc6d3e50f5568b42dda7292656a9fe8432", - "reference": "f9b28dcc6d3e50f5568b42dda7292656a9fe8432", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/729de183da037c125c5f6366bd4f0631ba1a1abb", + "reference": "729de183da037c125c5f6366bd4f0631ba1a1abb", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "symfony/expression-language": "~2.4", @@ -1946,15 +2008,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1973,34 +2035,36 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2015-05-22 14:53:08" + "time": "2015-05-22 14:54:25" }, { "name": "symfony/http-kernel", - "version": "v2.6.9", - "target-dir": "Symfony/Component/HttpKernel", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "7c883eb1a5d8b52b1fa6d4134b82304c6bb7007f" + "reference": "74acbb7ef9c4aae0620d3250b9b990d2fff28d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/7c883eb1a5d8b52b1fa6d4134b82304c6bb7007f", - "reference": "7c883eb1a5d8b52b1fa6d4134b82304c6bb7007f", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/74acbb7ef9c4aae0620d3250b9b990d2fff28d16", + "reference": "74acbb7ef9c4aae0620d3250b9b990d2fff28d16", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.3.9", "psr/log": "~1.0", "symfony/debug": "~2.6,>=2.6.2", "symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2", "symfony/http-foundation": "~2.5,>=2.5.4" }, + "conflict": { + "symfony/config": "<2.7" + }, "require-dev": { "symfony/browser-kit": "~2.3", "symfony/class-loader": "~2.1", - "symfony/config": "~2.0,>=2.0.5", + "symfony/config": "~2.7", "symfony/console": "~2.3", "symfony/css-selector": "~2.0,>=2.0.5", "symfony/dependency-injection": "~2.2", @@ -2027,11 +2091,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\HttpKernel\\": "" } }, @@ -2051,25 +2115,24 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2015-05-29 22:55:07" + "time": "2015-05-30 16:52:28" }, { "name": "symfony/process", - "version": "v2.6.9", - "target-dir": "Symfony/Component/Process", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/Process.git", - "reference": "7856d78ab6cce6e59d02d9e1a873441f6bd21306" + "reference": "e0a82b58e36afc60f8e79b8bc85a22bb064077c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/7856d78ab6cce6e59d02d9e1a873441f6bd21306", - "reference": "7856d78ab6cce6e59d02d9e1a873441f6bd21306", + "url": "https://api.github.com/repos/symfony/Process/zipball/e0a82b58e36afc60f8e79b8bc85a22bb064077c1", + "reference": "e0a82b58e36afc60f8e79b8bc85a22bb064077c1", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "symfony/phpunit-bridge": "~2.7" @@ -2077,11 +2140,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Process\\": "" } }, @@ -2101,31 +2164,33 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-05-15 13:32:45" + "time": "2015-05-15 13:33:16" }, { "name": "symfony/routing", - "version": "v2.6.9", - "target-dir": "Symfony/Component/Routing", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "dc9df18a1cfe87de65e270e8f01407ca6d7c39cb" + "reference": "6f0333fb8b89cf6f8fd9d6740c5e83b73d9c95b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/dc9df18a1cfe87de65e270e8f01407ca6d7c39cb", - "reference": "dc9df18a1cfe87de65e270e8f01407ca6d7c39cb", + "url": "https://api.github.com/repos/symfony/Routing/zipball/6f0333fb8b89cf6f8fd9d6740c5e83b73d9c95b9", + "reference": "6f0333fb8b89cf6f8fd9d6740c5e83b73d9c95b9", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" + }, + "conflict": { + "symfony/config": "<2.7" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/common": "~2.2", "psr/log": "~1.0", - "symfony/config": "~2.2", + "symfony/config": "~2.7", "symfony/expression-language": "~2.4", "symfony/http-foundation": "~2.3", "symfony/phpunit-bridge": "~2.7", @@ -2140,11 +2205,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Routing\\": "" } }, @@ -2170,93 +2235,31 @@ "uri", "url" ], - "time": "2015-05-15 13:32:45" - }, - { - "name": "symfony/security-core", - "version": "v2.6.9", - "target-dir": "Symfony/Component/Security/Core", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-core.git", - "reference": "1ad0ee4b2a1ab32924cd0be397f0196b5d47e5d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/1ad0ee4b2a1ab32924cd0be397f0196b5d47e5d0", - "reference": "1ad0ee4b2a1ab32924cd0be397f0196b5d47e5d0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "ircmaxell/password-compat": "1.0.*", - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/expression-language": "~2.6", - "symfony/http-foundation": "~2.4", - "symfony/phpunit-bridge": "~2.7", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/validator": "~2.5,>=2.5.5" - }, - "suggest": { - "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5", - "symfony/event-dispatcher": "", - "symfony/expression-language": "For using the expression voter", - "symfony/http-foundation": "", - "symfony/validator": "For using the user password constraint" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Security\\Core\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Security Component - Core Library", - "homepage": "https://symfony.com", - "time": "2015-05-15 13:53:19" + "time": "2015-05-19 06:58:17" }, { "name": "symfony/translation", - "version": "v2.6.9", - "target-dir": "Symfony/Component/Translation", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/Translation.git", - "reference": "89cdf3c43bc24c85dd8173dfcf5a979a95e5bd9c" + "reference": "cc1907bbeacfcc703c031b67545400d6e7d1eb79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/89cdf3c43bc24c85dd8173dfcf5a979a95e5bd9c", - "reference": "89cdf3c43bc24c85dd8173dfcf5a979a95e5bd9c", + "url": "https://api.github.com/repos/symfony/Translation/zipball/cc1907bbeacfcc703c031b67545400d6e7d1eb79", + "reference": "cc1907bbeacfcc703c031b67545400d6e7d1eb79", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" + }, + "conflict": { + "symfony/config": "<2.7" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.3,>=2.3.12", + "symfony/config": "~2.7", "symfony/intl": "~2.3", "symfony/phpunit-bridge": "~2.7", "symfony/yaml": "~2.2" @@ -2269,11 +2272,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Translation\\": "" } }, @@ -2293,25 +2296,24 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2015-05-29 14:42:58" + "time": "2015-05-29 14:44:44" }, { "name": "symfony/var-dumper", - "version": "v2.6.9", - "target-dir": "Symfony/Component/VarDumper", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "89eec96645fb44af4a454a26c74c72ba6311f5bc" + "reference": "120b187ec46215f7a53a506e53aa91a81c82a082" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/89eec96645fb44af4a454a26c74c72ba6311f5bc", - "reference": "89eec96645fb44af4a454a26c74c72ba6311f5bc", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/120b187ec46215f7a53a506e53aa91a81c82a082", + "reference": "120b187ec46215f7a53a506e53aa91a81c82a082", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "symfony/phpunit-bridge": "~2.7" @@ -2322,14 +2324,14 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { "files": [ "Resources/functions/dump.php" ], - "psr-0": { + "psr-4": { "Symfony\\Component\\VarDumper\\": "" } }, @@ -2353,7 +2355,7 @@ "debug", "dump" ], - "time": "2015-05-01 14:14:24" + "time": "2015-05-02 15:21:08" }, { "name": "twig/twig", diff --git a/tests/TestCase.php b/tests/TestCase.php index c110ef4b1e..8b972b79d0 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -9,6 +9,7 @@ use League\FactoryMuffin\Facade as FactoryMuffin; */ class TestCase extends Illuminate\Foundation\Testing\TestCase { + protected $baseUrl = 'http://localhost'; /** * Creates the application. diff --git a/tests/controllers/AccountControllerTest.php b/tests/controllers/AccountControllerTest.php index 86d5be5128..c242a00a62 100644 --- a/tests/controllers/AccountControllerTest.php +++ b/tests/controllers/AccountControllerTest.php @@ -78,8 +78,8 @@ class AccountControllerTest extends TestCase // CURRENCY: $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); - Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); - Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); + Amount::shouldReceive('getDefaultCurrency')->andReturn($currency); + Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]); Amount::shouldReceive('getCurrencyCode')->andReturn('X'); $lastActivity = FactoryMuffin::create('FireflyIII\Models\Preference'); $lastActivity->data = microtime(); @@ -149,8 +149,8 @@ class AccountControllerTest extends TestCase // CURRENCY: $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); - Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); - Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); + Amount::shouldReceive('getDefaultCurrency')->andReturn($currency); + Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]); Amount::shouldReceive('getCurrencyCode')->andReturn('X'); // get edit page: diff --git a/tests/controllers/BillControllerTest.php b/tests/controllers/BillControllerTest.php index 50ad01a37e..08de5fec09 100644 --- a/tests/controllers/BillControllerTest.php +++ b/tests/controllers/BillControllerTest.php @@ -49,8 +49,8 @@ class BillControllerTest extends TestCase // CURRENCY: $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); - Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); - Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); + Amount::shouldReceive('getDefaultCurrency')->andReturn($currency); + Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]); Amount::shouldReceive('getCurrencyCode')->andReturn('X'); $this->call('GET', '/bills/create'); @@ -98,8 +98,8 @@ class BillControllerTest extends TestCase // CURRENCY: $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); - Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); - Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); + Amount::shouldReceive('getDefaultCurrency')->andReturn($currency); + Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]); Amount::shouldReceive('getCurrencyCode')->andReturn('X'); $this->call('GET', '/bills/edit/' . $bill->id); diff --git a/tests/controllers/PiggyBankControllerTest.php b/tests/controllers/PiggyBankControllerTest.php index 8bea91a676..9504fe50f9 100644 --- a/tests/controllers/PiggyBankControllerTest.php +++ b/tests/controllers/PiggyBankControllerTest.php @@ -271,7 +271,6 @@ class PiggyBankControllerTest extends TestCase $accounts = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface'); $piggyBanks = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface'); $accounts->shouldReceive('leftOnAccount')->andReturn(20); - $piggyBanks->shouldReceive('createEvent')->once(); Amount::shouldReceive('format')->andReturn('something'); Amount::shouldReceive('getCurrencyCode')->andReturn('X'); @@ -310,7 +309,6 @@ class PiggyBankControllerTest extends TestCase $accounts = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface'); $piggyBanks = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface'); $accounts->shouldReceive('leftOnAccount')->andReturn(20); - $piggyBanks->shouldReceive('createEvent')->once(); Amount::shouldReceive('format')->andReturn('something'); Amount::shouldReceive('getCurrencySymbol')->andReturn('something'); diff --git a/tests/controllers/PreferencesControllerTest.php b/tests/controllers/PreferencesControllerTest.php index 93ec1fa3ec..c92e77fea5 100644 --- a/tests/controllers/PreferencesControllerTest.php +++ b/tests/controllers/PreferencesControllerTest.php @@ -56,7 +56,7 @@ class PreferencesControllerTest extends TestCase Preferences::shouldReceive('get')->once()->withArgs(['viewRange', '1M'])->andReturn($pref); Preferences::shouldReceive('get')->once()->withArgs(['frontPageAccounts', []])->andReturn($pref); Preferences::shouldReceive('get')->once()->withArgs(['budgetMaximum', 1000])->andReturn($pref); - Preferences::shouldReceive('get')->once()->withArgs(['currencyPreference', 'EUR'])->andReturn($pref); + Preferences::shouldReceive('get')->withArgs(['currencyPreference', 'EUR'])->andReturn($pref); Amount::shouldReceive('format')->andReturn('xx'); Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('getAllCurrencies')->andReturn(new Collection); diff --git a/tests/controllers/ReportControllerTest.php b/tests/controllers/ReportControllerTest.php index 41ffa7579f..51791cf341 100644 --- a/tests/controllers/ReportControllerTest.php +++ b/tests/controllers/ReportControllerTest.php @@ -158,10 +158,10 @@ class ReportControllerTest extends TestCase $helper->shouldReceive('getExpenseReport')->once()->withAnyArgs()->andReturn([]); // mock stuff! - Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); - Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); - Amount::shouldReceive('getCurrencyCode')->once()->andReturn('X'); - Amount::shouldReceive('getCurrencySymbol')->once()->andReturn('X'); + Amount::shouldReceive('getDefaultCurrency')->andReturn($currency); + Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]); + Amount::shouldReceive('getCurrencyCode')->andReturn('X'); + Amount::shouldReceive('getCurrencySymbol')->andReturn('X'); Amount::shouldReceive('format')->andReturn('X'); $this->call('GET', '/reports/2015/shared'); diff --git a/tests/controllers/TransactionControllerTest.php b/tests/controllers/TransactionControllerTest.php index c778f49de2..a07ce269b7 100644 --- a/tests/controllers/TransactionControllerTest.php +++ b/tests/controllers/TransactionControllerTest.php @@ -244,8 +244,8 @@ class TransactionControllerTest extends TestCase // fake! $repository->shouldReceive('getAmountBefore')->withAnyArgs()->andReturn(5); - Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); - Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); + Amount::shouldReceive('getDefaultCurrency')->andReturn($currency); + Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]); Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('formatTransaction')->andReturn('X'); Amount::shouldReceive('format')->andReturn('X');