dustin10 / VichUploaderBundle

A simple Symfony bundle to ease file uploads with ORM entities and ODM documents.
MIT License
1.83k stars 519 forks source link

Namer is required in configuration from 2.2 to 2.3 #1423

Closed jannes-io closed 6 months ago

jannes-io commented 7 months ago

BC Break Report

Q A
BC Break yes
Version 2.3.0

Summary

https://github.com/dustin10/VichUploaderBundle/pull/1404/files

Previous behavior

vich_uploader.mappings.namer used to be addDefaultsIfNotSet, and thus not required.

Current behavior

vich_uploader.mappings.namer is now isRequired, and thus prevents extension to be loaded if namer isn't set.

How to reproduce

Install bundle version 2.2, set up config like:

vich_uploader:
  db_driver: orm
  storage: flysystem
  metadata:
    type: attribute
  mappings:
    uploads:
      upload_destination: some.storage
      uri_prefix: '%env(CDN_URL)%/uploads'

Now update to version 2.3, container building results in:

Uncaught Symfony\Component\Config\Definition\Exception\InvalidConfigurationException: The child config "namer" under "vich_uploader.mappings.uploads" must be configured. in /project/vendor/symfony/config/Definition/ArrayNode.php:226

Minor tags should not introduce BC breaks.

garak commented 7 months ago

@jannes-io could you please check if the proposed PR fixes the issue on your side? Thanks

jannes-io commented 7 months ago

Hi @garak ,

Yes that seems to do it.

Thanks!