Releases: Amadeco/magento2-opcache-gui
Releases · Amadeco/magento2-opcache-gui
2.0.2
v2.0.1
v2.0.0
We’ve completed the real-time mode for the admin OPcache GUI and hardened the Magento backend API. Administrators can now enable live polling to watch OPcache stats update without refreshing the page and trigger actions (reset, single/bulk invalidation) with immediate feedback through native Magento alerts. The State controller now strictly validates input and CSRF form keys, while the Gui block centralizes configuration and health checks for cleaner templates. We also added French translations and did several safe performance/UX refinements.

chore(release): 2.0.0 — Realtime mode, hardened API, UX & i18n
Features
- feat(integration): no more ugly iframe to integrate Amnuts opcache-gui.
- feat(js): add realtime polling toggle with cookie persistence; prevent duplicate intervals; poll opcache state via axios GET with form_key.
- feat(js): native Magento 2 alerts after actions (reset, invalidate, bulk invalidate) with consistent success/error messages.
- feat(api):
Amadeco\OpcacheGui\Controller\Adminhtml\Api\State
now implements HttpGetActionInterface and returns structured JSON{ success, data|error }
.
Security / Hardening
- fix(api): validate CSRF form key on every request; enforce action whitelist (
poll|reset|invalidate|invalidate_searched
). - fix(api): sanitize and scope parameters before invoking Amnuts service; safely stage temporary
$_GET
and restore afterwards.
Refactor / Maintainability
- refactor(standard): Great work on respecting Magento 2 Standards for this reworking version.
- refactor(block): move OPcache health checks and view logic from
gui.phtml
intoBlock\Adminhtml\Gui
helpers; expose typed getters and a serialized config for JS bootstrap. - refactor(phpdoc): normalize English PHPDoc across block and controller; add types and exceptions where applicable.
- refactor(js): cache CSS variables once; avoid inline closures where not needed; guard redundant
setState
in pagination.
UX / Performance
- perf(js): debounce filtering; stable sorting; lighter rendering in Tabs; small accessibility fixes (roles/aria-controls).
- ui(js): “Invalidate all matching files” now uses the API when realtime is enabled; per-file invalidation keeps navigation in place.
Internationalization
- i18n(fr_FR): add French translations for new/updated UI strings (CSV updated).
Files touched (high level):
view/adminhtml/web/js/*
(React/AMD interface)Controller/Adminhtml/Api/State.php
(API, security, JSON payload)Block/Adminhtml/Gui.php
(config + health checks + PHPDoc)i18n/fr_FR.csv
(new translations)