Skip to content

History of commits

4473 commits

docs: describe the full gate and bump the documentation submodule

composer check now runs the Twig checks as well, and the guides said less than that. CONTRIBUTING lists what it runs and asks for the assets to be built first, since the functional tests render real pages; AGENTS.md names the Twig checks in the gate; the module guide says a command is tagged console.command and names itself in #[AsCommand]. The submodule brings the page on console commands up to date: how a command is registered, why it is built only when run, and the commands the list was missing.
simba77 23 ოქტ 2026 20:49 Branch: 10.x 624060d

ci: run the same gate as verify.sh

CI ran the coding standard and the two suites, while the local gate also ran PHPStan, the Twig lint and the check of ide-twig.json. A change pushed without the local gate could break static analysis or a template and still pass. composer check is now the one list of checks: cs-check, phpstan, test, twig-lint and twig-ide-check. verify.sh runs it inside the container and CI runs it directly, so the two cannot drift apart. The three jobs become one that builds the assets and runs that list; -v names every step before it runs. Node CI is gone: the job builds the assets on every push and pull request. PHPUnit runs with memory_limit=512M. Both suites now share one process in CI, and with cold caches their peak sits just under the 128M most php.ini files default to — a fresh checkout died where a warm one passed.
simba77 23 ოქტ 2026 20:46 Branch: 10.x 35d12bb

fix(database): exit with a failure status when the connection fails

The factory of the connection printed its error with die(), and a string given to die() ends the process with status 0. A console command or a cron job that lost its database reported success, and so did a PHPUnit run: a test reaching for the connection where there is none cut the run short, the tests after it never ran, and the pipeline stayed green. The message is printed as before, and the process exits with status 1.
simba77 23 ოქტ 2026 20:46 Branch: 10.x 343a3cf

fix(console): build a command only when it is run

The console built every command on start, and every command built whatever it depends on. One of them reaches the schema builder, which connects to the database, so without a database no command worked at all: twig:lint, cache:clear and even list answered with "Error connecting to the database server". Commands are now collected by AddConsoleCommandPass of symfony/console. It reads the name and the description of #[AsCommand] at compile time and hands the application a loader of lazy commands, so listing them builds nothing and running one builds that one alone. A command that names itself in configure() cannot be listed unbuilt and is still built on every start. The tag of commands becomes the one of Symfony, console.command, in place of johncms.console_command. A module whose commands are autoconfigured has nothing to change.
simba77 23 ოქტ 2026 20:46 Branch: 10.x e9515cf

refactor(forum): move the screens of the panel into the forum module

The panel held the whole forum section: the dashboard, the structure editor, the settings and the lists of hidden topics and posts. They belong to the module they administer, and now live in it. Controllers move to Application/Controllers/Admin/ and their templates to templates/admin/, the way collections, contacts and consent already ship their sections. The repositories lose the Eloquent prefix that nothing else in that directory carries: ForumAdminRepository, ForumStructureRepository, HiddenForumRepository. The routes move with them. URLs and route names are unchanged, and so are the gates: the group is behind AdminAccessMiddleware, the settings behind SuperAdminAccessMiddleware, both marked adminArea(). Two permissions change their key along with their group: admin.forum.structure.destroy -> forum.structure.destroy admin.forum.hidden.purge -> forum.hidden.purge Neither is granted to a role by default, but a site that handed one out by hand has to hand it out again. The routes now belong to the forum, so the pages resolve __() against its domain. Seventy strings move from the admin domain to the forum one, with their translations, across all 23 languages. What stays in the panel is not a forum screen: the dashboard tile counting today's posts and the read marks dropped when inactive accounts are cleaned up. Moving those needs an extension point the CMS does not have yet.
simba77 12 სექ 2026 18:57 Branch: 10.x 0bf86e8

fix(modules): do not enable a module whose installation failed

