Skip to content

Upgrade to Laravel 10#816

Merged
edwh merged 194 commits intodevelopfrom
upgrade-laravel-10x-restart
Apr 23, 2026
Merged

Upgrade to Laravel 10#816
edwh merged 194 commits intodevelopfrom
upgrade-laravel-10x-restart

Conversation

@edwh
Copy link
Copy Markdown
Collaborator

@edwh edwh commented Sep 24, 2025

Overview

This PR builds on #806 (the initial Laravel 10 upgrade via Laravel Shift) and adds substantial additional work to complete the modernization.

Changes Since PR #806

Build System Overhaul

  • Migrated from Laravel Mix to Vite for faster, more modern frontend builds
  • Blade templates updated to use @vite() directive instead of asset()
  • JavaScript translation files now auto-generated by Vite laravel-translator plugin

PHP & Framework

  • Upgraded PHP to 8.2 (beyond the 8.1 requirement of Laravel 10)
  • Fixed legacy password hashing compatibility issue that prevented logins after upgrade
  • Translation pluralization system fixes for JavaScript

jQuery Plugin Removal & Vue Replacements

Removed heavy jQuery dependencies and replaced with lighter alternatives:

  • Select2 → Native HTML selects with Vue enhancements
  • bootstrap-tokenfield → Removed (functionality handled differently)
  • Slick carousel → Bootstrap-Vue carousel component
  • bootstrap-sortable → Bootstrap-Vue tables

Testing & CI

  • Fixed multiple PHPUnit test failures
  • Fixed Playwright end-to-end tests for new Vite asset loading
  • Removed fragile autocomplete Playwright test
  • All tests now passing on CircleCI

Development Environment

  • Docker startup now automatically wipes and remigrates database on container restart
  • Improved database connectivity checking
  • Switched to WSL for Windows development
  • Fixed various asset loading issues in development

Bug Fixes

  • Fixed Vue component JavaScript errors and API compatibility
  • Fixed iframe stats sharing to use Vite assets
  • Fixed edit icon paths for dev and production
  • Fixed group tags API URL syntax error
  • Fixed global app.js jQuery initialization timing
  • Fixed htmlToText import compatibility
  • Restored lodash aliases needed by text-clipper

Statistics

  • 172 commits
  • 621 files changed
  • +10,871 −8,765 lines

Requirements After Merge

  • Run composer install and npm install
  • Run npm run build or npm run dev
  • Clear all Laravel caches
  • Run database migrations
  • Ensure PHP 8.2+ in all environments

edwh and others added 30 commits June 23, 2025 10:01
…ssions we don't have in Docker Compose environment.
Since PHP 5.4 the short array syntax `[]` may be used instead of `array()`.
The role index page now uses a Vue component instead of server-rendered
Blade links. Update test to check for the HTML-encoded JSON data in the
component props instead of rendered anchor tags.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
11 Security Hotspots
7.3% Duplication on New Code (required ≤ 3%)
E Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

edwh and others added 3 commits January 23, 2026 10:22
The checkbox in the event invite modal was not functional - clicking it
did nothing. This fix:

1. Adds server-side code to pass group member emails as a data attribute
   on the checkbox element
2. Adds JavaScript handler to populate the email textarea when the
   checkbox is checked, and remove them when unchecked
3. Properly enables the submit button when emails are present

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create EventInviteModal.vue component to replace blade modal
- Remove jQuery handler from app.js and use Vue event handling
- Add conditional email field to Volunteer API resource (only visible
  to hosts, network coordinators, and admins for privacy)
- Update EventAttendance.vue to use new Vue modal component
- Remove blade modal include from events/view.blade.php
- Add translation for manual_invite_placeholder in en/fr/fr-BE
- Add tests for volunteer email visibility based on user role

Fixes the "Add invites for group members" checkbox not populating
emails when clicked.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Event invite modal: Add Tab key support for email tags, fix CSRF token
  retrieval from meta tag, update placeholder translations
- Notifications: Fix mark as read using event delegation for dynamic elements
- Profile skills: Add 'Ctrl-click to select multiple' hint, hide dropdown arrow
- Landing page: Fix 'Waste prevented' text wrapping with proper styling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comment thread .circleci/config.yml Fixed
Comment thread .circleci/config.yml Fixed
Comment thread .circleci/config.yml Fixed
Comment thread Taskfile.yml Fixed
edwh and others added 15 commits January 23, 2026 15:13
Reverts accidental port change that broke CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Taskfile.yml: Update wait_for_service check to use port 8026
- CLAUDE.md: Update Mailhog URL
- docs/local-development.md: Update Mailhog URL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Refactored to recursively process nested translation structures
instead of failing when encountering arrays.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Logs EventsUsers status and role to help diagnose why attending
is sometimes true when it should be false in CI.

