Skip to content

Audit follow-ups: backend pages #145

Backlog

Description

@DavidLambauer

Part of #115. Start after #108 to #114 are merged; they rewrite these pages.

These 12 pages scored 19 to 23 of 25 in the audit. None needs a rewrite; what remains are gaps in coverage and smaller fixes. Tick a page when its notes are dealt with: fixed, or checked and found not to apply. Weakest first.

working-with-adminhtml: 19/25

  • Done. Effort: a partial rewrite. Precise on routes, ADMIN_RESOURCE, ACL, menu and form keys with stated results, but it stops before the part developers actually struggle with: the grid, the form, and the edit and delete controllers are delegated to a page in the Luma section.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 260-279) section "Grids and forms" contains no grid and no form: it shows one layout file and says "Forms follow the same pattern with a <form> component and a data provider class". The listing XML, data source, di.xml, form XML, data provider, Edit/NewAction/Delete controllers and mass actions are all absent here.
  • (line 278) the grid is delegated to "UI components", which the navigation files under "Luma" as "UI components and Knockout"; an Admin grid is not a Luma topic, and a reader of a Hyvä project will not look there.
  • (line 37) <module name="Vendor_Module" before="Magento_Backend"/>: before is only needed when a module adds controllers to the existing adminhtml route; with an own frontName it is noise that readers will copy without knowing why.
  • (lines 129-140) the Save action redirects to the list on every outcome; on an error the entered data is lost and nothing shows the usual DataPersistor + redirect-back-to-edit pattern. (string)$request->getParam('title') also turns a missing title into '' although the column is nullable.
  • (line 165) ACL resource Vendor_Module::items_delete is declared and never used by any controller on the page.
  • (lines 52-53) "Requests with any other method get a 404 response": not checked (doubt); the page does not say where the reason is logged.
  • (line 6) title and navigation label "Working with Adminhtml" name the area code rather than the task ("Admin pages"); the description line does it better.

Missing

  • a complete CRUD walk-through: listing UI component, form UI component with data provider, Edit/NewAction/Delete/MassDelete controllers, button classes
  • Admin blocks and templates (Magento\Backend\Block\Template), page actions/buttons, adminhtml layout handles
  • reading the current Admin user (Magento\Backend\Model\Auth\Session) and scope switcher handling on config-like pages
  • Mage-OS 4.0.0 Admin specifics: the bundled MageOS_ThemeAdminhtmlSwitcher with the theme-adminhtml-m137 Admin theme (what a second selectable Admin theme means for custom Admin CSS and templates; not checked), MageOS_AdminActivityLog, and that local Admin login is behind MageOS_PasskeyAuth / Magento_TwoFactorAuth
  • how to test an Admin controller (integration test with AbstractBackendController)

