Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
860 commits
Select commit Hold shift + click to select a range
59c6013
Expand committee tree items on search
schlagma Jul 12, 2026
ebca4da
Mark current committee view as current in navbar
schlagma Jul 12, 2026
feff502
Add a button to add role members directly from the roles overview
schlagma Jul 12, 2026
83cfa83
Adjust button size to avatars
schlagma Jul 12, 2026
01c1808
Adjust button size to avatars
schlagma Jul 12, 2026
5b67d31
Force button size
schlagma Jul 12, 2026
0244e81
Remove button variant
schlagma Jul 12, 2026
9d20c16
Use correct translation key
schlagma Jul 12, 2026
06ef781
Remove cancel button
schlagma Jul 12, 2026
5c27fc1
Do not use form component to remove cancel button
schlagma Jul 12, 2026
050b963
wire:model.live
schlagma Jul 12, 2026
a2ed76c
Add validate attribute
schlagma Jul 12, 2026
09c7283
Adjust bottom margin
schlagma Jul 12, 2026
66be44d
Sort committees in tree
schlagma Jul 12, 2026
68a1d1c
Sort roles by name
schlagma Jul 12, 2026
91048a7
Persist showOnlyActive preference of the user
schlagma Jul 12, 2026
18c5250
Better text for the no parent committee option
schlagma Jul 12, 2026
4cb878f
Add a badge with the number of members to the roles list
schlagma Jul 12, 2026
96e9900
gap-2 between badge and dropdown
schlagma Jul 12, 2026
9051157
Use role name in delete modal title
schlagma Jul 12, 2026
3fdf508
Remove slice
schlagma Jul 12, 2026
2d6276e
Remove committee list view
schlagma Jul 12, 2026
038bc2c
Show delete morderator modal
schlagma Jul 12, 2026
4f3bc3d
Update translations
schlagma Jul 12, 2026
c814435
Sort admins and moderators by name
schlagma Jul 12, 2026
5d3cbb2
Show add member button only to moderators and superadmins
schlagma Jul 12, 2026
ffb3dab
Fix domain search
schlagma Jul 12, 2026
aa25af8
Fix deleting role group relationships
schlagma Jul 12, 2026
f0bf4fc
Fix showing delete modal
schlagma Jul 12, 2026
4c07957
Prevent adding the same role twice to a group
schlagma Jul 12, 2026
80fd8c0
Fix deleting group error
schlagma Jul 12, 2026
59d9a68
Use cn in delete modal
schlagma Jul 12, 2026
ba2aaae
Sort members by name
schlagma Jul 12, 2026
48ab5a0
Fix visibility of nav items
schlagma Jul 12, 2026
45fdfb3
Use description in title
schlagma Jul 12, 2026
437b9fe
Show community name in dashboard title
schlagma Jul 12, 2026
b7b3285
Show community name in moderators and admins list title
schlagma Jul 12, 2026
5620ad0
Fix missing placeholder
schlagma Jul 12, 2026
53283ca
Fix closing delete modal by clicking on cancel button
schlagma Jul 12, 2026
3ac613b
Better title
schlagma Jul 12, 2026
5d856bc
Add title and error on registration page
schlagma Jul 12, 2026
cb8eeaa
Make shure a changed name is also updated in the database and not onl…
schlagma Jul 12, 2026
79f77c9
Add realm to user on registration
schlagma Jul 12, 2026
ae53e59
Better error messages when creating a new committee
schlagma Jul 12, 2026
18339fb
Better german validation errors
schlagma Jul 12, 2026
aa6a45b
Use full community name in breadcrumbs
schlagma Jul 12, 2026
a3de562
Do not show 'roles' item in breadcrumbs
schlagma Jul 12, 2026
f20b953
Update translations
schlagma Jul 12, 2026
853161b
Show role in title and remove short name input
schlagma Jul 12, 2026
d992b66
Enable account locking for superadmins
schlagma Jul 12, 2026
e62504d
Disable user accounts
schlagma Jul 12, 2026
29e6c8d
Show name in profile browser tab title
schlagma Jul 12, 2026
4e79659
Update translations
schlagma Jul 12, 2026
8ff12e9
Try to speed up loading of the committee tree
schlagma Jul 12, 2026
a0d7fcf
Only sync differences
schlagma Jul 12, 2026
dc55a1f
Reduce requests in sync scripts
schlagma Jul 12, 2026
a51ce24
Add success message after running ldap sync
schlagma Jul 12, 2026
39cd299
Use role description instead of cn for roles.members view in breadcrumbs
schlagma Jul 12, 2026
2116c2a
Use ldaprecord
schlagma Jul 13, 2026
333d801
Remove unildap from database
schlagma Jul 13, 2026
1d2f789
Fix uni user check
schlagma Jul 13, 2026
aa42ee4
Reduce number of ldap queries
schlagma Jul 13, 2026
b7b7f63
Batches of 10
schlagma Jul 13, 2026
eb99a5c
Add a configuration option for the uni ldap batch size
schlagma Jul 13, 2026
997d8db
Fix delete user function
schlagma Jul 13, 2026
48ffdff
Sort results
schlagma Jul 13, 2026
7e1c579
Add search field
schlagma Jul 13, 2026
a94683e
Run pint
schlagma Jul 13, 2026
7a201de
Run rector
schlagma Jul 13, 2026
c4e868d
Run pint
schlagma Jul 13, 2026
9599dc0
Cropperjs viewmode
schlagma Jul 13, 2026
b51181b
Add new api
schlagma Jul 13, 2026
089cb64
Change icon
schlagma Jul 13, 2026
8534f66
Fix migrations
schlagma Jul 13, 2026
220fcf6
Update translations
schlagma Jul 13, 2026
f5f8eb9
Update translations
schlagma Jul 13, 2026
03ec402
Update translations
schlagma Jul 13, 2026
03cd7c7
Error handling
schlagma Jul 13, 2026
f2cd99e
Error handling
schlagma Jul 13, 2026
e63b22a
Upgrade to Laravel 13
schlagma Jul 13, 2026
feeb8f7
Add space to the output of ldap:sync-roles
schlagma Jul 13, 2026
66e53c5
Improve spaces
schlagma Jul 13, 2026
4822170
Improve spaces
schlagma Jul 13, 2026
a867233
Add community name to title
schlagma Jul 13, 2026
29a4642
Add committee moderators feature
schlagma Jul 13, 2026
387d996
Try to speed up list and tree
schlagma Jul 13, 2026
9814666
Every user should be able to view the committee moderators list
schlagma Jul 13, 2026
3bc7cc1
Reorder buttons
schlagma Jul 13, 2026
ffb4095
Update translations
schlagma Jul 13, 2026
731fb46
Restrict committee moderators rights
schlagma Jul 13, 2026
72f772e
Disable links on deactivated buttons and menu items
schlagma Jul 13, 2026
db7978a
Hide users already in community, role or group
schlagma Jul 13, 2026
587fd9b
Hide roles already added to group
schlagma Jul 13, 2026
a4d00c9
Sort groups
schlagma Jul 13, 2026
e8d2560
Paginate groups
schlagma Jul 13, 2026
3d59d72
Margin
schlagma Jul 13, 2026
ae1c6fb
Padding
schlagma Jul 13, 2026
465e26c
Padding
schlagma Jul 13, 2026
d2a6044
Deferred loading of unused roles and committees
schlagma Jul 13, 2026
0c9661f
Add loading indicator
schlagma Jul 13, 2026
7091ed1
Add avatar in superadmin list
schlagma Jul 13, 2026
8055b7d
Improve new realm
schlagma Jul 13, 2026
36c8e63
Use flux callouts for error messages
schlagma Jul 13, 2026
10b7b09
Update translations
schlagma Jul 13, 2026
fc54ab3
Add sorting, pagination and search
schlagma Jul 13, 2026
f95045a
Spacing
schlagma Jul 13, 2026
81e4f8c
Hide uni ldap stuff if not configured
schlagma Jul 13, 2026
26c878d
Use cards for search results
schlagma Jul 13, 2026
3b146b5
Do not show email in results
schlagma Jul 13, 2026
86a7281
Spacing
schlagma Jul 13, 2026
5d1de4f
Spacing
schlagma Jul 13, 2026
be8b987
Pagination and sorting
schlagma Jul 13, 2026
29eaf3b
Use callout for error
schlagma Jul 13, 2026
eef2335
Remove disabled input field
schlagma Jul 13, 2026
95bb4bf
Edit buttons
schlagma Jul 13, 2026
b59cee3
Hide toggle button if search is applied
schlagma Jul 13, 2026
d8b285d
Show separators
schlagma Jul 13, 2026
bab8b53
Add domains item to sidebar navigation
schlagma Jul 13, 2026
c9fd9fb
Speed up role member list
schlagma Jul 13, 2026
0a33fde
Speed up members list
schlagma Jul 13, 2026
822981d
Speed up roles list
schlagma Jul 13, 2026
a180aa8
Search and sort for role members
schlagma Jul 14, 2026
ffd156e
Show link only for admins
schlagma Jul 14, 2026
a94db9f
Remove long debounce
schlagma Jul 14, 2026
bba33c3
Speed up lists
schlagma Jul 14, 2026
24f7aa6
Enable sorting of members list
schlagma Jul 14, 2026
403d16d
Pagination for role members list
schlagma Jul 14, 2026
fd15865
fix(api-legacy): return avatar URL from SocialiteUser, not raw jpegPhoto
lukas-staab Jul 14, 2026
db69924
rector fix
lukas-staab Jul 14, 2026
76880f9
Authorize profile components via a UserPolicy ability
lukas-staab Jul 14, 2026
6a2e4d7
fix(api-legacy): rename "picture" to "avatar" for SocialiteUser respo…
lukas-staab Jul 14, 2026
ddbbba7
Add OAuth authorization view template
lukas-staab Jul 14, 2026
8afacf2
Update breadcrumbs
schlagma Jul 14, 2026
8b0bd12
Update breadcrumbs
schlagma Jul 14, 2026
1909c3f
Use members from ldap
schlagma Jul 14, 2026
6b2a7fc
Rename full name column to description
schlagma Jul 14, 2026
1910084
Search for cn and description
schlagma Jul 14, 2026
3ccdec1
Fix links and missing imports
schlagma Jul 14, 2026
4e7d156
Add group memberships view
schlagma Jul 14, 2026
f99a40d
Some adjustments to the group members list
schlagma Jul 14, 2026
4f78c2c
Update breadcrumbs
schlagma Jul 14, 2026
44d9be6
Restore login redirect for guests on OAuth authorize endpoint
lukas-staab Jul 14, 2026
93318a1
Update translations
schlagma Jul 14, 2026
8496536
Add committes, groups and course to users api endpoint
schlagma Jul 14, 2026
b44e4df
Update tests to replace 'alice' with 'admin' in user-specific scenarios
lukas-staab Jul 14, 2026
07a28ea
Improve user api endpoints
schlagma Jul 14, 2026
e49d8eb
Dark mode border around picture
schlagma Jul 14, 2026
7321576
Try to fix tests
schlagma Jul 14, 2026
5ecd467
Rector and Pint
schlagma Jul 14, 2026
7816f19
Update breadcrumbs
schlagma Jul 14, 2026
d32b9cd
Update breadcrumbs
schlagma Jul 14, 2026
72c8a3d
Include roles in committee search
schlagma Jul 14, 2026
1a44dee
Spacing
schlagma Jul 14, 2026
1dcdabd
Remove badge color
schlagma Jul 14, 2026
3de5170
Only show roles div if there are roles
schlagma Jul 14, 2026
94e9e15
Add role commands
schlagma Jul 14, 2026
d2df280
Add command to move committee
schlagma Jul 14, 2026
6850376
API documentation
schlagma Jul 14, 2026
7022378
Ask to type in shortcode before deleting
schlagma Jul 14, 2026
c53b6f5
Update style of delete modals
schlagma Jul 14, 2026
b2b4622
Update communities list
schlagma Jul 14, 2026
4feefd7
Update realm list
schlagma Jul 14, 2026
59437b2
Update realm list
schlagma Jul 14, 2026
a936b5f
Update realm list
schlagma Jul 14, 2026
63b0157
Avoid to use cdn
schlagma Jul 14, 2026
421a07f
Update API
schlagma Jul 14, 2026
88e5c77
Update API
schlagma Jul 14, 2026
99189f4
Rename uid placeholder for communities to realm
schlagma Jul 14, 2026
cfa5346
Persist showOnlyActive on role memberships page
schlagma Jul 15, 2026
b5cf20a
Update group role relation page
schlagma Jul 15, 2026
f2c0725
Update group role relation page
schlagma Jul 15, 2026
19768e4
Spacing
schlagma Jul 15, 2026
3bd63c3
Defer loading
schlagma Jul 15, 2026
bcd9472
Rename username to uid in api endpoints
schlagma Jul 15, 2026
c31bbb8
Reduce forwards after login for non-superadmins
schlagma Jul 15, 2026
f57fabd
composer fix
schlagma Jul 15, 2026
f191279
Auto-collapse breadcrumbs items
schlagma Jul 15, 2026
c7c6e24
Try to fix breadcrumbs bugs
schlagma Jul 15, 2026
0e5194d
Do not truncate breadcrumb items
schlagma Jul 15, 2026
261aae4
Try to fix breadcrumbs bugs
schlagma Jul 15, 2026
1666ed6
Try to fix breadcrumbs bugs
schlagma Jul 15, 2026
949b820
Try to fix breadcrumbs bugs
schlagma Jul 15, 2026
193df28
Try to fix breadcrumbs bugs
schlagma Jul 15, 2026
69e6203
Try to fix breadcrumbs bugs
schlagma Jul 15, 2026
b6181b5
Try to fix breadcrumbs bugs
schlagma Jul 15, 2026
ba8302a
Update logout confirm
schlagma Jul 15, 2026
4eacb9b
Update logout confirm
schlagma Jul 15, 2026
ddaaee4
Update translations
schlagma Jul 15, 2026
f102576
Add wrapping div
schlagma Jul 15, 2026
92b3ff7
Group all profile pages together
schlagma Jul 15, 2026
9a73297
Add wrapping div
schlagma Jul 15, 2026
5c000d4
Add pagination, sort and search
schlagma Jul 15, 2026
cccb829
Rename routes
schlagma Jul 15, 2026
80eb2ca
Rename routes
schlagma Jul 15, 2026
46ddf7e
Consistent headings
schlagma Jul 15, 2026
41c8313
Consistent headings
schlagma Jul 16, 2026
8937a60
Update info
schlagma Jul 17, 2026
69ae5f7
Update info
schlagma Jul 17, 2026
95b3d4f
Update info
schlagma Jul 17, 2026
710647e
Composer and npm update
schlagma Jul 17, 2026
0b67a5e
Update translations
schlagma Jul 17, 2026
07ab5f6
Update info and profile dropdown
schlagma Jul 17, 2026
29a354d
Add icon
schlagma Jul 17, 2026
c6e8e98
Update header and info
schlagma Jul 17, 2026
d2b84a6
Update profile dropdown
schlagma Jul 17, 2026
47d2789
Update profile dropdown
schlagma Jul 17, 2026
34d22b3
Update profile dropdown
schlagma Jul 17, 2026
484ade2
Remove icons
schlagma Jul 17, 2026
cb607ba
Fonts
schlagma Jul 17, 2026
808d655
Add page to url on role memberships
schlagma Jul 17, 2026
9f15106
Avoid loading of user data in delete modal
schlagma Jul 17, 2026
87b79b9
Update memberships list
schlagma Jul 17, 2026
b852e9a
Init oidc identity provider functionality
schlagma Jul 18, 2026
5e63876
Composer update
schlagma Jul 18, 2026
b0f60cb
Update icons
schlagma Jul 18, 2026
9ab7766
Update breadcrumbs
schlagma Jul 18, 2026
4684d6d
composer fix
schlagma Jul 18, 2026
7f48140
Use Illuminate\Image
schlagma Jul 18, 2026
62f623f
Require Laravel 13.20
schlagma Jul 18, 2026
d100ebd
Add image service provider
schlagma Jul 18, 2026
7cdeef8
Require intervention/image
schlagma Jul 18, 2026
95edd12
Only use image data
schlagma Jul 18, 2026
520063c
Use storePubliclyAs
schlagma Jul 18, 2026
6b20f9e
Add icons to buttons
schlagma Jul 18, 2026
5514242
Send email verification notification directly after registration
schlagma Jul 18, 2026
640c837
Redirect to login after registration
schlagma Jul 18, 2026
3a2644c
Do not log in freshly registered users
schlagma Jul 18, 2026
aaf8990
Successful registration message
schlagma Jul 18, 2026
e81c538
composer fix
schlagma Jul 18, 2026
e076881
Update verify email view
schlagma Jul 18, 2026
5c4da28
Update verify email view
schlagma Jul 18, 2026
20ce425
Update registration form
schlagma Jul 18, 2026
96cd37e
Remove unused legacy components
schlagma Jul 18, 2026
12f3b59
Add defaults
schlagma Jul 18, 2026
6330390
Client ID
schlagma Jul 18, 2026
c55f325
Add delete option for oidc clients
schlagma Jul 18, 2026
f9d04b9
Update delete icon
schlagma Jul 18, 2026
72174aa
Wrap dropdown in div
schlagma Jul 18, 2026
a87291d
Update badges
schlagma Jul 18, 2026
f9a13a6
Replace checkboxes with pillbox
schlagma Jul 18, 2026
73a79eb
Update translations
schlagma Jul 18, 2026
faa00f1
Add multiple to pillbox
schlagma Jul 18, 2026
5f57291
Update scopes configuration
schlagma Jul 18, 2026
c8cff9c
flex-wrap only on large srceens
schlagma Jul 18, 2026
ab0254d
Add edit page for api clients and restructure files
schlagma Jul 18, 2026
02cf562
composer fix
schlagma Jul 18, 2026
244ebc2
max-w-7xl
schlagma Jul 18, 2026
bd3c5fa
Try to fix tests
schlagma Jul 18, 2026
81a4dbf
px-8
schlagma Jul 18, 2026
1deba81
Sort user selects by name
schlagma Jul 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Keep the build context small. vendor/ is reinstalled by the php-fpm build and
# node_modules/ is not needed in the image; both are provided at runtime via the
# bind mount (and the entrypoint reinstalls vendor if the mount lacks it).
.git
node_modules
vendor
public/build
public/hot
storage/framework/cache/data
storage/framework/sessions
storage/framework/views
storage/logs
*.log
.phpunit.result.cache
.idea
.vscode
59 changes: 59 additions & 0 deletions .env.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Environment for the docker-compose.dev.yaml stack.
#
# Used BOTH as the compose interpolation source (run with
# `podman compose --env-file .env.docker ...`) AND injected into the app
# containers via `env_file:`. Because Laravel's dotenv loader is immutable,
# these injected values win over the bind-mounted host .env — so the app talks
# to the in-network services (ldap/mariadb) regardless of your host .env.
#
# Hosts are compose SERVICE NAMES and ports are the IN-CONTAINER ports. The
# *_HOST_PORT vars are only the ports published to your host machine.

