Skip to content

History of commits

4473 commits

chore(i18n): drop the strings of the system only Counters used

"Unread" and "Last activity" belonged to the link Counters built for the unread topics of the forum, which is gone. The template of the forum follows the lines of the controllers that now count the unread topics through the forum itself.
simba77 24 oct. 2026 1:35 Branch: 10.x 9360cc5

refactor(homepage): let the modules supply the blocks of the home page

The home page picked the latest news itself and drew them itself, so homepage depended on the news without declaring it — the last module that did. A module now puts a block on the home page through HomepageBlockProviderInterface, an extension point of the core: a template of its own and the data for it. HomepageBlocks collects the blocks of the switched-on modules, the lighter higher, and the home page includes them. The latest news become a block of the news module, with its own template and the settings it always had. The characterization tests of the block pass unchanged. The baseline has no dependency of the core on a module or of a module on another it does not require left, and loses a call to a scope PHPStan could not see.
simba77 24 oct. 2026 1:34 Branch: 10.x 17d06d9

refactor(core): take what Counters knew of the modules out of it

With the sections of the menu and the notifications declared by their modules, most of Counters had nobody to call it: the counters of the forum, the guestbook, the downloads, the library and the albums, the news that were always zero, and the forum(), downloads(), library(), album() and mail() of an older time. They are gone, and with them the permissions of five modules the core used to name. The pages of the forum asked Counters for the unread topics through the container. UnreadTopicsCounter of the forum counts them now, for those pages, for the line of the menu and for the notification, which counted them twice over. What remains of Counters is the visitors online, the members and the scripts of the analytics. The core depends on no module any more, and the five entries of the baseline that said otherwise are gone.
simba77 23 oct. 2026 22:52 Branch: 10.x 3ebc7ad

refactor(menu): let every module declare its section of the main menu

The main menu of the theme and the tiles of the home page listed the sections by hand — the news, the forum, the guestbook, the downloads, the library, the members, the albums — linking to a module even when it was switched off, and Counters, a class of the core, counted what was new in each. The theme and the core knew every module that ships with the CMS. Every module now declares its own line through MenuItemProviderInterface, with a counter of what is new in it: unread topics of the forum, the entries of the last day in the guestbook, new files, articles and photos, the members who joined today. The panel and the chat of the administration go into the part of the staff. The menu and the tiles draw what the switched-on modules declare, and menu_counters(), the function of the templates that fed them, is gone. The guestbook and the album gain the counts their lines need in their repositories. The characterization tests keep every badge as it was. Two things change on purpose: the home page has a tile for every section of the menu, the albums, the help and the contacts among them, and the news are counted in the menu for the same days as on the tile. The labels move from the domain of the system to the domains of their modules, with their translations where a module had none.
simba77 23 oct. 2026 22:50 Branch: 10.x cececda

feat(menu): give a line of a menu a badge and the staff a part of the main menu

A module could put a line into a menu, but not say what was new behind it, and the part of the main menu kept for the staff was written into the theme. Only the theme could have a badge or a red line under the separator. MenuItem takes a counter, a closure called when the template asks for the badge, so collecting a menu counts nothing and a page without a menu pays for nothing. MenuArea::Staff is the part of the main menu for the staff, drawn by the theme apart and red, its badge a bare number like the one of the chat of the administration.
simba77 23 oct. 2026 22:45 Branch: 10.x d037b42

test(menu): record the sections of the main menu and the tiles of the home page

Which sections a guest and the staff are shown, where they lead, and the badge with what is new in each: unread topics of the forum, the entries of the last day in the guestbook and in the chat of the administration, new files, articles and photos, the members who joined today. The menu has no badge for the news while the tile of the home page has, and the tiles are six of the sections. Pinned before the modules declare their own lines of the menu.
simba77 23 oct. 2026 22:43 Branch: 10.x 23bfb62

fix(news): list an article without a lead, votes or views in debug mode

Twig reads an attribute of a model by asking isset() first, and Eloquent says a column holding null is not set. Twig then calls the attribute as a method, the model forwards the call to its query, and the query throws. With strict_variables on — which is what debug mode turns on — the exception reaches the page: the home page and the list of the news answered 500 for an article nobody had voted for, written a lead to or opened yet, which is most of them. |default does not help, since Twig asks the same way before it falls back. The lead is empty markup instead of null, the home page prints the rating the news already counts for their own list, and the number of views of an article nobody opened is 0.
simba77 23 oct. 2026 22:42 Branch: 10.x d9a78e1

test(functional): keep the cache of the suite in memory and empty it before every test

The suite used the filesystem cache of the site, data/cache/app — the one the stand serves its pages from. Counts cached against the database of a test showed on the site for minutes, what the site cached answered the tests, and nothing a test counted was forgotten by the next one. The harness now switches the pool to the memory driver, meant for tests, before anything builds it, and empties it in setUp like the transaction it rolls back.
simba77 23 oct. 2026 22:38 Branch: 10.x b878bd3