search: 20/25

  • Done. Effort: a partial rewrite. Correct and specific about engines in 4.0.0 (the bin/magento install wizard and the "Elasticsearch 8 (Deprecated)" label were confirmed), but it is an Admin and configuration guide sitting in Backend Development: there is no code, no way to extend or query search, and no troubleshooting.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 10-11) "hands quick search, advanced search and layered navigation to an external search engine": the consequence is not stated, namely that category pages and search fail when the engine is unreachable, and what error the storefront and logs show.
  • (line 15) "Mage-OS 4.0.0 is tested with OpenSearch 3": no exact supported version range for OpenSearch and Elasticsearch 8 (not checked).
  • (lines 51-52) "then click Test Connection": the expected result is not stated, and there is no command-line check (curl http://opensearch:9200/_cat/indices?v).
  • (line 58) bin/magento cache:clean config after three config:set calls contradicts cli-commands line 49 ("config:set cleans the configuration cache itself"); one of the two pages is doing unnecessary work or is wrong.
  • (lines 73, 85) "Minimum Terms to Match" and "Search Weight" are listed without the values they accept (for example 75%, weights 1 to 10) or their effect.
  • (lines 93-95) says when not to edit search_request.xml, never when it is the right tool or what the file looks like.
  • (whole page) no PHP, XML or API example; every other page of the section shows code.

Missing

  • querying search from code and APIs: Magento\Search\Api\SearchInterface with a requestName, REST GET /V1/search, GraphQL products(search: ...)
  • adding non-attribute data to the product index (additional fields provider, field mapping), custom sort orders, boosting
  • index anatomy: one index per store view, name and alias pattern (<prefix>_product_<store id>_v<n>), how to inspect documents
  • stopwords and stemming per locale (esconfig.xml, stopword CSV files)
  • failure cases: "No alive nodes found in your cluster", read-only index on a full disk, empty results after changing the prefix, an indexer stuck on the search index
  • HTTP auth example for a secured cluster, and what to do on a project that uses a third-party engine

i18n: 20/25

  • Done. Effort: about an hour. A solid guide to text translation (load order, language packages, i18n:collect-phrases and i18n:pack with their traps); it stops at strings, though: locale-aware formatting, translation outside a storefront request and the Mage-OS language tooling are not there, and the title is jargon.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (line 93) "run bin/magento cache:clean translate layout full_page": block_html is absent, so translated text inside cached blocks (menu, footer) stays old and the reader concludes the CSV is not picked up.
  • (lines 222-223) "delete the generated files under pub/static/ and var/view_preprocessed/": no command and no warning to keep pub/static/.htaccess; an assistant will write rm -rf pub/static/* or worse.
  • (lines 75-76) the Hyvä case is two sentences ("hand them to your Alpine.js component, for example in a data- attribute") without an example, while the Luma case gets three code blocks, although the navigation lists Hyvä before Luma.
  • (line 6) title and navigation label "i18n" are an abbreviation; "Translations" says what the page is about and is what people search for.
  • (line 255) the link text "JavaScript in Mage-OS" points to the page the navigation calls "JavaScript in Luma themes".
  • (lines 99-105) the load order is given, but not how to find out which source a displayed text actually came from.
  • (lines 112-113) does not say which language packages Mage-OS 4.0.0 installs (mage-os/language-de_de, es_es, fr_fr, nl_nl, pt_br, zh_hans_cn, en_us are in vendor/) or how complete they are, so the reader cannot tell whether a package is needed at all.

Missing

  • locale-aware formatting of dates, numbers and prices (TimezoneInterface::formatDate(), PriceCurrencyInterface::format()), which the title "i18n" promises
  • translating outside a storefront request: cron, CLI, queue consumers and emails for another store view (store emulation, reloading the translation data)
  • no plural forms and no translation context in __(): how to word phrases around that
  • translating content rather than interface text: store-view-scoped attribute values and CMS content; and what the bundled MageOS_AutomaticTranslation module does (not checked)
  • which locale a REST or GraphQL request is translated in (store code / Store header)
  • debugging an untranslated phrase: whitespace or placeholder mismatch, stale js-translation.json, phrase not literal

database-access-and-orm: 21/25

  • Done. Effort: about an hour. Leads with a decision table, complete typed classes with file paths and explicit rules; what is left are gaps (collection joins, model hooks, EAV attributes, large result sets) and results that are rarely stated.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 23-25) the example table is only summarised by column names and lives on another page (db_schema_xml#example); the unique key on (sku, store_id) that insertOnDuplicate on lines 477-481 and 537-544 depends on is not mentioned here (it does exist in the db_schema_xml example).
  • (lines 291-294, 302-305) save(ItemInterface $item) passes the interface to $this->itemResource->save(), which is typed AbstractModel; works at runtime, fails PHPStan, and the page gives no hint.
  • (line 449) ->where('sku IN (?)', $skus) with an empty array renders sku IN () and fails with an SQL syntax error (doubt, not checked); the sample has no guard for the empty list.
  • (lines 410-412) $rows[] is appended to without being initialised, and productRepository->getList() is presented without its cost (loads full product models with all attributes); a reader will use it for large exports.
  • (lines 474-485, 497-507) fragments use $table, $rows, $storeId without saying where they sit (class, file); every other sample on the page is a full file.
  • (lines 190-200) only filter, sort and page size are shown for collections; nothing on addFieldToSelect(), joins through getSelect(), getFirstItem(), getSize() versus count().
  • (lines 561-567) the data patch notes are good but there is no command or query to confirm the result (SELECT patch_name FROM patch_list WHERE patch_name LIKE 'Vendor%'), and no word on what happens when apply() throws halfway (whether the patch runs inside a transaction, and NonTransactionableInterface for patches that must not; not checked).

Missing

  • adding EAV attributes (product, category, customer) in a data patch with EavSetupFactory; the page explains EAV storage but not the most common EAV task
  • model lifecycle: beforeSave()/afterSave()/afterLoad(), _eventObject, and the list of events _eventPrefix produces
  • iterating large result sets without loading every model (paging a collection, fetchAll versus query() + fetch(), batch size)
  • PatchRevertableInterface and how module:uninstall uses it; patches for a module that is already installed in production
  • failure cases: duplicate key (AlreadyExistsException), deadlocks and retries, a schema change that is not in the whitelist
  • extension attributes and how a repository loads and saves them (only linked)

email-templates: 21/25

  • Done. Effort: a partial rewrite. Accurate and usable for adding, overriding and sending a template (strict mode and the restricted config directive are stated correctly), but it leaves out the mail transport, adding variables to core emails, styling and any way to check that an email was sent.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 136-137, 151-154) the send example reads vendor_module/reminder/email_template and vendor_module/reminder/email_identity, but the config.xml defaults for them are only on the reference page (line 31); copied as is, getConfig() returns '' and sending fails with a template error.
  • (lines 29-31) "As the id, use the configuration path that selects the template with / replaced by _: here vendor_module/reminder/email_template": the rule is hard to parse and the example shows the path, not the resulting id next to it.
  • (lines 33, 99) "Run bin/magento cache:flush" for the XML but "clean the cache (bin/magento cache:clean)" for the theme override; the cache page tells readers to prefer cache:clean.
  • (lines 84-87) strict mode: the rule "Pass the values a template needs as variables" has no how-to for core emails, where the variables are set by core (the email_order_set_template_vars_before event and its transportObject).
  • (lines 122-168) no file path for ReminderSender, no word on the exception a failed send throws (MailException) or that sending is synchronous.
  • (lines 146-161) no way to confirm the result: mail catcher in local environments, the Admin preview, or system/smtp/disable, which silently stops all mail.
  • (lines 61-62) the list of always-available variables omits logo_width, logo_height and template_styles.

Missing

  • mail transport configuration: Stores > Configuration > Advanced > System > Mail Sending Settings (system/smtp/*: transport, host, port, auth), and which mail library 4.0.0 uses underneath (Symfony Mailer instead of laminas-mail, as far as I know; not checked), which matters for modules that replaced the transport
  • adding or changing variables of core emails (order, invoice, shipment) through the email_*_set_template_vars_before events
  • email styling: email.less / email-inline.less, header and footer templates, logo configuration, and what applies in a Hyvä theme
  • asynchronous sales emails (sales_email/general/async_sending and its cron job)
  • attachments, which TransportBuilder does not offer
  • sending from cron or CLI (area and store emulation), and translating emails per store view
  • failure cases: unknown template id, empty sender identity, variables that are objects under strict mode

cli-commands: 22/25

  • Done. Effort: about an hour. Compact, correct command tables plus a complete custom command with DI registration and the proxy rule; it omits the developer commands and the bundled n98-magerun2, and does not flag where 4.0.0 behaves differently from older Magento.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 30-32) "On Valkey or Redis it deletes only the keys with the cache prefix": consistent with the Symfony cache adapter that 4.0.0 uses (Magento\Framework\Cache\Frontend\Adapter\Symfony, namespaced clear()), but the page does not say this is new; with the Cm_Cache_Backend_Redis backend of earlier Magento releases a flush emptied the whole Redis database, so readers and assistants with older knowledge will distrust or misapply it.
  • (line 99) the module:uninstall cell packs two different procedures (Composer module, app/code module) into one table cell; hard to follow and easy to get wrong.
  • (line 110) admin:user:create is listed without the Mage-OS 4.0.0 consequence that a new local Admin user still has to pass MageOS_PasskeyAuth / Magento_TwoFactorAuth; the dependency between those two modules would also be the natural example for "Fails if an enabled module depends on them" on line 98.
  • (lines 224-227) the result of bin/magento vendor:item:disable SHIRT-RED SHIRT-BLUE --dry-run is not shown ("Would disable SHIRT-RED" ...), nor the exit code for the not-found case.
  • (lines 229-232) the area note gives the do-rule (emulateAreaCode()) but not the matching don't-rule: calling State::setAreaCode() in a command constructor or configure() breaks every other command ("Area code is already set").
  • (lines 104-113) "Other everyday commands" has no developer commands at all.

Missing

  • vendor/bin/n98-magerun2, which ships with Mage-OS 4.0.0 (n98/magerun2-dist 10.1.0 is in the non-dev packages of composer.lock): the cron page relies on it, this page never mentions it
  • dev:* commands (dev:query-log:enable, dev:template-hints:enable, dev:di:info, dev:profiler:enable), setup:config:set, setup:db-declaration:generate-whitelist, catalog:images:resize, i18n:collect-phrases
  • commands added by the Mage-OS-only modules, if any (not checked)
  • failure case: when DI configuration or a command constructor is broken, bin/magento lists only a subset of commands or dies before running any; how to find the cause
  • interactive input, --no-interaction, verbosity (-v), progress output, and testing a command with CommandTester
  • exit codes and non-interactive use in deployment scripts

indexers: 22/25

  • Done. Effort: a partial rewrite. Correct and practical on modes, commands, statuses and cron (the */5 changelog job and "new indexers start on schedule" were confirmed in the code), but the custom indexer is a shell around an unshown resource model, and operational failures and cache invalidation are absent.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 153-154, 178, 188) ProductLabelIndex "stands for your own resource model": the hard part of an indexer (rebuilding rows for a list of IDs, a full rebuild in batches without emptying the live table) is exactly what is left out, so the example cannot be completed from this page.
  • (lines 151-211, 216-228) no file path for the two classes (Model/Indexer/ProductLabel.php, Model/Indexer/ProductLabelProcessor.php).
  • (lines 24-25) "it starts in Update by Schedule mode": true for 4.0.0 (Magento\Indexer\Setup\Recurring calls setScheduled(true)), but the page does not say this differs from earlier Magento releases, where new indexers started in Update on Save; assistants trained on older material will assume the opposite.
  • (lines 56-57, 97) suspended: the page shows how to set and lift it, not what happens to the changes collected meanwhile once the status is set back to valid (processed from the changelog, or full reindex needed?).
  • (lines 10-13) the intro lists what is indexed, but the page never lists the indexers of a 4.0.0 installation with their IDs and purpose; indexer:info is the only pointer.
  • (line 116) the example reads "product label index used on category pages", but nothing shows how the storefront reads the index table.