The record of a module was written before its migrations ran and never taken back when they failed. A migration that stopped halfway — a typo in the schema, a timeout on a modest host — left the module recorded as installed and switched on, and the cache invalidation at the end of the operation meant the next request compiled a container with its services and its routes in it, over half a schema. Installing again was refused with "already installed", so the only way out was an uninstall the administrator had to think of on their own, from a site that might no longer answer. The record still has to come first: a module's migrations are found through it, so without one the migrator has no directory to run. What it now carries is that the installation was begun and did not finish. Such a module is not loaded — the registry gives it a state of its own — while its migrations stay a source, which is what lets the job be finished by installing again. The mark comes off once the installer of the module has returned; a failure after that, in the assets or the demo data, leaves a working module and a failed step, which is what those are worth. Switching such a module on, off or updating it is refused. Uninstalling is not: it is the way out when installing again cannot help. The field is written only while it stands, so the state file of a site where nothing ever failed reads as it did before, and a file from an earlier release is read as "nothing was interrupted".
simba77 30 აგვ 2026 21:03 Branch: 10.x 24d4cb5

fix(modules): protect the names the core holds

The alias of a module was checked against other modules and against nothing else, but an alias is a key in several registries at once and not every holder is a module. The CMS answers to "system" as a source of migrations and as the domain its strings are written in; the theme engine answers to "theme" as a namespace of templates. Both were free to take. Taking "system" was the dangerous one. MigrationLocator collected sources without looking for duplicates, so the module and the core ended up behind one name, locate() returned both directories, and uninstalling that module with --purge would have rolled back the schema of the site. Nothing stopped it but an accident: none of the three core migrations has a down(), so the purge was refused before it began — and would stop being refused the day one gets one. The names are declared by whoever holds them — a constant of the migration source, of the template registry, of the translator — and assembled by ModuleRegistryFactory, which is where the registry is put together. So the list shrinks by itself as the core moves into modules, instead of being a hand-kept blacklist that rots on the first move. "admin" is deliberately not on it: @admin is the templates of the theme and of the admin module merged on purpose, the name is held by that module, and the check between modules already covers it. The registry marks such a module broken and keeps the site running, the way it does for an alias another module holds; installing refuses with the same sentence. And the reason it mattered is closed on its own terms: two sources of migrations may no longer answer to one name, whoever declared them.
simba77 30 აგვ 2026 20:59 Branch: 10.x dac61de

fix(container): autoconfigure the remaining extension points

Ten extension points were applied by registerForAutoconfiguration(), and the docblock there explains why: an instanceof rule of a services file reaches the services declared in that same file, so a module would have to repeat it and one that forgot would compile fine and never be asked anything. Five points were still registered the way the docblock warns about. They join the rest now: a console command, a sitemap provider, a Twig extension, a validation rule factory and a service the kernel clears between requests. The last was the one that mattered — a stateful service of a module was never reset, which an FPM process hides and a worker runtime turns into one visitor's data shown to another. Two services opt out. The console application implements ResetInterface, and tagging it would build the whole CLI application on every HTTP request; it was kept out by standing above the instanceof rule, which autoconfiguration makes meaningless. MailExtension belongs to the mail environment alone, and every Twig extension is now tagged for the web one. The manual registrations they replace are gone: five of the six modules carrying the instanceof rule for commands had no command at all, and the sixth would have lost its own the day somebody tidied the line away.
simba77 28 აგვ 2026 22:40 Branch: 10.x 6f595d4

chore(modules): drop the code nothing calls

Two pieces were written, documented and never wired to anything. ModuleDependencyGraph::installationOrder() sorts modules topologically, but services, routes and templates are loaded in the alphabetical order the registry returns. Giving the loading an order that expresses dependencies is a decision of its own, with consequences for route precedence; until it is taken, the method is untested against real data and is better read out of the history. ComposerHooks::note() wrote data/tmp/modules-pending.json, which nothing ever read. Its docblock promised the admin panel told a module installed by Composer from one dropped in by hand — the panel lists what is on disk and knows nothing of the file. The message in the terminal, which is the useful half of the hook, stays.
simba77 28 აგვ 2026 22:33 Branch: 10.x 87d87b7