v4.1.1
Changelog
All notable changes to phpDivingLog are documented in this file.
v4.1.1 — 2026-07-06
Dive log gallery (new aggregate photo view)
- Added a new paginated Dive Log Gallery at
/gallery(while preserving per-dive gallery at/gallery/{id}). - Added
templates/dive_log_gallery.html.twigwith lightbox-enabled thumbnails and pagination. - Added per-thumbnail contextual labels (site + location), e.g.
Nakayukui · Japan, Okinawa. - Added a primary navigation link for Gallery.
Lightbox enhancements
- Added grouped previous/next navigation and keyboard arrow support across gallery images.
- Added an in-dialog dive info block for aggregate gallery photos:
- line 1:
Dive <number> by <diver> - line 2:
Location | Divesite | When - deep link:
view dive
- line 1:
- Added responsive dialog/image sizing so large images use available viewport space more effectively.
Data/repository compatibility hardening
- Extended
PictureRepositorypagination with schema fallbacks for legacy columns:- supports
PictureIDand fallbackID - supports
LogIDand fallbackNumber
- supports
- Extended
DiveRepository::findMetaByLogIds()with legacy-safe lookup fallback order:LogID→ID→Number
- Prevented SQL fatal errors on mixed/older Diving Log schemas where canonical columns are absent.
Reuse and wiring
- Extended
GalleryControllerwith aggregate overview view-model composition (count/page slice + batched metadata). - Added
PictureRepository::countAll()andfindPage(). - Added
DiveRepository::findMetaByLogIds()for batched metadata resolution (no N+1 lookups). - Generalized shared pagination partial with optional
basePath.
Tests and verification
- Added repository tests for picture pagination/counting and metadata fallback behavior across schema variants.
- Added HTTP smoke test coverage for
/galleryrendering contract and nav discoverability. - Quality gates green:
composer test && composer stan && composer cs(with existing PHPUnit deprecations unchanged).
v4.1.0 — 2026-07-06
UI framework migration to Beer CSS (Material Design 3)
- Vendored Beer CSS, material-dynamic-colors, Material Symbols, and Inter locally under
public/assets/vendor/beercss/(no runtime CDN). - Added a global light/dark theme system with a no-FOUC prepaint bootstrap and an accessible theme toggle (persisted via
localStorage['divelog:theme']). - Added switchable color palettes (reef/sunset/kelp/abyss) persisted via
localStorage['divelog:palette']. - Added
public/assets/css/custom.cssfor project widgets built on theme tokens. - Made canvas charts theme-aware (redraw on
themechange). - Added a favicon link (
/images/favicon.ico).
Branding / personalization
- App title/brand derived from the diver's Personal profile (
<First> <Last> Dive Log), injected as a Twig global. - Footer now shows copyright (Rob Lensen <rob@bsdfreaks.nl>) and a GitHub link.
Dive detail improvements
- Fixed next/previous logbook scroll to use pane-local centering (no page jump).
- Made the Logbook pane header sticky and prevented list overlap.
- Hid the "Ascent / descent rates" chart; fixed the depth profile so it renders independently of the (now hidden) rate canvas.
- Equalized hero metric card heights (Depth / Avg depth / Duration in line).
- Added inline tank fallback: when no
DL_Tankrows exist, tank volume/pressures/O2 are read from the Logbook row itself.
Dive site detail improvements
- Added previous/next site navigation.
- Added a Google Maps link derived from latitude/longitude.
- Added Max depth and Water type (Salt/Fresh/Brackish), derived from dives.
- Added a site Pictures section using the same media/lightbox as dive detail.
- Enabled lightbox on the site map image.
Dive country detail
- Fixed empty "Dive sites" list by falling back to the Logbook country mapping when
DL_Place.CountryIDis absent/unpopulated.
Dive log overview
- Added profile and photo indicator icons per dive.
Certifications
- Added a Certifications section to the statistics page, reading from the real Diving Log
Brevetstable (Org/Brevet/CertDate/Number/Instructor/Scan1Path/Scan2Path), with front/back scans shown viaAPP_USER_PATH_WEBand lightbox. - Gated by
APP_USER_SHOW_CERTS; scans gated byAPP_USER_SHOW_PHOTO.
Robustness
- Made Personal profile loading schema-agnostic (
SELECT *+ case-insensitive alias resolution) to survive missing optional columns (e.g.Comment/Picture). - Extended fixture-backed HTTP smoke tests to cover the above;
composer test/stan/csgreen.
v4.0.0 — 2026-07-04
Big-bang modernization release.
- Replaced the legacy monolithic runtime with a layered architecture:
- Core domain/repository layer in
src/(PhpDivingLognamespace). - Standalone Twig web adapter (
adapters/web+public/index.php). - Standalone JSON API adapter (
adapters/api+public/api.php).
- Core domain/repository layer in
- Added Composer project metadata, PSR-4 autoloading, and quality scripts.
- Added quality tool configuration: PHPUnit, PHPStan, PHP_CodeSniffer (PSR-12).
- Added an environment-based typed configuration loader and
.env.example. - Added a PDO connection factory with table-prefix validation.
- Added an immutable DTO model layer and PDO repositories.
- Added support services: unit conversion; formatting (dates/coords/decimals); translation loader/fallback; RTF conversion + sanitizer; media path resolver.
- Added fixture-backed repository integration tests and HTTP smoke tests.
- Added deployment/testing/API/frontend docs under
docs/.
Removed (retired legacy stack after parity verification)
classes.inc.php- Root legacy controllers (
index.php,divesite.php,divecountry.php, etc.) includes/(Smarty / wp-db.php / jqPlot / img scripts)tpl/sql/
Intentionally retained
public/images/static assetspublic/assets/runtime frontend assets
Potentially impacted legacy-only behaviors
- Direct execution of legacy root PHP entry files (removed).
- Legacy Smarty template override/customization points (removed).
- Legacy jqPlot/Highslide rendering paths (replaced by modern assets).