Missing

  • cache invalidation after indexing: Magento\Framework\Indexer\CacheContext::registerEntities() and the clean_cache_by_tags event, without which the full page cache keeps showing old data
  • failure cases: an indexer stuck in working after a killed process, missing triggers after a database import made with --skip-triggers (scheduled indexers silently stop updating) and how to recreate them, a growing *_cl backlog
  • mview_state / indexer_state tables and version_id, for diagnosing the above
  • tuning: MAGE_INDEXER_THREADS_COUNT, batch sizes in di.xml, indexer/use_application_lock in env.php
  • a table of the core indexers in Mage-OS 4.0.0 (ID, what it builds, which storefront feature breaks when it is stale)
  • how to test an indexer

cache-management: 22/25

  • Done. Effort: a partial rewrite. Exact for 4.0.0 (the 16 cache types including compiled_plugins, and the "Varnish is purged only with full_page or no list" rule match the code), but the developer side of the page cache is half covered: tag invalidation is there, cacheable blocks, cache variation and private content are not.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (line 22) block_html is described as "HTML of blocks that set a cache lifetime" and the page never shows how a block does that (cache_lifetime, getCacheKeyInfo(), cache_tags).
  • (lines 194-212) the full-page cache section explains tags and cacheable="false" only; nothing on what must never be in a cached page (customer-specific output), on Magento\Framework\App\Http\Context / the X-Magento-Vary cookie for per-group or per-currency variants, or on the TTL (system/full_page_cache/ttl).
  • (lines 56-57) "With Valkey or Redis, it deletes only the keys of this installation": correct for the Symfony cache adapter of 4.0.0, but not marked as a change; with the Cm_Cache_Backend_Redis backend of earlier Magento releases cache:flush emptied the whole Redis database. Existing knowledge and many deployment scripts assume the old behaviour.
  • (lines 88-133, 162-181) the classes have no file path (Model/ShippingRates.php, Model/Cache/Type.php); only etc/cache.xml gets one.
  • (lines 186-187) bin/magento cache:flush before cache:enable vendor_module uses the big hammer the page itself tells readers to avoid on line 57; cache:clean config would do.
  • (lines 207-208) "One such block makes the whole page uncacheable": no hint how to find the block that does it (search layout XML for cacheable="false"), which is the usual support case.
  • (line 305) related link is labelled "Events" while the page is titled "Events and observers".

Missing

  • making a block cacheable and choosing its cache key and tags
  • public versus private content: customer data sections in Luma, the Hyvä equivalent, and why a cached page must not render customer data
  • cache variation with Http\Context (X-Magento-Vary), and ESI/ttl blocks under Varnish
  • GraphQL caching (@cache(cacheIdentity: ...), the graphql_query_resolver_result type listed in the table)
  • what the move from Zend_Cache to the Symfony adapter in 4.0.0 means for existing code that uses \Zend_Cache::CLEANING_MODE_* or a custom backend (not checked)
  • inspecting the cache: key layout in Valkey, var/cache, and how to tell from the response why a page was not cached

logging: 22/25

  • Done. Effort: about an hour. Short and exact: which file gets what, the debug switch, a custom log file through virtual types with the reason for basing it on Monolog\Logger; no doubts found, only the other log files and query logging are absent.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 67-73) the table stops at system.log, exception.log and debug.log; the files a developer is sent to on a real shop (var/log/cron.log, magento.cron.log, payment.log, shipping.log, support_report.log, the web server and PHP-FPM error logs) are not listed.
  • (lines 16-60, 152-171) no file path for ItemImporter (Model/ItemImporter.php) or WarningHandler (Logger/WarningHandler.php).
  • (line 28) Vendor\Module\Model\ItemImporter here has a different constructor and import() signature than the class of the same name on the events page (line 123 there); two pages define the same example class differently.
  • (lines 148-150) "extend it and set $loggerType, then use your class as the type of the handler virtual type": the changed di.xml line is described but not shown.
  • (line 72) the exception.log cell is one long sentence with two conditions and a redirect rule; hard to parse in a table.
  • (lines 83-84) syslog is one sentence without saying when to use it or how it combines with the files.