# php-fpm / workspace run as your host user so bind-mounted files stay writable.
UID=1000
GID=1000

APP_NAME=StuMV
APP_ENV=local
APP_KEY=base64:GszA3F2jJK0Rdh52FvnWj3MDarPc+ftA+e0MpqqbFMQ=
APP_DEBUG=true
APP_URL=http://localhost:8080

LOG_CHANNEL=stack
LOG_LEVEL=debug

# --- MariaDB (service name "mariadb", in-container port 3306) --------------
DB_CONNECTION=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=stumv
DB_USERNAME=stumv
DB_PASSWORD=local_stumv_password
DB_HOST_PORT=13306
# phpMyAdmin web UI (http://localhost:8082)
DB_ADMIN_PORT=8082

# --- OpenLDAP (service name "ldap", in-container port 1389) ----------------
# Throwaway dev bind credentials baked into docker/openldap seed data.
LDAP_ORGANISATION="StuMV"
LDAP_LOGGING=true
LDAP_CONNECTION=default
LDAP_HOST=ldap
LDAP_PORT=1389
LDAP_USERNAME="uid=stumv,ou=Services,dc=stumv,dc=de"
LDAP_PASSWORD=stumv-not-production
LDAP_BASE_DN="dc=stumv,dc=de"
LDAP_TIMEOUT=5
LDAP_SSL=false
LDAP_TLS=false
LDAP_HOST_PORT=13389
# phpLDAPadmin web UI (http://localhost:8081)
LDAP_ADMIN_PORT=8081

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_CONNECTION=sync
FILESYSTEM_DISK=local
MAIL_MAILER=log

