Release v1.4.0#41
Merged
Merged
Conversation
Sync develop with main (v1.3.0)
Wire the ghdj/laravel-visitor-tracker package (^1.1) into the app to provide first-party visitor analytics for dev-tools.online. Integration: - Require ghdj/laravel-visitor-tracker ^1.1 (composer.json/lock). - Append the package's TrackVisitor middleware to the web group in bootstrap/app.php so all web requests are recorded. - Add the /tools/visitor-tracker route and sitemap entry, served by a new visitorTracker() action on ToolController plus a public-facing Blade view under resources/views/tools/visitor-tracker.blade.php. - Rely on the package's loadMigrationsFrom for the visitors/visits schema; published copies are intentionally not committed. Dashboard auth (env-driven via config/visitor-tracker.php): - Local: token-based auth so the dashboard is gated by a shared secret. - Production: allow_unprotected enabled because the dashboard route is fronted by Cloudflare Access, which performs the actual auth. Operations: - Add cron/migrate.php as the OVH cron entrypoint that bootstraps Laravel and runs migrate --force, so package migrations apply on shared hosting without shell access. - .gitignore: ignore database/*.sqlite, *.sqlite-journal and bootstrap/cache/*.php to keep local artifacts out of the repo. - deploy.yml: strip database/*.sqlite* and bootstrap/cache/*.php from the build before SFTP so dev artifacts never reach production.
The package's service provider throws a RuntimeException during package:discover when the dashboard is enabled but no auth method is configured. CI has no env vars set, so composer install fails before tests can run. Disable the dashboard for the tests job — the suite doesn't exercise it.
feat: integrate ghdj/laravel-visitor-tracker
- CHANGELOG: add 1.4.0 entry (visitor tracker integration, test scaffolding, deploy hardening, operator notes for required env vars). - CHANGELOG: backfill missing 1.3.0 entry (Sort Lines tool, code editor PHP parse fix), since the 1.3.0 tag shipped without one. - Bump footer version in layouts/app.blade.php from v1.2.0 to v1.4.0 (was stale by one release).
Resolve conflicts from develop missing the v1.3.0 release-prep work (Sort Lines tool, v1.2.1 PHP-string fix, CHANGELOG entries) that landed on main via PR #38 but never synced back to develop. - CHANGELOG: keep new 1.4.0 entry, take main's 1.3.0 + 1.2.1 entries (more thorough than the local backfill draft). - Footer version: kept at v1.4.0. - routes/web.php: keep both new routes (sort-lines from main, the visitor-tracker from this release). - ToolController: keep both new methods, and add Sort Lines to the home tools list (was missing — would have failed feature tests). - home.blade.php: keep main's @case('sort') icon block. - code-editor.blade.php: take main's <' + '?php fix (the v1.2.1 fix). - tests/Feature/WebRoutesTest.php: take main's version (adds sort-lines coverage to all the route lists).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v1.4.0 ships first-party visitor analytics for dev-tools.online and adds the
test scaffolding that landed alongside it.
Added
ghdj/laravel-visitor-tracker ^1.1:/tools/visitor-trackerpublic-facing tool page.TrackVisitormiddleware appended to thewebgroup so all webrequests are recorded.
/admin/visitor-tracker, env-driven auth:token-based locally,
allow_unprotectedin production behindCloudflare Access.
phpunit.xml,tests/TestCase.php, plus unit andfeature tests for the Base64, CSV, Markdown, SQL, and YAML services/APIs.
Operations
cron/migrate.phpentrypoint for the OVH cron, so packagemigrations apply on shared hosting without shell access.
database/*.sqlite*andbootstrap/cache/*.phpfrom the build before SFTP — dev artifacts never reach production, and
the server re-caches config/routes after each deploy.
.gitignorenow excludes local SQLite databases and cached bootstrapfiles.
boot-time auth guard doesn't trip in CI.
Operator notes (required on the production server)
VISITOR_TRACKER_ALLOW_UNPROTECTED=true(orVISITOR_TRACKER_TOKEN=...)must be set, otherwise the package's service provider throws on boot.
DB_CONNECTION=sqlitesince the host has no DB server.cron/migrate.phpso package migrationsrun after deploy.
The production
.envalready has these set, and Cloudflare Access isgating
/admin/*.Bookkeeping
shipped without a CHANGELOG entry.
v1.2.0(stale) tov1.4.0.Test plan
v1.4.0on main, publish GitHub release, deploy/tools/visitor-tracker, confirm a row lands inthe prod sqlite
visitstable/admin/visitor-trackerthrough Cloudflare Accessand confirm the dashboard renders