<?php

namespace OpenClassrooms\Bundle\OneSkyBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
 * @author Romain Kuzniak <romain.kuzniak@openclassrooms.com>
 */
class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritdoc}
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('openclassrooms_onesky');
        $rootNode->children()
            ->scalarNode('api_key')->isRequired()->cannotBeEmpty()->end()
            ->scalarNode('api_secret')->isRequired()->cannotBeEmpty()->end()
            ->scalarNode('project_id')->isRequired()->cannotBeEmpty()->end()
            ->scalarNode('file_format')->cannotBeEmpty()->defaultValue('xliff')->end()
            ->scalarNode('source_locale')->cannotBeEmpty()->defaultValue('en')->end()
            ->arrayNode('locales')->isRequired()->cannotBeEmpty()->prototype('scalar')->end()->end()
            ->arrayNode('file_paths')->isRequired()->cannotBeEmpty()->prototype('scalar')->end()->end()
            ->scalarNode('keep_all_strings')->cannotBeEmpty()->defaultValue(true)->end()
            ->end();

        return $treeBuilder;
    }
}

<?php

namespace OpenClassrooms\Bundle\OneSkyBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
 * @author Romain Kuzniak <romain.kuzniak@openclassrooms.com>
 */
class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritdoc}
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('openclassrooms_onesky');
        $rootNode->children()
            ->scalarNode('api_key')->isRequired()->cannotBeEmpty()->end()
            ->scalarNode('api_secret')->isRequired()->cannotBeEmpty()->end()
            ->scalarNode('project_id')->isRequired()->cannotBeEmpty()->end()
            ->scalarNode('file_format')->cannotBeEmpty()->defaultValue('xliff')->end()
            ->scalarNode('source_locale')->cannotBeEmpty()->defaultValue('en')->end()
            ->arrayNode('locales')->requiresAtLeastOneElement()->cannotBeEmpty()->prototype('scalar')->end()->end()
            ->arrayNode('file_paths')->requiresAtLeastOneElement()->cannotBeEmpty()->prototype('scalar')->end()->end()
            ->scalarNode('keep_all_strings')->cannotBeEmpty()->defaultValue(true)->end()
            ->end();

        return $treeBuilder;
    }
}

Use requiresAtLeastOneElement() instead of cannotBeEmpty()
Use requiresAtLeastOneElement() instead of cannotBeEmpty()

Symfony deprecation
https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php#L428