Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

namer is not optional any more #1403

Closed
oleg-andreyev opened this issue Sep 27, 2023 · 1 comment · Fixed by #1404
Closed

namer is not optional any more #1403

oleg-andreyev opened this issue Sep 27, 2023 · 1 comment · Fixed by #1404

Comments

@oleg-andreyev
Copy link
Contributor

Bug Report

Q A
BC Break no
Bundle version 2.2.0
Symfony version 6.3.x
PHP version 8.1.x

Summary

Done upgrade from 1.23.1 to 2.2.0.
We're getting A namer must be configured.

After searching the code found that \Vich\UploaderBundle\Mapping\PropertyMapping::getUploadName is now throwing exception if namer is not configured.
Based on diff
image

There was a warning but for some reason it was not tracked.
But anyway namer should be a required field so that Symfony Cache won't build.

Current behavior

namer is optional in configs.

Expected behavior

namer is not optional in configs and container complications failes.

@garak
Copy link
Collaborator

garak commented Sep 27, 2023

It seems that we're missing a call to isRequired inside our Configuration class.
Do you mind opening a PR to fix it?

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 a pull request may close this issue.

2 participants