Missing

  • database query logging (bin/magento dev:query-log:enable, var/debug/db.log) and the other dev:* diagnostics
  • a list of the remaining log files in var/log/ and what writes them, plus var/report/ retention
  • adding context to every line (Monolog processors, for example a request ID) and JSON output for log shipping
  • sending errors to an external service (Sentry, ELK, New Relic) through an extra handler in di.xml
  • what MageOS_AdminActivityLog records and where, so it is not confused with file logging
  • logging inside tests (asserting on a mocked LoggerInterface)

cron-jobs: 23/25

  • Done. Effort: about an hour. Task-led, exact and checkable (crontab line, stream_isatty behaviour, --exclude-group and magento.cron.<group>.log all confirmed in the 4.0.0 code); only a few adjacent topics are absent.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (line 92) "in the timezone configured for the store (general/locale/timezone)": as far as I know cron expressions are evaluated in the default-scope (Admin) timezone, not per store view (not re-checked in the code); "for the store" invites the wrong reading either way, the scope should be named.
  • (line 58) the class path is written Vendor/Module/Cron/CleanupItems.php; the other pages write paths relative to the module root (Cron/CleanupItems.php) or from app/code/.
  • (lines 158-159) "n98-magerun2, which Mage-OS installs as a dependency": correct (n98/magerun2-dist 10.1.0 is in the non-dev packages of composer.lock, and vendor/bin/n98-magerun2 exists), but the page does not name the package or say that the command is therefore also there on a production install with --no-dev.
  • (lines 113-119) the example group silently copies the values of the core default group; say so, or explain why 60 and 4320 minutes are sensible.
  • (lines 193-199) "Best practices" restates the own-group and <config_path> advice already given above.

