Upgrade to laravel 5.1

This commit is contained in:
James Cole
2015-06-11 21:19:40 +02:00
parent 0587d96474
commit b1b03a4325
15 changed files with 288 additions and 266 deletions

View File

@@ -1,17 +1,17 @@
<?php namespace FireflyIII\Http\Controllers\Auth; <?php namespace FireflyIII\Http\Controllers\Auth;
use App; use App;
use Auth;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Role; use FireflyIII\Models\Role;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Registrar;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Mail\Message; use Illuminate\Mail\Message;
use Mail; use Mail;
use Session; use Session;
use Twig; use Twig;
use Validator;
/** /**
* Class AuthController * Class AuthController
@@ -39,17 +39,11 @@ class AuthController extends Controller
/** /**
* Create a new authentication controller instance. * Create a new authentication controller instance.
* *
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\Registrar $registrar
*
* @codeCoverageIgnore * @codeCoverageIgnore
* *
*/ */
public function __construct(Guard $auth, Registrar $registrar) public function __construct()
{ {
$this->auth = $auth;
$this->registrar = $registrar;
$this->middleware('guest', ['except' => 'getLogout']); $this->middleware('guest', ['except' => 'getLogout']);
} }
@@ -74,7 +68,7 @@ class AuthController extends Controller
*/ */
public function postRegister(Request $request) public function postRegister(Request $request)
{ {
$validator = $this->registrar->validator($request->all()); $validator = $this->validator($request->all());
if ($validator->fails()) { if ($validator->fails()) {
$this->throwValidationException( $this->throwValidationException(
@@ -87,11 +81,11 @@ class AuthController extends Controller
$data = $request->all(); $data = $request->all();
$data['password'] = bcrypt($data['password']); $data['password'] = bcrypt($data['password']);
$this->auth->login($this->registrar->create($data)); Auth::login($this->create($data));
// get the email address // get the email address
if ($this->auth->user() instanceof User) { if (Auth::user() instanceof User) {
$email = $this->auth->user()->email; $email = Auth::user()->email;
$address = route('index'); $address = route('index');
// send email. // send email.
Mail::send( Mail::send(
@@ -108,7 +102,7 @@ class AuthController extends Controller
// first user ever? // first user ever?
if (User::count() == 1) { if (User::count() == 1) {
$admin = Role::where('name', 'owner')->first(); $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('/'); 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'],
]
);
}
} }

View File

@@ -1,8 +1,6 @@
<?php namespace FireflyIII\Http\Controllers\Auth; <?php namespace FireflyIII\Http\Controllers\Auth;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\PasswordBroker;
use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Foundation\Auth\ResetsPasswords;
/** /**
@@ -33,17 +31,11 @@ class PasswordController extends Controller
/** /**
* Create a new password controller instance. * Create a new password controller instance.
* *
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
*
* @codeCoverageIgnore * @codeCoverageIgnore
* *
*/ */
public function __construct(Guard $auth, PasswordBroker $passwords) public function __construct()
{ {
$this->auth = $auth;
$this->passwords = $passwords;
$this->middleware('guest'); $this->middleware('guest');
} }

View File

@@ -48,7 +48,7 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
{ {
/** @var Collection $set */ /** @var Collection $set */
$set = Auth::user()->categories()->orderBy('name', 'ASC')->get(); $set = Auth::user()->categories()->orderBy('name', 'ASC')->get();
$set->sortBy( $set = $set->sortBy(
function (Category $category) { function (Category $category) {
return $category->name; return $category->name;
} }

View File

@@ -109,7 +109,7 @@ class TagRepository implements TagRepositoryInterface
{ {
/** @var Collection $tags */ /** @var Collection $tags */
$tags = Auth::user()->tags()->get(); $tags = Auth::user()->tags()->get();
$tags->sortBy( $tags = $tags->sortBy(
function (Tag $tag) { function (Tag $tag) {
return $tag->tag; return $tag->tag;
} }

View File

@@ -27,7 +27,7 @@ require __DIR__.'/../vendor/autoload.php';
| |
*/ */
$compiledPath = __DIR__.'/../storage/framework/compiled.php'; $compiledPath = __DIR__.'/cache/compiled.php';
if (file_exists($compiledPath)) if (file_exists($compiledPath))
{ {

2
bootstrap/cache/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -20,7 +20,7 @@
}, },
"require": { "require": {
"laravel/framework": "5.0.*", "laravel/framework": "5.1.*",
"davejamesmiller/laravel-breadcrumbs": "~3.0", "davejamesmiller/laravel-breadcrumbs": "~3.0",
"grumpydictator/gchart": "~1", "grumpydictator/gchart": "~1",
"watson/validating": "~1.0", "watson/validating": "~1.0",

446
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "077d2b2548df62c8ef92871c6e52c856", "hash": "6cb9252bccae017b844cb8babbb6f1d3",
"packages": [ "packages": [
{ {
"name": "classpreloader/classpreloader", "name": "classpreloader/classpreloader",
@@ -755,48 +755,6 @@
], ],
"time": "2015-01-01 16:31:18" "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", "name": "jakub-onderka/php-console-color",
"version": "0.1", "version": "0.1",
@@ -943,16 +901,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v5.0.33", "version": "v5.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "b11c8ab88245f920b30e5f30e16b141ac8d461d3" "reference": "3a44db7e70146dc1282b39887b5faa67c8583015"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/b11c8ab88245f920b30e5f30e16b141ac8d461d3", "url": "https://api.github.com/repos/laravel/framework/zipball/3a44db7e70146dc1282b39887b5faa67c8583015",
"reference": "b11c8ab88245f920b30e5f30e16b141ac8d461d3", "reference": "3a44db7e70146dc1282b39887b5faa67c8583015",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -960,31 +918,31 @@
"danielstjules/stringy": "~1.8", "danielstjules/stringy": "~1.8",
"doctrine/inflector": "~1.0", "doctrine/inflector": "~1.0",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-mcrypt": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ircmaxell/password-compat": "~1.0",
"jeremeamia/superclosure": "~2.0", "jeremeamia/superclosure": "~2.0",
"league/flysystem": "~1.0", "league/flysystem": "~1.0",
"monolog/monolog": "~1.11", "monolog/monolog": "~1.11",
"mtdowling/cron-expression": "~1.0", "mtdowling/cron-expression": "~1.0",
"nesbot/carbon": "~1.0", "nesbot/carbon": "~1.19",
"php": ">=5.4.0", "php": ">=5.5.9",
"psy/psysh": "0.4.*", "psy/psysh": "0.4.*",
"swiftmailer/swiftmailer": "~5.1", "swiftmailer/swiftmailer": "~5.1",
"symfony/console": "2.6.*", "symfony/console": "2.7.*",
"symfony/debug": "2.6.*", "symfony/css-selector": "2.7.*",
"symfony/finder": "2.6.*", "symfony/debug": "2.7.*",
"symfony/http-foundation": "2.6.*", "symfony/dom-crawler": "2.7.*",
"symfony/http-kernel": "2.6.*", "symfony/finder": "2.7.*",
"symfony/process": "2.6.*", "symfony/http-foundation": "2.7.*",
"symfony/routing": "2.6.*", "symfony/http-kernel": "2.7.*",
"symfony/security-core": "2.6.*", "symfony/process": "2.7.*",
"symfony/translation": "2.6.*", "symfony/routing": "2.7.*",
"symfony/var-dumper": "2.6.*", "symfony/translation": "2.7.*",
"symfony/var-dumper": "2.7.*",
"vlucas/phpdotenv": "~1.0" "vlucas/phpdotenv": "~1.0"
}, },
"replace": { "replace": {
"illuminate/auth": "self.version", "illuminate/auth": "self.version",
"illuminate/broadcasting": "self.version",
"illuminate/bus": "self.version", "illuminate/bus": "self.version",
"illuminate/cache": "self.version", "illuminate/cache": "self.version",
"illuminate/config": "self.version", "illuminate/config": "self.version",
@@ -1014,27 +972,29 @@
"illuminate/view": "self.version" "illuminate/view": "self.version"
}, },
"require-dev": { "require-dev": {
"aws/aws-sdk-php": "~2.4", "aws/aws-sdk-php": "~3.0",
"iron-io/iron_mq": "~1.5", "iron-io/iron_mq": "~2.0",
"mockery/mockery": "~0.9", "mockery/mockery": "~0.9.1",
"pda/pheanstalk": "~3.0", "pda/pheanstalk": "~3.0",
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "~4.0",
"predis/predis": "~1.0" "predis/predis": "~1.0"
}, },
"suggest": { "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).", "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).", "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).",
"iron-io/iron_mq": "Required to use the iron queue driver (~1.5).", "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers (~5.3|~6.0).",
"league/flysystem-aws-s3-v2": "Required to use the Flysystem S3 driver (~1.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).", "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (~3.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", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "5.0-dev" "dev-master": "5.1-dev"
} }
}, },
"autoload": { "autoload": {
@@ -1065,7 +1025,7 @@
"framework", "framework",
"laravel" "laravel"
], ],
"time": "2015-06-09 13:12:19" "time": "2015-06-09 14:13:59"
}, },
{ {
"name": "league/commonmark", "name": "league/commonmark",
@@ -1647,21 +1607,20 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/Console",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Console.git", "url": "https://github.com/symfony/Console.git",
"reference": "b5ec0c11a204718f2b656357f5505a8e578f30dd" "reference": "7f0bec04961c61c961df0cb8c2ae88dbfd83f399"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/b5ec0c11a204718f2b656357f5505a8e578f30dd", "url": "https://api.github.com/repos/symfony/Console/zipball/7f0bec04961c61c961df0cb8c2ae88dbfd83f399",
"reference": "b5ec0c11a204718f2b656357f5505a8e578f30dd", "reference": "7f0bec04961c61c961df0cb8c2ae88dbfd83f399",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.9"
}, },
"require-dev": { "require-dev": {
"psr/log": "~1.0", "psr/log": "~1.0",
@@ -1677,11 +1636,11 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Symfony\\Component\\Console\\": "" "Symfony\\Component\\Console\\": ""
} }
}, },
@@ -1701,25 +1660,77 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-29 14:42:58" "time": "2015-05-29 16:22:24"
}, },
{ {
"name": "symfony/debug", "name": "symfony/css-selector",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/Debug",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Debug.git", "url": "https://github.com/symfony/CssSelector.git",
"reference": "4851a041c48e76b91a221db84ab5850daa6a7b33" "reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Debug/zipball/4851a041c48e76b91a221db84ab5850daa6a7b33", "url": "https://api.github.com/repos/symfony/CssSelector/zipball/0b5c07b516226b7dd32afbbc82fe547a469c5092",
"reference": "4851a041c48e76b91a221db84ab5850daa6a7b33", "reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092",
"shasum": "" "shasum": ""
}, },
"require": { "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" "psr/log": "~1.0"
}, },
"conflict": { "conflict": {
@@ -1738,11 +1749,11 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Symfony\\Component\\Debug\\": "" "Symfony\\Component\\Debug\\": ""
} }
}, },
@@ -1762,7 +1773,60 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "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", "name": "symfony/event-dispatcher",
@@ -1873,21 +1937,20 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/Finder",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Finder.git", "url": "https://github.com/symfony/Finder.git",
"reference": "ffedd3e0ff8155188155e9322fe21b9ee012ac14" "reference": "ccb8ed8339cf24824f2ef35dacec30d92ff44368"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Finder/zipball/ffedd3e0ff8155188155e9322fe21b9ee012ac14", "url": "https://api.github.com/repos/symfony/Finder/zipball/ccb8ed8339cf24824f2ef35dacec30d92ff44368",
"reference": "ffedd3e0ff8155188155e9322fe21b9ee012ac14", "reference": "ccb8ed8339cf24824f2ef35dacec30d92ff44368",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.9"
}, },
"require-dev": { "require-dev": {
"symfony/phpunit-bridge": "~2.7" "symfony/phpunit-bridge": "~2.7"
@@ -1895,11 +1958,11 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Symfony\\Component\\Finder\\": "" "Symfony\\Component\\Finder\\": ""
} }
}, },
@@ -1919,25 +1982,24 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-15 13:32:45" "time": "2015-05-15 14:02:48"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/HttpFoundation",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/HttpFoundation.git", "url": "https://github.com/symfony/HttpFoundation.git",
"reference": "f9b28dcc6d3e50f5568b42dda7292656a9fe8432" "reference": "729de183da037c125c5f6366bd4f0631ba1a1abb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/f9b28dcc6d3e50f5568b42dda7292656a9fe8432", "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/729de183da037c125c5f6366bd4f0631ba1a1abb",
"reference": "f9b28dcc6d3e50f5568b42dda7292656a9fe8432", "reference": "729de183da037c125c5f6366bd4f0631ba1a1abb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.9"
}, },
"require-dev": { "require-dev": {
"symfony/expression-language": "~2.4", "symfony/expression-language": "~2.4",
@@ -1946,15 +2008,15 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Symfony\\Component\\HttpFoundation\\": "" "Symfony\\Component\\HttpFoundation\\": ""
}, },
"classmap": [ "classmap": [
"Symfony/Component/HttpFoundation/Resources/stubs" "Resources/stubs"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -1973,34 +2035,36 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-22 14:53:08" "time": "2015-05-22 14:54:25"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/HttpKernel",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/HttpKernel.git", "url": "https://github.com/symfony/HttpKernel.git",
"reference": "7c883eb1a5d8b52b1fa6d4134b82304c6bb7007f" "reference": "74acbb7ef9c4aae0620d3250b9b990d2fff28d16"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/7c883eb1a5d8b52b1fa6d4134b82304c6bb7007f", "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/74acbb7ef9c4aae0620d3250b9b990d2fff28d16",
"reference": "7c883eb1a5d8b52b1fa6d4134b82304c6bb7007f", "reference": "74acbb7ef9c4aae0620d3250b9b990d2fff28d16",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.9",
"psr/log": "~1.0", "psr/log": "~1.0",
"symfony/debug": "~2.6,>=2.6.2", "symfony/debug": "~2.6,>=2.6.2",
"symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2", "symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2",
"symfony/http-foundation": "~2.5,>=2.5.4" "symfony/http-foundation": "~2.5,>=2.5.4"
}, },
"conflict": {
"symfony/config": "<2.7"
},
"require-dev": { "require-dev": {
"symfony/browser-kit": "~2.3", "symfony/browser-kit": "~2.3",
"symfony/class-loader": "~2.1", "symfony/class-loader": "~2.1",
"symfony/config": "~2.0,>=2.0.5", "symfony/config": "~2.7",
"symfony/console": "~2.3", "symfony/console": "~2.3",
"symfony/css-selector": "~2.0,>=2.0.5", "symfony/css-selector": "~2.0,>=2.0.5",
"symfony/dependency-injection": "~2.2", "symfony/dependency-injection": "~2.2",
@@ -2027,11 +2091,11 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Symfony\\Component\\HttpKernel\\": "" "Symfony\\Component\\HttpKernel\\": ""
} }
}, },
@@ -2051,25 +2115,24 @@
], ],
"description": "Symfony HttpKernel Component", "description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-29 22:55:07" "time": "2015-05-30 16:52:28"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/Process",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Process.git", "url": "https://github.com/symfony/Process.git",
"reference": "7856d78ab6cce6e59d02d9e1a873441f6bd21306" "reference": "e0a82b58e36afc60f8e79b8bc85a22bb064077c1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Process/zipball/7856d78ab6cce6e59d02d9e1a873441f6bd21306", "url": "https://api.github.com/repos/symfony/Process/zipball/e0a82b58e36afc60f8e79b8bc85a22bb064077c1",
"reference": "7856d78ab6cce6e59d02d9e1a873441f6bd21306", "reference": "e0a82b58e36afc60f8e79b8bc85a22bb064077c1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.9"
}, },
"require-dev": { "require-dev": {
"symfony/phpunit-bridge": "~2.7" "symfony/phpunit-bridge": "~2.7"
@@ -2077,11 +2140,11 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Symfony\\Component\\Process\\": "" "Symfony\\Component\\Process\\": ""
} }
}, },
@@ -2101,31 +2164,33 @@
], ],
"description": "Symfony Process Component", "description": "Symfony Process Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-15 13:32:45" "time": "2015-05-15 13:33:16"
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/Routing",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Routing.git", "url": "https://github.com/symfony/Routing.git",
"reference": "dc9df18a1cfe87de65e270e8f01407ca6d7c39cb" "reference": "6f0333fb8b89cf6f8fd9d6740c5e83b73d9c95b9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/dc9df18a1cfe87de65e270e8f01407ca6d7c39cb", "url": "https://api.github.com/repos/symfony/Routing/zipball/6f0333fb8b89cf6f8fd9d6740c5e83b73d9c95b9",
"reference": "dc9df18a1cfe87de65e270e8f01407ca6d7c39cb", "reference": "6f0333fb8b89cf6f8fd9d6740c5e83b73d9c95b9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.9"
},
"conflict": {
"symfony/config": "<2.7"
}, },
"require-dev": { "require-dev": {
"doctrine/annotations": "~1.0", "doctrine/annotations": "~1.0",
"doctrine/common": "~2.2", "doctrine/common": "~2.2",
"psr/log": "~1.0", "psr/log": "~1.0",
"symfony/config": "~2.2", "symfony/config": "~2.7",
"symfony/expression-language": "~2.4", "symfony/expression-language": "~2.4",
"symfony/http-foundation": "~2.3", "symfony/http-foundation": "~2.3",
"symfony/phpunit-bridge": "~2.7", "symfony/phpunit-bridge": "~2.7",
@@ -2140,11 +2205,11 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Symfony\\Component\\Routing\\": "" "Symfony\\Component\\Routing\\": ""
} }
}, },
@@ -2170,93 +2235,31 @@
"uri", "uri",
"url" "url"
], ],
"time": "2015-05-15 13:32:45" "time": "2015-05-19 06:58:17"
},
{
"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"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/Translation",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Translation.git", "url": "https://github.com/symfony/Translation.git",
"reference": "89cdf3c43bc24c85dd8173dfcf5a979a95e5bd9c" "reference": "cc1907bbeacfcc703c031b67545400d6e7d1eb79"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Translation/zipball/89cdf3c43bc24c85dd8173dfcf5a979a95e5bd9c", "url": "https://api.github.com/repos/symfony/Translation/zipball/cc1907bbeacfcc703c031b67545400d6e7d1eb79",
"reference": "89cdf3c43bc24c85dd8173dfcf5a979a95e5bd9c", "reference": "cc1907bbeacfcc703c031b67545400d6e7d1eb79",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.9"
},
"conflict": {
"symfony/config": "<2.7"
}, },
"require-dev": { "require-dev": {
"psr/log": "~1.0", "psr/log": "~1.0",
"symfony/config": "~2.3,>=2.3.12", "symfony/config": "~2.7",
"symfony/intl": "~2.3", "symfony/intl": "~2.3",
"symfony/phpunit-bridge": "~2.7", "symfony/phpunit-bridge": "~2.7",
"symfony/yaml": "~2.2" "symfony/yaml": "~2.2"
@@ -2269,11 +2272,11 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Symfony\\Component\\Translation\\": "" "Symfony\\Component\\Translation\\": ""
} }
}, },
@@ -2293,25 +2296,24 @@
], ],
"description": "Symfony Translation Component", "description": "Symfony Translation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-29 14:42:58" "time": "2015-05-29 14:44:44"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v2.6.9", "version": "v2.7.0",
"target-dir": "Symfony/Component/VarDumper",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "89eec96645fb44af4a454a26c74c72ba6311f5bc" "reference": "120b187ec46215f7a53a506e53aa91a81c82a082"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/89eec96645fb44af4a454a26c74c72ba6311f5bc", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/120b187ec46215f7a53a506e53aa91a81c82a082",
"reference": "89eec96645fb44af4a454a26c74c72ba6311f5bc", "reference": "120b187ec46215f7a53a506e53aa91a81c82a082",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.9"
}, },
"require-dev": { "require-dev": {
"symfony/phpunit-bridge": "~2.7" "symfony/phpunit-bridge": "~2.7"
@@ -2322,14 +2324,14 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.6-dev" "dev-master": "2.7-dev"
} }
}, },
"autoload": { "autoload": {
"files": [ "files": [
"Resources/functions/dump.php" "Resources/functions/dump.php"
], ],
"psr-0": { "psr-4": {
"Symfony\\Component\\VarDumper\\": "" "Symfony\\Component\\VarDumper\\": ""
} }
}, },
@@ -2353,7 +2355,7 @@
"debug", "debug",
"dump" "dump"
], ],
"time": "2015-05-01 14:14:24" "time": "2015-05-02 15:21:08"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",

