media-bundle
media-bundle copied to clipboard
Improve error handling
Examples:
- the upload service uses a media root path. If it does not exist the upload of an image will fail because the parent can not be found.
- the
cmf_create.persistence.phpcr.image.basepath
andcmf_media.persistence.phpcr.media_basepath
can mismatch, we should check that these are indepent and have no relation. However media-bundle services that get different root paths injected can also cause an issue. See https://github.com/symfony-cmf/symfony-cmf/issues/186
When and where to throw an error to notify the developer of this?
Maybe validate the configuration, so the developer directly knows if the configuration is not correct. Or do some extra checks in the constructor of some services?
not sure if there can not be use cases where people have different default paths, and extra services - so simply considering this an error sounds not good.