Files
shopPRO/docs/TODO.md
Jacek 5b66720f7c fix: scontainers edit saves existing record instead of creating new
Fixes static container admin edit flow by preserving id in hiddenFields and adding route-id fallback during save.
Adds regression tests for edit/create id behavior, updates release docs (changelog/testing/CLAUDE), and appends SonarQube open issues to docs/TODO.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 22:56:14 +02:00

460 KiB
Raw Blame History

  1. Dodać uwierzytelnienie dwuskÅadnikowe za pomocÄ… aplikacji.
  2. Dodać zarzÄ…dzanie uprawnieniami na poziomie urzytkownika, na razie uprawnienia do poszczególnych moduÅów. naprawić dziaÅanie newslettera i zapis do bazy newslettera program lojalnoÅciowy proponowane produkty w koszyku Do zamówieÅ„ w statusie: realizowane lub oczekuje na wpÅatÄ™. Opcja tylko dla zarejestrowanych klientów. https://royal-stone.pl/pl/order1.html Dodać możliwoÅć ustawienia limitu znaków w wiadomoÅciach do produktu
  3. [] Przerobić analitykę Google Analytics i Google ADS
  4. Rozważyć integrację SonarQube (statyczna analiza kodu PHP — bugi, security, code smells). Community Edition darmowy, self-hosted. Wymaga serwera + MCP server w Claude Code.

SonarQube — 0.340 (2026-03-15)

Bugs

  • [MAJOR] cron.php:192 — Review the data-flow - use of uninitialized value (php:S836)
  • [MAJOR] cron.php:561 — Review the data-flow - use of uninitialized value (php:S836)
  • [MAJOR] cron.php:590 — Review the data-flow - use of uninitialized value (php:S836)
  • [MAJOR] cron.php:643 — Review the data-flow - use of uninitialized value (php:S836)

Code Smells — CRITICAL

  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:35 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:66 — Define a constant instead of duplicating "Accept: application/json" 5 times (php:S1192)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:77 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:159 — Define a constant instead of duplicating "Y-m-d H:i:s" 3 times (php:S1192)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:239 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:309 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:315 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:339 — Define a constant instead of duplicating "Authorization: Bearer " 3 times (php:S1192)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:359 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:400 — Refactor this function to reduce its Cognitive Complexity (php:S3776)
  • [CRITICAL] autoload/front/Controllers/ShopBasketController.php:499 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/front/Controllers/ShopBasketController.php:502 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/api/Controllers/ProductsApiController.php:396 — Refactor this function to reduce its Cognitive Complexity from 83 to 15 (php:S3776)
  • [CRITICAL] autoload/Shared/Helpers/Helpers.php:408 — Refactor this function to reduce its Cognitive Complexity from 165 to 15 (php:S3776)
  • [CRITICAL] autoload/Shared/Helpers/Helpers.php:520 — Define a constant instead of duplicating "/([0-9]+)$" 3 times (php:S1192)
  • [CRITICAL] autoload/Shared/Helpers/Helpers.php:607 — Define a constant instead of duplicating " Order Deny,Allow" 3 times (php:S1192)
  • [CRITICAL] autoload/Shared/Helpers/Helpers.php:650 — Define a constant instead of duplicating "&lang=" 7 times (php:S1192)
  • [CRITICAL] cron.php:200 — Define a constant instead of duplicating "Y-m-d H:i:s" 7 times (php:S1192)
  • [CRITICAL] cron.php:200 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:203 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:418 — Define a constant instead of duplicating "Authorization: Bearer " 5 times (php:S1192)
  • [CRITICAL] cron.php:419 — Define a constant instead of duplicating "Accept: application/json" 5 times (php:S1192)
  • [CRITICAL] cron.php:526 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:529 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:531 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:533 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:542 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:545 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:547 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:555 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] cron.php:559 — Add curly braces around nested statement(s) (php:S121)

Code Smells — MAJOR

  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:130 — Method has 4 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:233 — Method has 5 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:307 — Method has 7 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:400 — Method has 8 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:449 — Method has 4 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:481 — Method has 4 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:513 — Method has 4 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/front/Controllers/ShopBasketController.php:493 — Method has 4 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/Domain/Order/OrderAdminService.php:673 — Method has 4 returns, max 3 allowed (php:S1142)
  • [MAJOR] autoload/Domain/Order/OrderAdminService.php:740 — Method has 4 returns, max 3 allowed (php:S1142)