View File

@@ -9,6 +9,7 @@ use League\FactoryMuffin\Facade as FactoryMuffin;
*/ */
class TestCase extends Illuminate\Foundation\Testing\TestCase class TestCase extends Illuminate\Foundation\Testing\TestCase
{ {
protected $baseUrl = 'http://localhost';
/** /**
* Creates the application. * Creates the application.

View File

@@ -78,8 +78,8 @@ class AccountControllerTest extends TestCase
// CURRENCY: // CURRENCY:
$currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]);
Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('getCurrencyCode')->andReturn('X');
$lastActivity = FactoryMuffin::create('FireflyIII\Models\Preference'); $lastActivity = FactoryMuffin::create('FireflyIII\Models\Preference');
$lastActivity->data = microtime(); $lastActivity->data = microtime();
@@ -149,8 +149,8 @@ class AccountControllerTest extends TestCase
// CURRENCY: // CURRENCY:
$currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]);
Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('getCurrencyCode')->andReturn('X');
// get edit page: // get edit page:

View File

@@ -49,8 +49,8 @@ class BillControllerTest extends TestCase
// CURRENCY: // CURRENCY:
$currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]);
Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('getCurrencyCode')->andReturn('X');
$this->call('GET', '/bills/create'); $this->call('GET', '/bills/create');
@@ -98,8 +98,8 @@ class BillControllerTest extends TestCase
// CURRENCY: // CURRENCY:
$currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]);
Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('getCurrencyCode')->andReturn('X');
$this->call('GET', '/bills/edit/' . $bill->id); $this->call('GET', '/bills/edit/' . $bill->id);

View File

@@ -271,7 +271,6 @@ class PiggyBankControllerTest extends TestCase
$accounts = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface'); $accounts = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface');
$piggyBanks = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface'); $piggyBanks = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface');
$accounts->shouldReceive('leftOnAccount')->andReturn(20); $accounts->shouldReceive('leftOnAccount')->andReturn(20);
$piggyBanks->shouldReceive('createEvent')->once();
Amount::shouldReceive('format')->andReturn('something'); Amount::shouldReceive('format')->andReturn('something');
Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('getCurrencyCode')->andReturn('X');
@@ -310,7 +309,6 @@ class PiggyBankControllerTest extends TestCase
$accounts = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface'); $accounts = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface');
$piggyBanks = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface'); $piggyBanks = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface');
$accounts->shouldReceive('leftOnAccount')->andReturn(20); $accounts->shouldReceive('leftOnAccount')->andReturn(20);
$piggyBanks->shouldReceive('createEvent')->once();
Amount::shouldReceive('format')->andReturn('something'); Amount::shouldReceive('format')->andReturn('something');
Amount::shouldReceive('getCurrencySymbol')->andReturn('something'); Amount::shouldReceive('getCurrencySymbol')->andReturn('something');

View File

@@ -56,7 +56,7 @@ class PreferencesControllerTest extends TestCase
Preferences::shouldReceive('get')->once()->withArgs(['viewRange', '1M'])->andReturn($pref); Preferences::shouldReceive('get')->once()->withArgs(['viewRange', '1M'])->andReturn($pref);
Preferences::shouldReceive('get')->once()->withArgs(['frontPageAccounts', []])->andReturn($pref); Preferences::shouldReceive('get')->once()->withArgs(['frontPageAccounts', []])->andReturn($pref);
Preferences::shouldReceive('get')->once()->withArgs(['budgetMaximum', 1000])->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('format')->andReturn('xx');
Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('getCurrencyCode')->andReturn('X');
Amount::shouldReceive('getAllCurrencies')->andReturn(new Collection); Amount::shouldReceive('getAllCurrencies')->andReturn(new Collection);

View File

@@ -158,10 +158,10 @@ class ReportControllerTest extends TestCase
$helper->shouldReceive('getExpenseReport')->once()->withAnyArgs()->andReturn([]); $helper->shouldReceive('getExpenseReport')->once()->withAnyArgs()->andReturn([]);
// mock stuff! // mock stuff!
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]);
Amount::shouldReceive('getCurrencyCode')->once()->andReturn('X'); Amount::shouldReceive('getCurrencyCode')->andReturn('X');
Amount::shouldReceive('getCurrencySymbol')->once()->andReturn('X'); Amount::shouldReceive('getCurrencySymbol')->andReturn('X');
Amount::shouldReceive('format')->andReturn('X'); Amount::shouldReceive('format')->andReturn('X');
$this->call('GET', '/reports/2015/shared'); $this->call('GET', '/reports/2015/shared');

View File

@@ -244,8 +244,8 @@ class TransactionControllerTest extends TestCase
// fake! // fake!
$repository->shouldReceive('getAmountBefore')->withAnyArgs()->andReturn(5); $repository->shouldReceive('getAmountBefore')->withAnyArgs()->andReturn(5);
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency); Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]); Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]);
Amount::shouldReceive('getCurrencyCode')->andReturn('X'); Amount::shouldReceive('getCurrencyCode')->andReturn('X');
Amount::shouldReceive('formatTransaction')->andReturn('X'); Amount::shouldReceive('formatTransaction')->andReturn('X');
Amount::shouldReceive('format')->andReturn('X'); Amount::shouldReceive('format')->andReturn('X');