Skip to content

mark asset mapper factory service template abstract like the other services#1649

Merged
dbu merged 1 commit into2.xfrom
service-abstract
Jan 6, 2026
Merged

mark asset mapper factory service template abstract like the other services#1649
dbu merged 1 commit into2.xfrom
service-abstract

Conversation

@dbu
Copy link
Copy Markdown
Member

@dbu dbu commented Jan 6, 2026

Q A
Branch? 2.x
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fix #1648
License MIT
Doc -

As per #1648 service must be abstract.
Also aligning some other settings like defining it private.

])
->tag('liip_imagine.binary.locator', ['shared' => false]);
$services->set('liip_imagine.binary.locator.asset_mapper', AssetMapperLocator::class)
->share(true)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the default

$services->set('liip_imagine.binary.locator.asset_mapper', AssetMapperLocator::class)
->share(true)
->public()
->abstract()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bugfix

->share(true)
->public()
->abstract()
->private()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

service should be private, not public

'', // will be injected by AssetMapperLoaderFactory
])
->tag('liip_imagine.binary.locator', ['shared' => false]);
->tag('liip_imagine.binary.locator', ['shared' => true]);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my understanding, the assetmapper is sort of a singleton, and we have no state, so sharing this service seems fine.

@dbu dbu force-pushed the service-abstract branch from 25e12c1 to 7abbd9c Compare January 6, 2026 08:17
@coveralls
Copy link
Copy Markdown

coveralls commented Jan 6, 2026

Coverage Status

coverage: 79.645%. remained the same
when pulling 7abbd9c on service-abstract
into 66cb2e1 on 2.x.

@dbu
Copy link
Copy Markdown
Member Author

dbu commented Jan 6, 2026

@tito10047 can you please check if these changes break nothing with your setup using the asset mapper, and if all changes make sense for you?
@dmaicher can you confirm the error you see is fixed?

Copy link
Copy Markdown
Contributor

@dmaicher dmaicher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍 I can confirm the issue is resolved with those changes

@dbu dbu merged commit 4b410f0 into 2.x Jan 6, 2026
21 checks passed
@dbu dbu deleted the service-abstract branch January 6, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2.17.0 causes container lint errors

3 participants