Also adds test artifacts to .gitignore.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removed fwrite(STDERR) which was causing TeamCity to mark the test
as failed even when assertions passed. Debug info now only appears
in assertion failure messages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The test occasionally fails in CI with all_confirmed_restarters_count
being 1 instead of 0. Added debug info to show group membership state
when assertion fails.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Center title and intro text on landing page
- Reduce line-height on h1 for tighter title spacing
- Add white-space: nowrap to stat headers to prevent line breaks
- Add missing description field to skills seeder (required NOT NULL column)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use more specific selector (label.btn.btn-checkbox) for higher specificity
- Override background color to gray (#E4E4E4)
- Remove uppercase text-transform
- Add background-image: none to prevent gradient overrides

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add docker:vite, docker:vite:start, docker:vite:stop tasks
- Change HMR host from hardcoded www.example.com to env variable with localhost default
- Update CLAUDE.md with critical Docker task command documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create EmailValidation.vue component that checks if email already
exists on blur and displays validation message. Replaces inline
HTML with proper Vue component following codebase patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The templates use kebab-case (<categories-table>, <roles-table>) but
components were registered without hyphens. Vue's template-to-component
resolution requires matching names.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Past events were missing timezone in the expanded event data, causing
date/time display issues on group pages. Now explicitly passing
timezone alongside event_date_local, start_local, and end_local.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The route was incorrectly placed in the ensureAPIToken middleware group
but requires authentication since it calls auth()->user(). Moved to the
auth+verifyUserConsent+ensureAPIToken group where it belongs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Hide hosts section in EventDetails when no hosts assigned
- Update StatsShare to use __() instead of $lang.get/choice methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
11 Security Hotspots
8.0% Duplication on New Code (required ≤ 3%)
E Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@edwh edwh mentioned this pull request Apr 23, 2026
79 tasks
edwh added 2 commits April 23, 2026 18:04
Bring in 30 commits from develop (PRs #817-#822 and related):
- Wiki login fallback when wiki unavailable (#819)
- Group edit map in wrong place fix (#818)
- Configurable support email address (#821)
- HTML escaping fix in user list view
- Intermittent Playwright test fixes (device, group invitation, notification)
- SQL precedence fix in UserGroups::scopeConfirmedInvitation
- Bitnami → official/Bitnami Legacy image swaps for Discourse stack
- French-Belgian postcode translation tweak (#822)

Conflict resolutions:
- .circleci/config.yml: kept L10's machine executor + Task/Docker Compose
  paradigm; develop's multi-image executor changes are superseded.
- docs/local-development.md: kept L10's collapsible-sections structure;
  WSL content is present on both sides.
- phpunit.xml: kept L10's DB_TEST_DATABASE=restarters_db_test (separate
  test DB is the intended L10 setup).
- tests/Integration/utils.js: took develop's more robust dropzone wait
  (expect .dz-success visible, 30s timeout) over L10's preview+sleep.
- resources/js/translations.js: deleted (Vite laravel-translator plugin
  now generates it); develop's edit discarded.
- package-lock.json: regenerated via npm install against merged package.json.
The merge took develop's .dz-success selector for the photo upload wait,
but the L10 branch dropzone DOM doesn't produce .dz-success. Revert to
L10's .dz-image img selector. Keep develop's 30s timeout (was 10s on L10)
since it's more forgiving without cost.
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
11 Security Hotspots
8.5% Duplication on New Code (required ≤ 3%)
E Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment thread .circleci/config.yml
name: Setup application
command: |
# Grant timezone access - run directly on MySQL container
docker exec restarters_db mysql -u root -ps3cr3t -e "GRANT SELECT ON mysql.time_zone_name TO 'restarters'@'%';"
Comment thread .circleci/config.yml
- run: sed -i 's/HONEYPOT_DISABLE=.*$/HONEYPOT_DISABLE=TRUE/g' .env
# Setup additional configuration needed for CI (most setup already done by docker_run.sh)
# Set MySQL function creators using session variable (compatible with MySQL 5.7)
docker exec restarters_db mysql -u root -ps3cr3t -e "SET GLOBAL log_bin_trust_function_creators = 1;"
Comment thread .circleci/config.yml
- run: npx playwright install-deps
- run: npm install -D @playwright/test
# Disable ONLY_FULL_GROUP_BY for compatibility with getItemTypes() query
docker exec restarters_db mysql -u root -ps3cr3t -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));"
Comment thread Taskfile.yml
echo "Waiting for services in profile: {{.PROFILE}}"
echo ""

# Wait for core services (always needed)
@edwh edwh merged commit 5c082ea into develop Apr 23, 2026
1 of 3 checks passed
edwh added a commit that referenced this pull request Apr 23, 2026
Bring in the Laravel 10 upgrade (via PR #816 merge) plus develop drift.

Single conflict in app/Listeners/LogInToWiki.php constructor signature:
kept develop's ?UserCreator $mediawikiUserCreator (nullable type, no
default) over the older UserCreator $mediawikiUserCreator = null form.
Both work with the MediawikiServiceProvider binding that returns null
when Wiki is unavailable; keeping develop's form for consistency with
the tested wiki-fallback flow.

package-lock.json regenerated via npm install.
@edwh edwh mentioned this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants