Remaining worktree changes - #574
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR groups a set of “leftover worktree” changes into a single branch/PR. The changes are primarily developer-experience and maintainability edits across models, includes, install tooling, and CI—plus a few small runtime-impacting adjustments.
Changes:
- Hardened a number of DB row fetch loops by avoiding direct
list(...) = sql_fetch_row(...)unpacking whensql_fetch_row()can returnfalse|null. - Updated/added documentation comments across many files (some translations/rewrites), and added Intelephense-only stubs for dynamic globals/constants.
- Updated CI to run PHPUnit across a PHP version matrix and bumped some locked composer dependencies.
Reviewed changes
Copilot reviewed 53 out of 54 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| stubs/intelephense_globals.php | Adds static-analysis-only stubs for globals/constants used dynamically at runtime. |
| model/User_Model.php | Adds docblocks and hardens fetch-row handling; includes a query construction issue needing fix. |
| model/User_Favorites_Model.php | Hardens fetch-row handling; updates doc comments (some formatting needs cleanup). |
| model/Tokens_Model.php | Hardens fetch-row handling; updates doc/comments. |
| model/Statistics_Model.php | Hardens fetch-row handling in result iteration and sum fetching. |
| model/Spy_Model.php | Hardens fetch-row iteration; updates doc/comments. |
| model/Sessions_Model.php | Hardens fetch-row handling; updates doc/comments (some formatting/wording issues). |
| model/Rankings_Player_Model.php | Hardens fetch-row handling for ranking row unpacking. |
| model/Rankings_Model.php | Hardens fetch-row handling and initializes result arrays; doc tweaks. |
| model/Rankings_Ally_Model.php | Hardens fetch-row handling for ranking row unpacking; doc tweaks. |
| model/Player_Technology_Model.php | Documentation/translation updates. |
| model/Player_Model.php | Documentation/translation updates. |
| model/Player_Defense_Model.php | Documentation updates and delete_user_aster signature/usage alignment. |
| model/Player_Building_Model.php | Hardens fetch-row handling; initializes arrays; documentation/translation updates. |
| model/Mod_User_Config_Model.php | Documentation/translation updates. |
| model/Mod_Model.php | Hardens fetch-row handling for scalar results; documentation/translation updates. |
| model/Mod_Config_Model.php | Documentation/translation updates. |
| model/Group_Model.php | Documentation/translation updates. |
| model/DBUtils_Model.php | Hardens fetch-row handling in table iteration; documentation updates. |
| model/Config_Model.php | Documentation/translation updates. |
| model/Combat_Report_Model.php | Documentation updates. |
| model/AstroObject_Model.php | Hardens fetch-row handling for scalar queries; documentation updates. |
| model/Ally_Model.php | Documentation/translation updates. |
| install/upgrade_cli.php | Documentation/translation updates for CLI installer/upgrade tool. |
| install/TestManager.php | Documentation/translation updates for installation/upgrade test manager. |
| install/migrations/20251227001_UpgradeTo403.php | Documentation/translation updates. |
| install/migrations/00000000000_initial.php | Documentation/translation updates. |
| install/MigrationManager.php | Documentation/translation updates. |
| install/ConfigGenerator.php | Documentation/translation updates for config generator. |
| install/config/database_config.php | Documentation/translation updates. |
| install/AutoUpgradeManager.php | Documentation/translation updates. |
| index.php | Replaces meaningful comments with placeholder text (needs improvement). |
| includes/usergroups.php | Documentation/translation updates. |
| includes/user.php | Documentation/translation updates for user flows and PAT helpers. |
| includes/token.php | Documentation/translation updates. |
| includes/sessions.php | Documentation/translation updates. |
| includes/player.php | Updates defense deletion call signature usage; removes resync call; documentation updates. |
| includes/ogame.php | Documentation updates reflecting module extraction and improved phpdoc. |
| includes/ogame_structs.php | Documentation updates. |
| includes/ogame_requirements.php | Parameter name doc fix ($nom → $name). |
| includes/ogame_planet.php | Documentation/translation updates. |
| includes/mysql.php | Documentation/translation updates to DB wrapper API docs. |
| includes/mod.php | Documentation updates for mod install/update/uninstall helpers. |
| includes/mail.php | Documentation updates for mail helper signature docs. |
| includes/log.php | Doc type casing updates. |
| includes/galaxy.php | Large block of doc comment translation/cleanup. |
| includes/functions.php | Fixes booster decoding call site; adds some initialization and doc updates. |
| includes/config.php | Documentation/translation updates. |
| includes/chart_js.php | Documentation/translation updates. |
| includes/cache.php | Documentation updates. |
| core/helper/ToolTip_Helper.php | Documentation/translation updates. |
| composer.lock | Updates locked dependency versions (phpunit-related stack and php-parser). |
| .github/workflows/tests.yml | Runs PHPUnit on a PHP version matrix (8.4/8.5). |
| .devcontainer/devcontainer-lock.json | Adds devcontainer feature lock file for reproducible tooling. |
Comment on lines
245
to
246
| $request = "SELECT SUM(planet_imports), SUM(spy_imports), SUM(rank_imports), SUM(search)"; | ||
| $request .= "FROM " . TABLE_USER; |
Comment on lines
19
to
23
| /** | ||
| * @param $cookie_id | ||
| * @param string $user_ip | ||
| * @return bool|mixed|\Ogsteam\Ogspy\mysqli_result | ||
| * @return bool | ||
| */ |
Comment on lines
91
to
95
| /** | ||
| * Supprime les Favoris qui ne sont plus accessibles après redimensionnement de univers | ||
| * Deletes the Favoris qui ne sont plus accessibles après redimensionnement of univers | ||
| * @param $nb_galaxies | ||
| * @param $nb_system | ||
| */ |
Comment on lines
+112
to
116
| * Removes old ranking entries. | ||
| * @param datadate Time in seconds | ||
| * @param $table Name of the impacted table | ||
| * Removes database entries when datadate is outdated | ||
| */ |
Comment on lines
+68
to
72
| * Deletes une entrée of défense liée à un objet astronomique. | ||
| * | ||
| * @param int $aster_id The unique identifier of the asteroid to be deleted. | ||
| * @param int $aster_id Identifier of l'objet à delete. | ||
| * @return void | ||
| */ |
Comment on lines
15
to
19
| /** | ||
| * @abstract Utilisé dans les autres fichiers pour s'assurer qu'index.php est bien appelé | ||
| * Documentation note. | ||
| */ | ||
| const IN_SPYOGAME = true; | ||
|
|
Comment on lines
130
to
132
| /** | ||
| * Deletes all sessions | ||
| * Deletes toutes the sessions. | ||
| */ |
Comment on lines
20
to
24
| /** | ||
| * Gets the favorite system list for the defined user | ||
| * @param $user_id | ||
| * @return array $favorite Liste des systèmes favoris | ||
| * Retrieves the list of the user's favorite systems. | ||
| * @param int $user_id | ||
| * @return array $favorite List of favorite systems | ||
| */ |
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.
Moves the remaining tracked worktree changes into a separate branch/PR.