Missing

  • the crontab area: jobs run with area code crontab, so etc/crontab/di.xml and etc/crontab/events.xml apply, and a job that renders templates or sends emails must emulate a store (Magento\Store\Model\App\Emulation)
  • group options are configuration values too (system/cron/<group>/<option>, Stores > Configuration > Advanced > System > Cron), so cron_groups.xml is only the default and config:set or the Admin can override it
  • rescheduling or disabling a core or third-party job from your own module
  • running cron on more than one server (run it on one node, which lock provider the job locks use)
  • message queue consumers started by cron (cron_consumers_runner in env.php); mentioned in line 12 and explained nowhere
  • how to test a cron class

events: 23/25

  • Done. Effort: about an hour. Accurate against the 4.0.0 code (FrontController dispatching the controller events and the MageOS_PasskeyAuth observer were checked), with real do and don't rules; the gaps are small: no file path for the observer, a short event table and message queues squeezed into one bullet.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 62-97) the observer's file path (Observer/LogRegistration.php) is never stated, only implied by the namespace, and the page does not say where the log line ends up (var/log/system.log) so the reader can confirm the observer ran.
  • (line 108) "Scalar values and arrays are copies": correct, but the usual way around it (dispatching a DataObject "transport" that observers modify) is not shown, so the reader learns the limit without the pattern.
  • (lines 180-188) "Frequently used events in Mage-OS 4.0.0" has five rows, all customer or order placement; nothing for cart and quote, invoice and shipment, product and category save, or layout events.
  • (lines 215-221) the message queue alternative is compressed into one pitfall bullet naming four XML files, without an example or a link; no page in the navigation explains message queues.
  • (lines 68-69, 115-116) <?php is followed directly by declare(strict_types=1);, while database-access-and-orm, cli-commands and working-with-adminhtml put a blank line between them.

Missing

  • how to list the observers registered for an event on an installation (n98-magerun2 ships with Mage-OS 4.0.0; dev:module:observer:list), instead of only grepping for dispatch(
  • observers are shared instances by default (shared attribute): keep them stateless
  • how often common events fire (for example sales_order_save_after several times per order) and how to guard against repeated runs
  • testing an observer (unit test with a mocked Observer, integration test that dispatches the event)
  • a message queue page to link to

plugins: 23/25

  • Done. Effort: about an hour. The strongest page of the set: exact signatures, a worked execution order, limits, and the Mage-OS-specific compiled interceptors (Creatuity_Interception, customer_dobvalidation_plugin and the dev:di:info area argument all confirmed in the code); it lacks file paths, a verification step and a "plugin does not fire" checklist.
Notes

Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.

Problems

  • (lines 76-94, 110-137, 156-196) none of the three plugin classes has its file path stated (Plugin/NormalizeSubscriberEmail.php ...); only the namespace implies it.
  • (lines 49-51) "Mage-OS compiles the plugin calls into the generated interceptor classes (module Creatuity_Interception)" is the most important Mage-OS difference on the page and sits in a parenthesis: it does not say that stock Magento resolves the plugin list at runtime (so a cache flush was enough there), nor what the compiled interceptor looks like when debugging.
  • (lines 23-35, 139-140, 284-293) the first di.xml declares two of the three example plugins; the declaration for the after plugin comes 150 lines later under "Area-specific plugins", so the after example cannot be followed top to bottom.
  • (lines 73-94) no expected result for any example (for instance: subscribing Foo@Example.com stores foo@example.com), so the reader has no check that the plugin runs other than dev:di:info.
  • (lines 221-222) "Plugins with the same sortOrder have no guaranteed order": says what not to rely on, but not what to do when two third-party plugins collide (re-declare one with a new sortOrder, which line 265 mentions only in passing).

Missing

  • a "my plugin does not run" checklist: wrong area file, stale generated/, type name typo, method not public, object created with new, plugin declared on a virtual type
  • after methods on void methods ($result is null), and methods with by-reference or variadic parameters
  • where the interceptor is generated (generated/code/<Vendor>/<Module>/.../Interceptor.php) and how to step through it
  • plugins declared on an interface, its implementation and a parent class at once: how the lists are inherited and merged
  • performance rules: no plugins on hot methods, cost of around methods
  • plugin classes are shared instances (keep them stateless); testing a plugin

Activity

  1. added
    documentation
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions