liip / LiipImagineBundle

Symfony Bundle to assist in image manipulation using the imagine library
http://liip.ch
MIT License
1.66k stars 378 forks source link

Support PHP Configuration #1502

Open arjanfrans opened 1 year ago

arjanfrans commented 1 year ago

Is your feature request related to a problem? Please describe. I prefer to use a PHP configuration instead of YAML. This doesn't seem to be fully supported.

Describe the solution you'd like Fix the defintion of the configuration so that it will generate the correct PHP Configuration definitions for Symfony.

Additional context This is the class that it generates. As you can see, it only allows an empty configuration. I can not set any options under filters in my filter_sets

<?php

namespace Symfony\Config\LiipImagine\FilterSetConfig;

use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;

/**
 * This class is automatically generated to help in creating a config.
 */
class FilterConfig 
{

    public function __construct(array $value = [])
    {
        if ([] !== $value) {
            throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
        }
    }

    public function toArray(): array
    {
        $output = [];

        return $output;
    }

}
dbu commented 1 year ago

agreed that we should support php configuration. i don't have time currently to look into it, but happy to review a pull request.