for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the bugloos/api-versioning-bundle project.
* (c) Bugloos <https://bugloos.com/>
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Bugloos\ApiVersioningBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
* @author Mojtaba Gheytasi <[email protected]>
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder(): TreeBuilder
$treeBuilder = new TreeBuilder('bugloos_api_versioning');
$rootNode = $treeBuilder->getRootNode();
$rootNode
->children()
->scalarNode('base_version')
->defaultValue('v1.0')
->end()
->arrayNode('next_versions')
->scalarPrototype()
->defaultValue([])
->arrayNode('deleted_routes')
->variablePrototype()
->end();
return $treeBuilder;
}