diff --git a/API_CHANGELOG.md b/API_CHANGELOG.md index 24d7dd1562..151ba6f1c9 100644 --- a/API_CHANGELOG.md +++ b/API_CHANGELOG.md @@ -29,9 +29,6 @@ Check back here regularly to stay ahead of removals. | 2026-03-07 | `StopoverResource.departure` is deprecated → use `departureReal` (if not null) or `departurePlanned` instead | 2026-09-30 | [#4551](https://github.com/Traewelling/traewelling/pull/4551) | | 2026-03-05 | `StopoverResource.rilIdentifier` is always `null` → use the station identifiers endpoint instead | 2026-09-30 | [#4502](https://github.com/Traewelling/traewelling/pull/4502) | | 2026-03-05 | `StopoverResource.evaIdentifier` is always `null` → use the station identifiers endpoint instead | 2026-09-30 | [#4502](https://github.com/Traewelling/traewelling/pull/4502) | -| 2026-01-20 | `StatusResource.train` is deprecated → use `checkin` instead | 2026-07-31 | [#4313](https://github.com/Traewelling/traewelling/pull/4313) | -| 2026-01-20 | `StatusResource.userDetails` is deprecated → use `user` instead | 2026-07-31 | [#4313](https://github.com/Traewelling/traewelling/pull/4313) | -| 2026-01-20 | `LightUserResource.mastodonUrl` is always `null` → use `mastodon.server` instead | 2026-07-31 | [#4313](https://github.com/Traewelling/traewelling/pull/4313) | | 2026-03-20 | `POST /api/v1/report` is deprecated → use `POST /api/v1/reports` instead | 2026-09-30 | [#4602](https://github.com/Traewelling/traewelling/pull/4602) | | 2026-03-30 | `GET /api/v1/static/privacy` is deprecated -> use `GET /api/v1/privacy-policies/current` instead | 2026-09-30 | [#4650](https://github.com/Traewelling/traewelling/pull/4650) | | 2026-03-30 | `PUT /api/v1/settings/acceptPrivacy` is deprecated -> use `PUT /api/v1/privacy-policies/accept` instead | 2026-09-30 | [#4650](https://github.com/Traewelling/traewelling/pull/4650) | @@ -45,6 +42,16 @@ Check back here regularly to stay ahead of removals. --- +# 2026-09-27 + +Removed the following deprecated fields, announced on 2026-01-20: + +- `StatusResource.train`: use `checkin` instead, it contains the same data +- `StatusResource.userDetails`: use `user` instead, it contains the same data +- `LightUserResource.mastodonUrl`: was always `null`, use `mastodon.server` instead + +--- + # 2026-09-25 New station identifier type `local_code`: a short code a local transport authority or operator uses for a station. diff --git a/app/Http/Resources/LightUserResource.php b/app/Http/Resources/LightUserResource.php index 6c2cd14835..8edb80ca0e 100644 --- a/app/Http/Resources/LightUserResource.php +++ b/app/Http/Resources/LightUserResource.php @@ -55,7 +55,6 @@ public function toArray($request): array 'server' => $mastodonServer?->domain, 'user_id' => $socialProfile?->mastodon_id, ], - 'mastodonUrl' => null, // TODO: remove after 2026-07 (this is not lightweight enough for a LightResource) 'preventIndex' => (bool) $user->prevent_index, ]; } diff --git a/app/Http/Resources/StatusResource.php b/app/Http/Resources/StatusResource.php index 8f99ae693f..ecd63f78c8 100644 --- a/app/Http/Resources/StatusResource.php +++ b/app/Http/Resources/StatusResource.php @@ -23,9 +23,7 @@ 'isLikable', 'client', 'createdAt', - 'train', 'event', - 'userDetails', 'tags', 'checkin', 'user', @@ -161,8 +159,6 @@ public function toArray($request): array ), 'createdAt' => $this->created_at->toIso8601String(), - 'train' => new TransportResource($this->checkin), // TODO: delete after 2026-07 (replaced by 'checkin') - 'userDetails' => new LightUserResource($this->user), // TODO: delete after 2026-07 (replaced by 'user') ]; } } diff --git a/resources/vue/components/ActiveStatusCard.vue b/resources/vue/components/ActiveStatusCard.vue index 6df45bbc64..11cab1cd75 100644 --- a/resources/vue/components/ActiveStatusCard.vue +++ b/resources/vue/components/ActiveStatusCard.vue @@ -26,18 +26,18 @@ export default defineComponent({ }, computed: { departure() { - const manual = this.state.status?.train?.manualDeparture ?? null; + const manual = this.state.status?.checkin?.manualDeparture ?? null; if (manual) return DateTime.fromISO(manual); const dep = - this.state.status?.train?.origin?.departure ?? this.state.status?.train?.origin?.arrival ?? null; + this.state.status?.checkin?.origin?.departure ?? this.state.status?.checkin?.origin?.arrival ?? null; return DateTime.fromISO(dep); }, arrival() { - const manual = this.state.status?.train?.manualArrival ?? null; + const manual = this.state.status?.checkin?.manualArrival ?? null; if (manual) return DateTime.fromISO(manual); const arr = - this.state.status?.train?.destination?.arrival ?? - this.state.status?.train?.destination?.departure ?? + this.state.status?.checkin?.destination?.arrival ?? + this.state.status?.checkin?.destination?.departure ?? null; return DateTime.fromISO(arr); }, @@ -107,21 +107,21 @@ export default defineComponent({
- {{ state.status?.train?.origin?.name }} + {{ state.status?.checkin?.origin?.name }} {{ format(departure) }}
-+
- {{ state.status?.train?.destination?.name }} + {{ state.status?.checkin?.destination?.name }} {{ format(arrival) }}
diff --git a/resources/vue/components/CheckinSuccessHelper.vue b/resources/vue/components/CheckinSuccessHelper.vue index 50911fa758..a6356a59e3 100644 --- a/resources/vue/components/CheckinSuccessHelper.vue +++ b/resources/vue/components/CheckinSuccessHelper.vue @@ -60,10 +60,10 @@ export default {{{ trans('checkin.success.body2', { - lineName: status?.train?.lineName ?? '', - distance: ((status?.train?.distance ?? 0) / 1000).toFixed(2).toString(), - origin: status?.train?.origin?.name ?? '', - destination: status?.train?.destination?.name ?? '', + lineName: status?.checkin?.lineName ?? '', + distance: ((status?.checkin?.distance ?? 0) / 1000).toFixed(2).toString(), + origin: status?.checkin?.origin?.name ?? '', + destination: status?.checkin?.destination?.name ?? '', }) }}
@@ -99,7 +99,7 @@ export default { aria-current="true" >- {{ connectionStatus?.train?.origin?.name }} ➜ - {{ connectionStatus?.train?.destination?.name }} + {{ connectionStatus?.checkin?.origin?.name }} ➜ + {{ connectionStatus?.checkin?.destination?.name }}
-