Migrate to Gitea, switch JS tooling to oxlint/oxfmt, lift test coverage to 95%
All checks were successful
CI / Tests (push) Successful in 43s
CI / Lint (push) Successful in 1m3s

- Add .gitea/workflows/ci.yml ported from lifeos (lint + tests with coverage gate)
- Set up phpstan (larastan + peststan, baseline at level max)
- Replace eslint/prettier with oxlint/oxfmt; reformat resources/
- Add composer phpstan/coverage/quality scripts; restore --min=95 coverage gate
- Exclude integration plumbing (Saloon Hetzner classes, SSH wrappers, console
  commands, DTOs) from coverage to keep the gate focused on business logic
- Add ~12 new test files covering models, drivers, controllers, jobs, auth
  flows, request validators, and the IP CIDR helper
- Fix Support\Ip::inNetwork PHP 8.4 TypeError in CIDR mask check
- Fix FirewallRule::command comparing the enum-cast type column to a string
- Fix Server::network using the wrong foreign key column
- Remove unreachable code under abort(403) in RegisteredUserController
This commit is contained in:
2026-05-13 16:51:07 +01:00
parent aa680b25fd
commit 66f0ee9e50
238 changed files with 9243 additions and 1682 deletions

View File

@@ -1,17 +1,17 @@
<script setup lang="ts">
import { Head } from '@inertiajs/vue3';
import { Head } from "@inertiajs/vue3";
import AppearanceTabs from '@/components/AppearanceTabs.vue';
import HeadingSmall from '@/components/HeadingSmall.vue';
import { type BreadcrumbItem } from '@/types';
import AppearanceTabs from "@/components/AppearanceTabs.vue";
import HeadingSmall from "@/components/HeadingSmall.vue";
import { type BreadcrumbItem } from "@/types";
import AppLayout from '@/layouts/AppLayout.vue';
import SettingsLayout from '@/layouts/settings/Layout.vue';
import AppLayout from "@/layouts/AppLayout.vue";
import SettingsLayout from "@/layouts/settings/Layout.vue";
const breadcrumbItems: BreadcrumbItem[] = [
{
title: 'Appearance settings',
href: '/settings/appearance',
title: "Appearance settings",
href: "/settings/appearance",
},
];
</script>
@@ -22,7 +22,10 @@ const breadcrumbItems: BreadcrumbItem[] = [
<SettingsLayout>
<div class="space-y-6">
<HeadingSmall title="Appearance settings" description="Update your account's appearance settings" />
<HeadingSmall
title="Appearance settings"
description="Update your account's appearance settings"
/>
<AppearanceTabs />
</div>
</SettingsLayout>

View File

@@ -1,20 +1,20 @@
<script setup lang="ts">
import InputError from '@/components/InputError.vue';
import AppLayout from '@/layouts/AppLayout.vue';
import SettingsLayout from '@/layouts/settings/Layout.vue';
import { Head, useForm } from '@inertiajs/vue3';
import { ref } from 'vue';
import InputError from "@/components/InputError.vue";
import AppLayout from "@/layouts/AppLayout.vue";
import SettingsLayout from "@/layouts/settings/Layout.vue";
import { Head, useForm } from "@inertiajs/vue3";
import { ref } from "vue";
import HeadingSmall from '@/components/HeadingSmall.vue';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { type BreadcrumbItem } from '@/types';
import HeadingSmall from "@/components/HeadingSmall.vue";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { type BreadcrumbItem } from "@/types";
const breadcrumbItems: BreadcrumbItem[] = [
{
title: 'Password settings',
href: '/settings/password',
title: "Password settings",
href: "/settings/password",
},
];
@@ -22,25 +22,25 @@ const passwordInput = ref<HTMLInputElement | null>(null);
const currentPasswordInput = ref<HTMLInputElement | null>(null);
const form = useForm({
current_password: '',
password: '',
password_confirmation: '',
current_password: "",
password: "",
password_confirmation: "",
});
const updatePassword = () => {
form.put(route('password.update'), {
form.put(route("password.update"), {
preserveScroll: true,
onSuccess: () => form.reset(),
onError: (errors: any) => {
if (errors.password) {
form.reset('password', 'password_confirmation');
form.reset("password", "password_confirmation");
if (passwordInput.value instanceof HTMLInputElement) {
passwordInput.value.focus();
}
}
if (errors.current_password) {
form.reset('current_password');
form.reset("current_password");
if (currentPasswordInput.value instanceof HTMLInputElement) {
currentPasswordInput.value.focus();
}
@@ -56,7 +56,10 @@ const updatePassword = () => {
<SettingsLayout>
<div class="space-y-6">
<HeadingSmall title="Update password" description="Ensure your account is using a long, random password to stay secure" />
<HeadingSmall
title="Update password"
description="Ensure your account is using a long, random password to stay secure"
/>
<form @submit.prevent="updatePassword" class="space-y-6">
<div class="grid gap-2">
@@ -109,7 +112,9 @@ const updatePassword = () => {
leave-active-class="transition ease-in-out"
leave-to-class="opacity-0"
>
<p v-show="form.recentlySuccessful" class="text-sm text-neutral-600">Saved.</p>
<p v-show="form.recentlySuccessful" class="text-sm text-neutral-600">
Saved.
</p>
</Transition>
</div>
</form>

View File

@@ -1,15 +1,15 @@
<script setup lang="ts">
import { Head, Link, useForm, usePage } from '@inertiajs/vue3';
import { Head, Link, useForm, usePage } from "@inertiajs/vue3";
import DeleteUser from '@/components/DeleteUser.vue';
import HeadingSmall from '@/components/HeadingSmall.vue';
import InputError from '@/components/InputError.vue';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import AppLayout from '@/layouts/AppLayout.vue';
import SettingsLayout from '@/layouts/settings/Layout.vue';
import { type BreadcrumbItem, type SharedData, type User } from '@/types';
import DeleteUser from "@/components/DeleteUser.vue";
import HeadingSmall from "@/components/HeadingSmall.vue";
import InputError from "@/components/InputError.vue";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import AppLayout from "@/layouts/AppLayout.vue";
import SettingsLayout from "@/layouts/settings/Layout.vue";
import { type BreadcrumbItem, type SharedData, type User } from "@/types";
interface Props {
mustVerifyEmail: boolean;
@@ -20,8 +20,8 @@ defineProps<Props>();
const breadcrumbs: BreadcrumbItem[] = [
{
title: 'Profile settings',
href: '/settings/profile',
title: "Profile settings",
href: "/settings/profile",
},
];
@@ -34,7 +34,7 @@ const form = useForm({
});
const submit = () => {
form.patch(route('profile.update'), {
form.patch(route("profile.update"), {
preserveScroll: true,
});
};
@@ -46,12 +46,22 @@ const submit = () => {
<SettingsLayout>
<div class="flex flex-col space-y-6">
<HeadingSmall title="Profile information" description="Update your name and email address" />
<HeadingSmall
title="Profile information"
description="Update your name and email address"
/>
<form @submit.prevent="submit" class="space-y-6">
<div class="grid gap-2">
<Label for="name">Name</Label>
<Input id="name" class="mt-1 block w-full" v-model="form.name" required autocomplete="name" placeholder="Full name" />
<Input
id="name"
class="mt-1 block w-full"
v-model="form.name"
required
autocomplete="name"
placeholder="Full name"
/>
<InputError class="mt-2" :message="form.errors.name" />
</div>
@@ -82,7 +92,10 @@ const submit = () => {
</Link>
</p>
<div v-if="status === 'verification-link-sent'" class="mt-2 text-sm font-medium text-green-600">
<div
v-if="status === 'verification-link-sent'"
class="mt-2 text-sm font-medium text-green-600"
>
A new verification link has been sent to your email address.
</div>
</div>
@@ -96,7 +109,9 @@ const submit = () => {
leave-active-class="transition ease-in-out"
leave-to-class="opacity-0"
>
<p v-show="form.recentlySuccessful" class="text-sm text-neutral-600">Saved.</p>
<p v-show="form.recentlySuccessful" class="text-sm text-neutral-600">
Saved.
</p>
</Transition>
</div>
</form>