Code Smells — MINOR

  • [MINOR] autoload/Domain/Order/OrderRepository.php — Add a new line at the end of file (php:S113)
  • [MINOR] admin/templates/site/unlogged-layout.php — Add a new line at the end of file (php:S113)
  • [MINOR] admin/templates/users/user-2fa.php — Add a new line at the end of file (php:S113)
  • [MINOR] autoload/admin/Controllers/ProductArchiveController.php:196 — Rename function "bulk_delete_permanent" to match camelCase (php:S100)
  • [MINOR] autoload/api/ApiRouter.php:107 — Remove unused "$db" local variable (php:S1481)
  • [MINOR] cron.php:198 — Remove unused "$orderAdminService" local variable (php:S1481)
  • [MINOR] cron.php:524 — Remove unused "$mdb" local variable (php:S1481)
  • [MINOR] cron.php:539 — Remove unused "$mdb" local variable (php:S1481)

SonarQube — 0.343 (2026-03-19)

Nowe issues (nie wystÄ™powaÅy w 0.340)

Code Smells — CRITICAL

  • [CRITICAL] autoload/admin/App.php:39 — Cognitive Complexity 37 (max 15) (php:S3776)
  • [CRITICAL] autoload/admin/App.php:50 — Duplicated literal "Location: /admin/" 8 times (php:S1192)
  • [CRITICAL] autoload/front/Controllers/ShopOrderController.php:86 — Cognitive Complexity 22 (max 15) (php:S3776)
  • [CRITICAL] autoload/front/Controllers/ShopBasketController.php:275 — Duplicated literal "Location: /koszyk" 6 times (php:S1192)
  • [CRITICAL] autoload/front/Controllers/ShopBasketController.php:287 — Duplicated literal "Location: /zamowienie/" 3 times (php:S1192)
  • [CRITICAL] autoload/front/Controllers/ShopBasketController.php:495 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/Domain/Integrations/IntegrationsRepository.php:33 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/Domain/Integrations/ApiloRepository.php:449 — Cognitive Complexity 22 (max 15) (php:S3776)
  • [CRITICAL] autoload/Domain/Order/OrderRepository.php:635 — Cognitive Complexity 61 (max 15) (php:S3776)
  • [CRITICAL] cron.php:198 — Cognitive Complexity 109 (max 15) (php:S3776)
  • [CRITICAL] cron.php:651 — Cognitive Complexity 18 (max 15) (php:S3776)

Code Smells — MAJOR

  • [MAJOR] cron.php:198 — Function has 305 lines (max 150) (php:S138)
  • [MAJOR] cron.php:572 — Unused function parameter "$payload" (php:S1172)
  • [MAJOR] cron.php:572 — 5 returns (max 3) (php:S1142)
  • [MAJOR] cron.php:605 — Unused function parameter "$payload" (php:S1172)
  • [MAJOR] cron.php:605 — 4 returns (max 3) (php:S1142)
  • [MAJOR] cron.php:651 — Unused function parameter "$payload" (php:S1172)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:53 — 4 returns (max 3) (php:S1142)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:93 — 4 returns (max 3) (php:S1142)
  • [MAJOR] autoload/Domain/Integrations/ApiloRepository.php:105 — Merge if statement with enclosing one (php:S1066)

SonarQube — 0.344 (2026-03-19)

  • [MINOR] autoload/front/Controllers/ShopBasketController.php:484 — Use empty() to check whether the array is empty (php:S1155)

SonarQube — 0.345 (2026-03-25)

  • [MAJOR] autoload/front/Controllers/ShopBasketController.php:574 — This method has 6 returns, which is more than the 3 allowed (php:S1142)
  • [CRITICAL] autoload/front/Controllers/ShopBasketController.php:576 — Add curly braces around nested statement(s) (php:S121)
  • [CRITICAL] autoload/front/Controllers/ShopBasketController.php:602 — Add curly braces around nested statement(s) (php:S121)

