Updated files for 4.7.5.2

This commit is contained in:
James Cole 2018-07-28 12:10:25 +02:00
parent 0c7b652a70
commit 6d4956b574
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
10 changed files with 109 additions and 40 deletions

View File

@ -1,3 +1,17 @@
# 4.7.5.2
- [Issue 1527](https://github.com/firefly-iii/firefly-iii/issues/1527), fixed views for transactions without a budget.
- [Issue 1553](https://github.com/firefly-iii/firefly-iii/issues/1553), report could not handle transactions before the first one in the system.
- [Issue 1549](https://github.com/firefly-iii/firefly-iii/issues/1549) update a budget will also update any rules that refer to that budget.
- [Issue 1530](https://github.com/firefly-iii/firefly-iii/issues/1530), fix issue with bill chart.
- [Issue 1563](https://github.com/firefly-iii/firefly-iii/issues/1563), fix piggy bank suggested amount
- [Issue 1571](https://github.com/firefly-iii/firefly-iii/issues/1571), fix OAuth in Sandstorm
- [Issue 1568](https://github.com/firefly-iii/firefly-iii/issues/1568), bug in Sandstorm user code.
- [Issue 1569](https://github.com/firefly-iii/firefly-iii/issues/1569), optimized Sandstorm build by [ocdtrekkie](https://github.com/ocdtrekkie)
- Fixed a bug where transfers would be stored inversely when using the CSV import.
- Retired the "Rabobank description"-fix, because it is no longer necessary.
- Fixed a bug where users could not delete budget limits in the API.
- Piggy bank notes are visible again.
# 4.7.5.1 # 4.7.5.1
- [Issue 1531](https://github.com/firefly-iii/firefly-iii/issues/1531), the database routine incorrectly reports empty categories. - [Issue 1531](https://github.com/firefly-iii/firefly-iii/issues/1531), the database routine incorrectly reports empty categories.
- [Issue 1532](https://github.com/firefly-iii/firefly-iii/issues/1532), broken dropdown for autosuggest things. - [Issue 1532](https://github.com/firefly-iii/firefly-iii/issues/1532), broken dropdown for autosuggest things.

View File

@ -15,8 +15,8 @@ const pkgdef :Spk.PackageDefinition = (
manifest = ( manifest = (
appTitle = (defaultText = "Firefly III"), appTitle = (defaultText = "Firefly III"),
appVersion = 14, appVersion = 15,
appMarketingVersion = (defaultText = "4.7.5.1"), appMarketingVersion = (defaultText = "4.7.5.2"),
actions = [ actions = [
# Define your "new document" handlers here. # Define your "new document" handlers here.

View File

@ -135,7 +135,7 @@ class Amount
$precedes = $amount < 0 ? $info['n_cs_precedes'] : $info['p_cs_precedes']; $precedes = $amount < 0 ? $info['n_cs_precedes'] : $info['p_cs_precedes'];
$separated = $amount < 0 ? $info['n_sep_by_space'] : $info['p_sep_by_space']; $separated = $amount < 0 ? $info['n_sep_by_space'] : $info['p_sep_by_space'];
$space = $separated === true ? ' ' : ''; $space = $separated === true ? ' ' : '';
$result = $precedes === true ? $format->symbol . $space . $formatted : $formatted . $space . $format->symbol; $result = $precedes === false ? $formatted . $space . $format->symbol : $format->symbol . $space . $formatted;
if (true === $coloured) { if (true === $coloured) {
if ($amount > 0) { if ($amount > 0) {

View File

@ -2,9 +2,23 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/). This project adheres to [Semantic Versioning](http://semver.org/).
Many updated French translations thanks to https://crowdin.com/profile/bubka ## [4.7.5.2] - 2017-07-28
### Added
- Many updated French translations thanks to [@bubka](https://crowdin.com/profile/bubka).
### Fixed
- [Issue 1527](https://github.com/firefly-iii/firefly-iii/issues/1527), fixed views for transactions without a budget.
- [Issue 1553](https://github.com/firefly-iii/firefly-iii/issues/1553), report could not handle transactions before the first one in the system.
- [Issue 1549](https://github.com/firefly-iii/firefly-iii/issues/1549) update a budget will also update any rules that refer to that budget.
- [Issue 1530](https://github.com/firefly-iii/firefly-iii/issues/1530), fix issue with bill chart.
- [Issue 1563](https://github.com/firefly-iii/firefly-iii/issues/1563), fix piggy bank suggested amount
- [Issue 1571](https://github.com/firefly-iii/firefly-iii/issues/1571), fix OAuth in Sandstorm
- [Issue 1568](https://github.com/firefly-iii/firefly-iii/issues/1568), bug in Sandstorm user code.
- [Issue 1569](https://github.com/firefly-iii/firefly-iii/issues/1569), optimized Sandstorm build by [ocdtrekkie](https://github.com/ocdtrekkie)
- Fixed a bug where transfers would be stored inversely when using the CSV import.
- Retired the "Rabobank description"-fix, because it is no longer necessary.
- Fixed a bug where users could not delete budget limits in the API.
- Piggy bank notes are visible again.
## [4.7.5.1] - 2018-07-14 ## [4.7.5.1] - 2018-07-14
### Fixed ### Fixed

39
composer.lock generated
View File

@ -74,11 +74,12 @@
"php": "^7.0.13" "php": "^7.0.13"
}, },
"require-dev": { "require-dev": {
"brianium/paratest": "^1.1",
"friendsofphp/php-cs-fixer": "^2.4", "friendsofphp/php-cs-fixer": "^2.4",
"jakub-onderka/php-parallel-lint": "^0.9.2", "jakub-onderka/php-parallel-lint": "^0.9.2",
"phpro/grumphp": "^0.11.6", "phpro/grumphp": "^0.11.6",
"phpstan/phpstan": "^0.8", "phpstan/phpstan": "^0.8",
"phpunit/phpunit": "^5.7", "phpunit/phpunit": "^6.0.13",
"sebastian/phpcpd": "^3.0", "sebastian/phpcpd": "^3.0",
"sensiolabs/security-checker": "^4.1" "sensiolabs/security-checker": "^4.1"
}, },
@ -113,7 +114,7 @@
"payment", "payment",
"sepa" "sepa"
], ],
"time": "2018-05-30T09:01:50+00:00" "time": "2018-07-24T18:37:12+00:00"
}, },
{ {
"name": "davejamesmiller/laravel-breadcrumbs", "name": "davejamesmiller/laravel-breadcrumbs",
@ -176,21 +177,21 @@
}, },
{ {
"name": "defuse/php-encryption", "name": "defuse/php-encryption",
"version": "v2.2.0", "version": "v2.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/defuse/php-encryption.git", "url": "https://github.com/defuse/php-encryption.git",
"reference": "0d4d27c368ca6798bc162469e43248c363c73495" "reference": "0f407c43b953d571421e0020ba92082ed5fb7620"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/defuse/php-encryption/zipball/0d4d27c368ca6798bc162469e43248c363c73495", "url": "https://api.github.com/repos/defuse/php-encryption/zipball/0f407c43b953d571421e0020ba92082ed5fb7620",
"reference": "0d4d27c368ca6798bc162469e43248c363c73495", "reference": "0f407c43b953d571421e0020ba92082ed5fb7620",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-openssl": "*", "ext-openssl": "*",
"paragonie/random_compat": "~2.0", "paragonie/random_compat": ">= 2",
"php": ">=5.4.0" "php": ">=5.4.0"
}, },
"require-dev": { "require-dev": {
@ -235,7 +236,7 @@
"security", "security",
"symmetric key cryptography" "symmetric key cryptography"
], ],
"time": "2018-04-23T19:33:40+00:00" "time": "2018-07-24T23:27:56+00:00"
}, },
{ {
"name": "doctrine/cache", "name": "doctrine/cache",
@ -1020,16 +1021,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v5.6.28", "version": "v5.6.29",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "40ba2ee0e61cb4bc3c9f1dab04908e6acf06b86f" "reference": "acc6b5c54ab196d3358f60acc5f55d9ebaaccc02"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/40ba2ee0e61cb4bc3c9f1dab04908e6acf06b86f", "url": "https://api.github.com/repos/laravel/framework/zipball/acc6b5c54ab196d3358f60acc5f55d9ebaaccc02",
"reference": "40ba2ee0e61cb4bc3c9f1dab04908e6acf06b86f", "reference": "acc6b5c54ab196d3358f60acc5f55d9ebaaccc02",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1155,7 +1156,7 @@
"framework", "framework",
"laravel" "laravel"
], ],
"time": "2018-07-17T14:15:36+00:00" "time": "2018-07-26T16:01:26+00:00"
}, },
{ {
"name": "laravel/passport", "name": "laravel/passport",
@ -3829,16 +3830,16 @@
}, },
{ {
"name": "zendframework/zend-diactoros", "name": "zendframework/zend-diactoros",
"version": "1.8.2", "version": "1.8.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zendframework/zend-diactoros.git", "url": "https://github.com/zendframework/zend-diactoros.git",
"reference": "273c18bf6aaab20be9667a3aa4e7702e1e4e7ced" "reference": "72c13834fb3db2a962e913758b384ff2e6425d6e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/273c18bf6aaab20be9667a3aa4e7702e1e4e7ced", "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/72c13834fb3db2a962e913758b384ff2e6425d6e",
"reference": "273c18bf6aaab20be9667a3aa4e7702e1e4e7ced", "reference": "72c13834fb3db2a962e913758b384ff2e6425d6e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3851,7 +3852,7 @@
"require-dev": { "require-dev": {
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"phpunit/phpunit": "^5.7.16 || ^6.0.8", "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7",
"zendframework/zend-coding-standard": "~1.0" "zendframework/zend-coding-standard": "~1.0"
}, },
"type": "library", "type": "library",
@ -3888,7 +3889,7 @@
"psr", "psr",
"psr-7" "psr-7"
], ],
"time": "2018-07-19T18:38:31+00:00" "time": "2018-07-24T21:54:38+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [

View File

@ -88,8 +88,8 @@ return [
'is_demo_site' => false, 'is_demo_site' => false,
], ],
'encryption' => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true, 'encryption' => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true,
'version' => '4.7.5.1', 'version' => '4.7.5.2',
'api_version' => '0.5', 'api_version' => '0.6',
'db_version' => 4, 'db_version' => 4,
'maxUploadSize' => 15242880, 'maxUploadSize' => 15242880,
'allowedMimes' => [ 'allowedMimes' => [

View File

@ -1014,7 +1014,7 @@ return [
'sum_of_piggy_banks' => 'Somme des tirelires', 'sum_of_piggy_banks' => 'Somme des tirelires',
'saved_so_far' => 'Mis de côté jusqu\'à présent', 'saved_so_far' => 'Mis de côté jusqu\'à présent',
'left_to_save' => 'Reste à mettre de côté', 'left_to_save' => 'Reste à mettre de côté',
'suggested_amount' => 'Montant mensuel suggéré à enregistrer', 'suggested_amount' => 'Montant mensuel suggéré à économiser',
'add_money_to_piggy_title' => 'Ajouter de largent à la tirelire ":name"', 'add_money_to_piggy_title' => 'Ajouter de largent à la tirelire ":name"',
'remove_money_from_piggy_title' => 'Retirer largent de la tirelire ":name"', 'remove_money_from_piggy_title' => 'Retirer largent de la tirelire ":name"',
'add' => 'Ajouter', 'add' => 'Ajouter',

View File

@ -532,6 +532,13 @@ class BinderTest extends TestCase
return 'date: ' . $date->format('Y-m-d'); return 'date: ' . $date->format('Y-m-d');
} }
); );
// mock fiscal helper:
$date = new Carbon;
$helper = $this->mock(FiscalHelperInterface::class);
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
$this->be($this->user()); $this->be($this->user());
$response = $this->get('/_test/binder/20170917'); $response = $this->get('/_test/binder/20170917');
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
@ -549,11 +556,17 @@ class BinderTest extends TestCase
return 'date: ' . $date->format('Y-m-d'); return 'date: ' . $date->format('Y-m-d');
} }
); );
$date = new Carbon;
$date->endOfMonth();
// mock fiscal helper:
$helper = $this->mock(FiscalHelperInterface::class);
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
$this->be($this->user()); $this->be($this->user());
$response = $this->get('/_test/binder/currentMonthEnd'); $response = $this->get('/_test/binder/currentMonthEnd');
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
$date = new Carbon;
$date->endOfMonth();
$response->assertSee('date: ' . $date->format('Y-m-d')); $response->assertSee('date: ' . $date->format('Y-m-d'));
} }
@ -568,11 +581,17 @@ class BinderTest extends TestCase
return 'date: ' . $date->format('Y-m-d'); return 'date: ' . $date->format('Y-m-d');
} }
); );
$date = new Carbon;
$date->startOfMonth();
// mock fiscal helper:
$helper = $this->mock(FiscalHelperInterface::class);
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
$this->be($this->user()); $this->be($this->user());
$response = $this->get('/_test/binder/currentMonthStart'); $response = $this->get('/_test/binder/currentMonthStart');
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
$date = new Carbon;
$date->startOfMonth();
$response->assertSee('date: ' . $date->format('Y-m-d')); $response->assertSee('date: ' . $date->format('Y-m-d'));
} }
@ -587,11 +606,17 @@ class BinderTest extends TestCase
return 'date: ' . $date->format('Y-m-d'); return 'date: ' . $date->format('Y-m-d');
} }
); );
$date = new Carbon;
$date->endOfYear();
// mock fiscal helper:
$helper = $this->mock(FiscalHelperInterface::class);
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
$this->be($this->user()); $this->be($this->user());
$response = $this->get('/_test/binder/currentYearEnd'); $response = $this->get('/_test/binder/currentYearEnd');
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
$date = new Carbon;
$date->endOfYear();
$response->assertSee('date: ' . $date->format('Y-m-d')); $response->assertSee('date: ' . $date->format('Y-m-d'));
} }
@ -601,16 +626,22 @@ class BinderTest extends TestCase
*/ */
public function testDateCurrentYearStart(): void public function testDateCurrentYearStart(): void
{ {
$date = new Carbon;
$date->startOfYear();
Route::middleware(Binder::class)->any( Route::middleware(Binder::class)->any(
'/_test/binder/{date}', function (Carbon $date) { '/_test/binder/{date}', function (Carbon $date) {
return 'date: ' . $date->format('Y-m-d'); return 'date: ' . $date->format('Y-m-d');
} }
); );
// mock fiscal helper:
$helper = $this->mock(FiscalHelperInterface::class);
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
$this->be($this->user()); $this->be($this->user());
$response = $this->get('/_test/binder/currentYearStart'); $response = $this->get('/_test/binder/currentYearStart');
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
$date = new Carbon;
$date->startOfYear();
$response->assertSee('date: ' . $date->format('Y-m-d')); $response->assertSee('date: ' . $date->format('Y-m-d'));
} }
@ -632,11 +663,11 @@ class BinderTest extends TestCase
// mock fiscal helper: // mock fiscal helper:
$helper = $this->mock(FiscalHelperInterface::class); $helper = $this->mock(FiscalHelperInterface::class);
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once(); $helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
$this->be($this->user()); $this->be($this->user());
$response = $this->get('/_test/binder/currentFiscalYearEnd'); $response = $this->get('/_test/binder/currentFiscalYearEnd');
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
$response->assertSee('date: ' . $date->format('Y-m-d')); $response->assertSee('date: ' . $date->format('Y-m-d'));
} }
@ -657,12 +688,12 @@ class BinderTest extends TestCase
// mock fiscal helper: // mock fiscal helper:
$helper = $this->mock(FiscalHelperInterface::class); $helper = $this->mock(FiscalHelperInterface::class);
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once(); $helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
$this->be($this->user()); $this->be($this->user());
$response = $this->get('/_test/binder/currentFiscalYearStart'); $response = $this->get('/_test/binder/currentFiscalYearStart');
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
$response->assertSee('date: ' . $date->format('Y-m-d')); $response->assertSee('date: ' . $date->format('Y-m-d'));
} }
@ -677,6 +708,12 @@ class BinderTest extends TestCase
return 'date: ' . $date->format('Y-m-d'); return 'date: ' . $date->format('Y-m-d');
} }
); );
$date = new Carbon;
// mock fiscal helper:
$helper = $this->mock(FiscalHelperInterface::class);
$helper->shouldReceive('endOfFiscalYear')->andReturn($date)->once();
$helper->shouldReceive('startOfFiscalYear')->andReturn($date)->once();
$this->be($this->user()); $this->be($this->user());
$response = $this->get('/_test/binder/fakedate'); $response = $this->get('/_test/binder/fakedate');
$this->assertEquals(Response::HTTP_NOT_FOUND, $response->getStatusCode()); $this->assertEquals(Response::HTTP_NOT_FOUND, $response->getStatusCode());

