# Changelog All notable changes to this project are documented in this file. Format inspired by Keep a Changelog and Semantic Versioning principles. ## [Unreleased] ### Fixed - Troop duplication race-condition hardening for issue #98. - `sendunitsComplete()` now uses atomic per-record movement claim (`proc = 1` only when current worker owns the row) before processing reinforcements. - `returnunitsComplete()` now uses the same atomic claim flow for returning troops and canceled-settler returns. - `sendSettlersComplete()` now claims movement rows atomically before processing settle/return outcomes. ### Security and Safety - Added idempotent A2B request claiming in troop send flow to prevent duplicate processing from concurrent/replayed submissions. - Introduced `claimA2b()` in database layer and consumed it in `sendTroops()` before any troop/resource mutation. ### Changed - Movement completion status updates for the hardened flows are now claim-first (atomic) instead of late batch marking. ## [2026-03-14] - Stability, PHP 8, Docker and Installer Hardening ### Added - New root changelog file. - Admin panel option to list users in the Users menu (`?p=users`). - New admin users list page with pagination and links to player details: `Admin/Templates/users.tpl`. - Installer SQL defaults in config form now read from `.env` (with fallback to legacy `MYSQL_*` keys). - Random database prefix generation per installation session. - Installer timezone option for Brazil (`America/Sao_Paulo`) and default timezone set to Sao Paulo. - SSE explicit error payload in croppers builder to avoid infinite reconnect loops. ### Changed - Docker runtime upgraded to PHP 8.3 (Apache). - Docker Compose database moved to MariaDB latest. - Compose configuration modernized (v2 style), env naming standardized to `MARIADB_*` with compatibility support. - README and Docker docs updated to reflect PHP 8/MariaDB and modern compose commands. - Installer timezone id mapping fixed in `install/index.php` to match form options. - Croppers build progress behavior adjusted to report incremental progress in batches. ### Fixed - PHP 8 compatibility: - Replaced deprecated `each()` usage. - Added safe guards for `magic_quotes_*` checks. - Multiple warnings/fatals from undefined variables and null array offsets across game/admin/installer pages. - Duplicate constant definition warnings in language file (preventing header issues). - Duplicate key failures for croppers index creation in PHP 8 (`mysqli_sql_exception` behavior) by making index ops idempotent. - Installer and runtime DB connection robustness: - host:port normalization, - retry logic, - throwable-safe handling. - Duplicate primary key errors in units insertion by making `addUnits` idempotent (`ON DUPLICATE KEY UPDATE`). - Admin template warnings in report/message pages (undefined keys/indexes). - Admin map tile query now uses dynamic table prefix (`TB_PREFIX`) instead of hardcoded `s1_` tables. - Session/header issues in admin reset script: - removed output before `