Issue #3619711: Re-apply the user form display components the install profile overrides, and stop the tests depending on its front page
Closes #3619711
Two unrelated causes made phpunit (next major) fail with 8 failures across 6 classes. Both are core changes between dev-main 2ae8840 (last green, 19 Aug) and dev-main eb6b6fd.
The user form display, and a real defect
domain_install() places field_domain_admin on user.user.default, and domain_access does the same for field_domain_access and field_domain_access_all. An install profile is installed after the modules it ships with (install_profile_modules() runs before install_install_profile()), and profile configuration overrides module configuration, so the profile's own copy of that display replaces theirs and core files the fields under hidden. Nothing is logged, because both call sites bailed silently on a missing display.
This is not test-only: any site installing domain alongside an install profile loses those fields from the user form, on every core version. Core #3614825 only changed BrowserTestBase to install static::$modules through the profile path, which is what finally made CI walk into it.
getFormDisplay()replaces theis_null()/instanceofbails, so a profile that ships no display is handled instead of silently skipped.hook_modules_installed()re-applies the components, guarded byInstallerKernel::installationAttempted()so it only runs while the site is being installed and never overrides an admin who hid the field later.- The placement moved out of the procedural
_domain_configure_field()intoDomainEntityHooks::configureUserFormDisplay().
The install profile's front page
Core #3590882 moved the Standard front page to /admin/welcome, which requires "access administration pages", so anonymous requests to a domain root answer 403. It also dropped Olivero, and Claro places no main menu block. A createFrontPageNode() helper gives the affected tests a published node to land on, the menu test places the block it asserts on, and DomainConfigHomepageTest no longer relies on /node — core renamed that view and ships the replacement disabled, so it was a 404 and the assertion was comparing two identical missing pages.
Result
phpunit and phpunit (next major) both 0 failures, both phpstan lanes and every lint job green (pipeline 939845). The 11.4 lane was green throughout and stays green.
The production half applies to 3.x, 3.0.x and 2.0.x as well; they carry the same guard. Backports are not in this merge request.