Repository navigation
Rewrite the backend development pages - #112
Open
DavidLambauer wants to merge 4 commits into
Open
DavidLambauer wants to merge 4 commits into
DavidLambauer wants to merge 4 commits into
Conversation
- Database access and ORM: every SQL sample queried columns that don't exist (catalog_product_entity has no name or price; products are EAV), and the ORM part used the ObjectManager and the deprecated save()/load(). Show a model, resource model, collection and repository for one entity, SQL with bound values against real tables, transactions and a data patch. - Working with Adminhtml: replace the deprecated grid and form container blocks with admin routes, controllers with ADMIN_RESOURCE, acl.xml, menu.xml, system.xml, form keys and UI component grids. The old controller never checked its ACL resource. - CLI commands: correct cache:clean vs cache:flush and the commands that lacked arguments, and show how to write and register your own command on Symfony Console 7.4. - Logging: which file gets which levels, and a custom log file with virtual types instead of generic logging theory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Events and observers: one page instead of two near-copies. The old pages re-dispatched customer_register_success (running every observer twice), called getName() on a customer, and used a sequence attribute that events.xsd doesn't have. Use real 4.0.0 events and the data they pass. - Plugins: the around plugin dropped arguments, so two-argument methods threw ArgumentCountError. Add the execution order as the interceptor implements it, disabling, area di.xml and what can't be intercepted. - Cron jobs: there is no cron:status command, the XML pointed to a class the page didn't define, and a custom group never runs unless cron_groups.xml declares it. - Indexers: indexer.xml used elements the schema rejects and set-mode used a mode that doesn't exist. Document every indexer:* command of 4.0.0, mview.xml and a custom indexer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cache management: there is no --type option, page_cache, metadata
and customer aren't cache types, Tag\Resolver has no invalidate(),
and objects were cached without serializing them. List the 15 cache
types of 4.0.0 and show CacheInterface with a serializer and tags,
a custom cache type and full-page cache invalidation.
- Search: OpenSearch is the default engine, not Elasticsearch, and
the page invented classes and an invalid search_request.xml. Cover
the connection settings, the attribute settings that decide what is
searchable, search terms, synonyms and reindexing.
- Email templates: declare templates in email_templates.xml, use the
directives 4.0.0 supports ({{for x in y}}...{{/for}}), override core
templates from vendor/mage-os in a theme, and send mail with
TransportBuilder.
- i18n: add collect-phrases and pack, language packages, JavaScript
translations and the order in which translations override each other.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every sample module, command, cron run, changelog, Varnish purge and email on these pages was run against a Mage-OS 4.0.0 store. Corrections: - Plugins: Mage-OS compiles plugins into generated code (creatuity/magento2-interceptors), so new plugins only run after generated/ is cleared. dev:di:info also lists disabled plugins. - Logging: a logger based on Magento\Framework\Logger\Monolog inherits the core handlers and writes to system.log too; the sample now uses Monolog\Logger. - Adminhtml: a POST without a form key redirects silently; menu entries also need the parent's ACL resource; refused roles get 403. - CLI: cache:flush only deletes this store's keys, config:set cleans the config cache itself, module:uninstall --non-composer only reverts data patches. - Cache: 16 cache types, including compiled_plugins. - Search: synonyms need a catalogsearch_fulltext reindex. - i18n: CSV changes need cache:clean translate layout full_page; i18n:pack keeps only the last of duplicate translations. - Email: strict mode never calls getters such as getCustomerName(). - Cron and indexers: separate-process groups, realtime mode marking an indexer invalid, and updated_at-only changes not reaching the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 30, 2026
Open
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.
Rewrites the remaining Backend Development pages against the Mage-OS 4.0.0 code. There is one commit per group.
Database, admin, CLI, logging
catalog_product_entityhas nonameorprice). The page now covers a model, resource model, collection and repository, SQL with bound values against real tables, transactions and a data patch. The ObjectManager and the deprecatedsave()/load()are gone.ADMIN_RESOURCE, ACL, menu,system.xml, form keys and UI component grids. The old controller never checked its ACL resource.cache:clean/cache:flushsemantics and the commands with missing arguments are corrected. It also shows how to write and register a command on Symfony Console 7.4.di.xmlvirtual types.Events, plugins, cron, indexers
observersmerged intoevents): the old pagescustomer_register_successagain, so every observer ran twice;getName()on a customer;sequenceattribute thatevents.xsddoesn't have.ArgumentCountError.cron:statusdoesn't exist; the page now queriescron_scheduleinstead.cron_groups.xml.indexer.xmlsample used invalid elements, andset-modeused a mode that doesn't exist.indexer:*commands,mview.xmland a custom indexer.Cache, search, email, i18n
--typeoption that doesn't exist, listed cache types that don't exist, and stored objects without serializing them. The page now lists the 16 real cache types (includingcompiled_plugins) and covers tags, a custom cache type and FPC invalidation.search_request.xmlare gone.email_templates.xml, the directives that exist in 4.0.0, theme overrides fromvendor/mage-os, andTransportBuilder.i18n:collect-phrases/i18n:pack, language packages, JavaScript translations and override order.All XML samples validate against the 4.0.0 XSD files, and all PHP samples pass
php -lon PHP 8.4. Every sample and command was then run on a Mage-OS 4.0.0 store (Warden), and the pages were corrected where the behavior differed. The XML samples use the same module, ids and ACL resources as the reference pages in #109.Follow-up once #109 is merged: link
crontab_xmlfrom the cron jobs page. It isn't linked yet, because that slug only exists after #109.Merge mage-os/devdocs-website#74 first: this pull request removes pages, and until that change is live the website answers a request for a removed page with a 500. #151 adds the redirects to the pages that replace them.
Merge order and notes for reviewers: #115.
🤖 Generated with Claude Code