Merge pull request #10673 from firefly-iii/release-1753936796

🤖 Automatically merge the PR into the develop branch.
This commit is contained in:
github-actions[bot]
2025-07-31 06:40:05 +02:00
committed by GitHub
4 changed files with 81 additions and 79 deletions

View File

@@ -1,8 +1,9 @@
<?php <?php
declare(strict_types=1);
namespace FireflyIII\Support\JsonApi\Enrichments; namespace FireflyIII\Support\JsonApi\Enrichments;
use FireflyIII\Models\Account;
use FireflyIII\Models\Bill; use FireflyIII\Models\Bill;
use FireflyIII\Models\Note; use FireflyIII\Models\Note;
use FireflyIII\Models\ObjectGroup; use FireflyIII\Models\ObjectGroup;
@@ -76,13 +77,14 @@ class SubscriptionEnrichment implements EnrichmentInterface
} }
$item->amounts = $amounts; $item->amounts = $amounts;
$item->meta = $meta; $item->meta = $meta;
return $item; return $item;
}); });
return $collection; return $collection;
} }
public function enrichSingle(Model|array $model): array|Model public function enrichSingle(array|Model $model): array|Model
{ {
Log::debug(__METHOD__); Log::debug(__METHOD__);
$collection = new Collection([$model]); $collection = new Collection([$model]);
@@ -124,6 +126,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
{ {
$this->nativeCurrency = $nativeCurrency; $this->nativeCurrency = $nativeCurrency;
} }
private function collectSubscriptionIds(): void private function collectSubscriptionIds(): void
{ {
/** @var Bill $bill */ /** @var Bill $bill */
@@ -138,7 +141,8 @@ class SubscriptionEnrichment implements EnrichmentInterface
$set = DB::table('object_groupables') $set = DB::table('object_groupables')
->whereIn('object_groupable_id', $this->subscriptionIds) ->whereIn('object_groupable_id', $this->subscriptionIds)
->where('object_groupable_type', Bill::class) ->where('object_groupable_type', Bill::class)
->get(['object_groupable_id','object_group_id']); ->get(['object_groupable_id', 'object_group_id'])
;
$ids = array_unique($set->pluck('object_group_id')->toArray()); $ids = array_unique($set->pluck('object_group_id')->toArray());
@@ -153,5 +157,4 @@ class SubscriptionEnrichment implements EnrichmentInterface
$this->objectGroups[(int)$group['id']] = $group; $this->objectGroups[(int)$group['id']] = $group;
} }
} }
} }

View File

@@ -27,7 +27,6 @@ namespace FireflyIII\Transformers;
use Carbon\Carbon; use Carbon\Carbon;
use Carbon\CarbonInterface; use Carbon\CarbonInterface;
use FireflyIII\Models\Bill; use FireflyIII\Models\Bill;
use FireflyIII\Models\ObjectGroup;
use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Bill\BillRepositoryInterface;

View File

@@ -78,8 +78,8 @@ return [
'running_balance_column' => env('USE_RUNNING_BALANCE', false), 'running_balance_column' => env('USE_RUNNING_BALANCE', false),
// see cer.php for exchange rates feature flag. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-07-30', 'version' => 'develop/2025-07-31',
'build_time' => 1753878970, 'build_time' => 1753936691,
'api_version' => '2.1.0', // field is no longer used. 'api_version' => '2.1.0', // field is no longer used.
'db_version' => 26, 'db_version' => 26,