SonarQube - 0.347 (2026-04-18)

Bugs/Vulnerabilities

  • [BLOCKER] autoload/admin/App.php:6 — 'SECRET' detected in this expression, review this potentially hard-coded secret. (php:S6418)
  • [CRITICAL] autoload/Domain/Integrations/IntegrationsRepository.php:241 — Enable server certificate validation on this SSL/TLS connection. (php:S4830)
  • [CRITICAL] autoload/Domain/Integrations/IntegrationsRepository.php:242 — Enable server hostname verification on this SSL/TLS connection. (php:S5527)
  • [CRITICAL] src/Modules/Settings/EmailMailboxController.php:223 — Change this code to use a stronger protocol. (php:S4423)
  • [CRITICAL] templates/projects/tasks.php:116 — Duplicate id "inprogress-tasks-container" found. First occurrence was on line 97. (Web:S7930)
  • [CRITICAL] templates/site/layout-cron.php:52 — Duplicate id "divider" found. First occurrence was on line 47. (Web:S7930)
  • [CRITICAL] templates/tasks/work-time.php:179 — Duplicate id "billing-empty-state" found. First occurrence was on line 176. (Web:S7930)
  • [MAJOR] admin/templates/dashboard/main-view.php:84 — Add "" headers to this "". (Web:S5256)
  • [MAJOR] admin/templates/site/main-layout.php:3 — Add "lang" and/or "xml:lang" attributes to this "<html>" element (Web:S5254)
  • [MAJOR] admin/templates/site/unlogged.php:2 — Add "lang" and/or "xml:lang" attributes to this "<html>" element (Web:S5254)
  • [MAJOR] admin/templates/site/unlogged-layout.php:2 — Add "lang" and/or "xml:lang" attributes to this "<html>" element (Web:S5254)
  • [MAJOR] autoload/class.Excel.php:26 — Group parts of the regex together to make the intended operator precedence explicit. (php:S5850)
  • [MAJOR] autoload/class.S.php:167 — Remove this conditional structure or edit its code blocks so that they're not all the same. (php:S3923)
  • [MAJOR] autoload/class.S.php:176 — Remove this conditional structure or edit its code blocks so that they're not all the same. (php:S3923)
  • [MAJOR] autoload/controls/class.Tasks.php:432 — Remove this use of the output from "Controllers\TasksController::taskChangeStatus"; "Controllers\TasksController::taskChangeStatus" doesn't return anything. (php:S3699)
  • [MAJOR] autoload/controls/class.Tasks.php:537 — Remove or correct this useless self-assignment (php:S1656)
  • [MAJOR] autoload/controls/class.Users.php:242 — Remove this use of the output from "Controllers\UsersController::switchBackToAdmin"; "Controllers\UsersController::switchBackToAdmin" doesn't return anything. (php:S3699)
  • [MAJOR] autoload/Domain/Promotion/PromotionRepository.php:537 — Identical sub-expressions on both sides of operator "and" (php:S1764)
  • [MAJOR] autoload/factory/class.Projects.php:326 — Delete this unreachable code or refactor the code to make it reachable. (php:S1763)
  • [MAJOR] autoload/factory/class.Tasks.php:851 — Delete this unreachable code or refactor the code to make it reachable. (php:S1763)
  • [MAJOR] templates/finances/main-view.php:107 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:185 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:188 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:191 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:194 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:201 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:204 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:207 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:210 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:222 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:223 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:224 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:225 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:252 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:255 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:94 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:95 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:96 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:97 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:98 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/main-view.php:99 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/operations-list.php:28 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/operations-list.php:29 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/operations-list.php:30 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/operations-list.php:31 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/operations-list.php:65 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MAJOR] templates/finances/operations-list.php:68 — Add either an 'id' or a 'scope' attribute to this
  • tag. (Web:TableHeaderHasIdOrScopeCheck)
  • [MINOR] admin/index.php:51 — Replace "include" with "include_once". (php:S2003)
  • [MINOR] admin/templates/banners/banner-edit.php:146 — Replace "include" with "include_once". (php:S2003)
  • [MINOR] admin/templates/filemanager/filemanager.php:4 — Add a "title" attribute to this