Page MenuHomePhabricator

Merge EntityPrefetcher and EntityMetaDataAccessor
Closed, DeclinedPublic

Description

It looks like most places we use an EntityMetaDataAccessor in place of an EntityPrefetcher.

We could consider merging these to simplify code.

Example from Per RepositoryWiring:

'EntityPrefetcher' => function (
		PerRepositoryServiceContainer $services,
		GenericServices $genericServices
	) {
		$prefetcher = $services->getService( 'WikiPageEntityMetaDataAccessor' );

		Assert::postcondition(
			$prefetcher instanceof EntityPrefetcher,
			'The WikiPageEntityMetaDataAccessor service is expected to implement EntityPrefetcher interface.'
		);

		return $prefetcher;
	},

Event Timeline

Addshore triaged this task as Medium priority.Feb 20 2019, 6:10 PM
Addshore subscribed.

The perfecter concept is still a bit messy, but I'm going to push this for future us to deal with in possibly a different way.

I don't think merging these 2 things is the right way forward looking at this now.