- Issue created by @alexpott
- Merge request !6202Make MissingContentEvent extend from ConfigImporterEvent β (Closed) created by alexpott
- Status changed to Needs review
11 months ago 3:17pm 16 January 2024 - π«π·France andypost
I think we can thread it as a bug because the event is not really migrate event
- π¬π§United Kingdom alexpott πͺπΊπ
@andypost what does Migrate have to do with it?
- π«π·France andypost
Sorry, I mean config import event
-class MissingContentEvent extends Event { +class MissingContentEvent extends ConfigImporterEvent {
- π¬π§United Kingdom alexpott πͺπΊπ
But it is a Config import event - is only triggered by the ConfigImporter - see the constructor...
/** * Constructs a configuration import missing content event object. * * @param array $missing_content * Missing content information. */ public function __construct(array $missing_content) { $this->missingContent = $missing_content; }
- Status changed to RTBC
11 months ago 9:49pm 22 January 2024 - πΊπΈUnited States smustgrave
Ran locally and got
Testing /var/www/html/web/core/tests/Drupal/KernelTests/Core/Config Error : Call to undefined method Drupal\Core\Config\Importer\MissingContentEvent::getConfigImporter()
To show the test-coverage. Couldn't run the test-only feature here.
Test of code change appears fine though and didn't appear to break anything.
- π¬π§United Kingdom longwave UK
Was on the fence about backporting this as it adds a tiny bit of API but this seems unlikely to be unused outside of the ConfigImporter and if backporting allows us to unblock contrib then let's do that.
Committed and pushed eafa856443 to 11.x and 476e65a1e1 to 10.2.x. Thanks!
-
longwave β
committed 476e65a1 on 10.2.x
Issue #3414993 by alexpott: Add ConfigImporter to \Drupal\Core\Config\...
-
longwave β
committed 476e65a1 on 10.2.x
-
longwave β
committed eafa8564 on 11.x
Issue #3414993 by alexpott: Add ConfigImporter to \Drupal\Core\Config\...
-
longwave β
committed eafa8564 on 11.x
- Status changed to Fixed
10 months ago 1:47pm 18 February 2024 - π«π·France andypost
Thank you a lot, it is great help for default content!
- π©πͺGermany jurgenhaas Gottmadingen
Hmm, we're using the MissingContentEvent in our unit tests for ECA and they're now failing. Should we add the config importer argument in our tests and ignore the warning about too many arguments in earlier core versions?
- π¬π§United Kingdom longwave UK
Whoops, I thought I searched contrib and found no uses, maybe an error on my part. Happy to revert and rework it if that solves the issue.
- π©πͺGermany jurgenhaas Gottmadingen
Not sure if it's worth it, don't want to hold back some otherwise unblocking improvements. We're "only" using this is a unit test, and could just add that second argument there. It shouldn't break anything for users, I suspect.
-
longwave β
committed 4f22397c on 10.2.x
Revert "Issue #3414993 by alexpott: Add ConfigImporter to \Drupal\Core\...
-
longwave β
committed 4f22397c on 10.2.x
-
longwave β
committed 5b72d300 on 10.3.x
Revert "Issue #3414993 by alexpott: Add ConfigImporter to \Drupal\Core\...
-
longwave β
committed 5b72d300 on 10.3.x
-
longwave β
committed f6ea946e on 11.x
Revert "Issue #3414993 by alexpott: Add ConfigImporter to \Drupal\Core\...
-
longwave β
committed f6ea946e on 11.x
- Status changed to Needs work
10 months ago 3:40pm 21 February 2024 - π¬π§United Kingdom longwave UK
Looking at it again, decided to revert; let's add a default value for that new argument so existing callers don't break.