View File

@ -22,6 +22,7 @@ declare(strict_types=1);
namespace Tests\Unit\TransactionRules\Triggers; namespace Tests\Unit\TransactionRules\Triggers;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\TransactionRules\Triggers\BudgetIs; use FireflyIII\TransactionRules\Triggers\BudgetIs;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
@ -88,7 +89,9 @@ class BudgetIsTest extends TestCase
$budget = $journal->user->budgets()->first(); $budget = $journal->user->budgets()->first();
$journal->budgets()->detach(); $journal->budgets()->detach();
/** @var Transaction $transaction */
foreach($transactions as $transaction) { foreach($transactions as $transaction) {
$transaction->budgets()->detach();
$transaction->budgets()->save($budget); $transaction->budgets()->save($budget);
$this->assertEquals(1, $transaction->budgets()->count()); $this->assertEquals(1, $transaction->budgets()->count());
} }

View File

@ -39,7 +39,7 @@ class CategoryIsTest extends TestCase
do { do {
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first(); $journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
$transactions = $journal->transactions()->count(); $transactions = $journal->transactions()->count();
} while ($transactions === 0); } while ($transactions !== 2);
$category = $journal->user->categories()->first(); $category = $journal->user->categories()->first();
$journal->categories()->detach(); $journal->categories()->detach();
@ -59,7 +59,7 @@ class CategoryIsTest extends TestCase
do { do {
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first(); $journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
$transactions = $journal->transactions()->count(); $transactions = $journal->transactions()->count();
} while ($transactions === 0); } while ($transactions !== 2);
$category = $journal->user->categories()->first(); $category = $journal->user->categories()->first();
$otherCategory = $journal->user->categories()->where('id', '!=', $category->id)->first(); $otherCategory = $journal->user->categories()->where('id', '!=', $category->id)->first();
@ -80,7 +80,7 @@ class CategoryIsTest extends TestCase
do { do {
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first(); $journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
$transactions = $journal->transactions()->count(); $transactions = $journal->transactions()->count();
} while ($transactions === 0); } while ($transactions !== 2);
$transaction = $journal->transactions()->first(); $transaction = $journal->transactions()->first();
$category = $journal->user->categories()->first(); $category = $journal->user->categories()->first();