VITE_PORT=5173
17 changes: 15 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,25 @@ LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_CONNECTION=mariadb
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=lara
DB_USERNAME=root
DB_PASSWORD=

LDAP_ORGANISATION="StuMV"
LDAP_LOGGING=true
LDAP_CONNECTION=default
LDAP_HOST=127.0.0.1
LDAP_USERNAME="cn=admin,dc=stumv,dc=de"
LDAP_PASSWORD=
LDAP_PORT=389
LDAP_BASE_DN="dc=stumv,dc=de"
LDAP_TIMEOUT=5
LDAP_TLS=false
LDAP_STARTTLS=true

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
Expand All @@ -41,4 +53,5 @@ MAIL_FROM_NAME="${APP_NAME}"
# leave empty or comment out the whole line to remove the entry from the footer
ABOUT_URL="https://open-administration.de/index.php/kontakt-und-impressum/"
PRIVACY_URL="https://open-administration.de/index.php/datenschutz/"
TERMS_URL="https://open-administration.de/index.php/nutzungsbedingungen/"
TERMS_URL="https://open-administration.de/index.php/nutzungsbedingungen/"
SOURCE_CODE_URL="https://github.com/openadministration/stumv"
40 changes: 40 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Test environment: runs the suite against the dockerised OpenLDAP (prod-faithful,
# see docker/openldap/) and a dedicated MariaDB database. Loaded automatically by
# Laravel when APP_ENV=testing (set in phpunit.xml). CI maps the same services to
# 127.0.0.1 on these ports, so this file works locally and in CI unchanged.
APP_NAME=StuMV
APP_ENV=testing
APP_KEY=base64:GszA3F2jJK0Rdh52FvnWj3MDarPc+ftA+e0MpqqbFMQ=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_LEVEL=debug

# Dedicated test database (RefreshDatabase migrates/wipes this — never dev data).
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=13306
DB_DATABASE=stumv_testing
DB_USERNAME=stumv
DB_PASSWORD=local_stumv_password

# Dockerised OpenLDAP (docker/openldap). Throwaway dev bind credentials baked
# into the image's seed data — not production secrets.
LDAP_ORGANISATION="StuMV"
LDAP_LOGGING=false
LDAP_CONNECTION=default
LDAP_HOST=127.0.0.1
LDAP_PORT=13389
LDAP_USERNAME="uid=stumv,ou=Services,dc=stumv,dc=de"
LDAP_PASSWORD=stumv-not-production
LDAP_BASE_DN="dc=stumv,dc=de"
LDAP_TIMEOUT=5
LDAP_SSL=false
LDAP_TLS=false

CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_CONNECTION=sync
MAIL_MAILER=array
BCRYPT_ROUNDS=4
42 changes: 42 additions & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Analysis

on: push

jobs:
analysis:
if: false # disable for now
name: PHPStan (larastan)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: ldap, gd, pdo_mysql, zip, mbstring, intl, bcmath, curl
coverage: none

- name: Prepare the environment
# larastan boots the application, which needs an APP_KEY and valid config.
run: cp .env.testing .env

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Setup composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install composer dependencies
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist --no-progress

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github --memory-limit=1G
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint

on: push

jobs:
lint:
name: Pint (code style)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: ldap, gd, pdo_mysql, zip, mbstring, intl, bcmath, curl
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Setup composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install composer dependencies
# COMPOSER_AUTH carries the credentials for the commercial
# livewire/flux-pro package (add it as a repository secret).
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist --no-progress

- name: Check code style
run: vendor/bin/pint --test
46 changes: 46 additions & 0 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Rector

on: push

jobs:
rector:
name: Rector (dry-run)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: ldap, gd, pdo_mysql, zip, mbstring, intl, bcmath, curl
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Setup composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install composer dependencies
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist --no-progress

- name: Rector cache
uses: actions/cache@v4
with:
path: /tmp/rector
key: ${{ runner.os }}-rector-${{ github.run_id }}
restore-keys: ${{ runner.os }}-rector-

- run: mkdir -p /tmp/rector

- name: Rector dry-run
run: vendor/bin/rector process --dry-run --config=rector.php
107 changes: 107 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Testing

on: push

jobs:
tests:
name: Pest (PHP ${{ matrix.php }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# composer.lock resolves to symfony ^8.1 which requires php >= 8.4.1.
php: ['8.4']

services:
# MariaDB for the Eloquent side (RefreshDatabase migrates stumv_testing).
mariadb:
image: mariadb:11
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: "yes"
MARIADB_DATABASE: stumv_testing
MARIADB_USER: stumv
MARIADB_PASSWORD: local_stumv_password
ports:
- 13306:3306
options: >-
--health-cmd="healthcheck.sh --connect --innodb_initialized"
--health-interval=10s
--health-timeout=5s
--health-retries=10

steps:
- uses: actions/checkout@v4

# Prod-faithful OpenLDAP (same Symas build as production). Built and run
# here rather than as a `services:` entry because it is a local image.
# Tests hit it on 127.0.0.1:13389 (matches .env.testing).
- name: Build & start LDAP
run: |
docker build -t stumv-openldap ./docker/openldap
docker run -d --name ldap -p 13389:1389 stumv-openldap

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ldap, gd, pdo_mysql, zip, mbstring, intl, bcmath, curl
coverage: none

- name: Prepare environment file
run: cp .env.testing .env

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache Composer packages
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ hashFiles('composer.lock') }}
restore-keys: composer-

- name: Install PHP dependencies
# COMPOSER_AUTH carries the credentials for the commercial livewire/flux-pro
# package. Add a repository secret named COMPOSER_AUTH containing JSON, e.g.
# {"http-basic":{"composer.fluxui.dev":{"username":"<email>","password":"<license-key>"}}}
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist --no-progress

- name: Generate Passport encryption keys
run: php artisan passport:keys

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm

- name: Build front-end assets
# Produces public/build/manifest.json so @vite resolves in full-page
# (HTTP) tests. public/hot is gitignored and absent in CI.
run: |
npm ci
npm run build

- name: Wait for LDAP to accept binds
run: |
for i in $(seq 1 30); do
if docker exec ldap /opt/symas/bin/ldapwhoami -x \
-H ldap://127.0.0.1:1389 \
-D "uid=stumv,ou=Services,dc=stumv,dc=de" \
-w stumv-not-production >/dev/null 2>&1; then
echo "LDAP is up"; exit 0
fi
echo "waiting for LDAP ($i)..."; sleep 2
done
echo "LDAP did not come up"; docker logs ldap; exit 1

- name: Run tests
run: ./vendor/bin/pest --no-coverage

- name: LDAP logs on failure
if: failure()
run: docker logs ldap || true
Loading
Loading