diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..0f44e37
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,21 @@
+name: CI
+
+on: [push]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.5'
+ coverage: none
+
+ - name: Install dependencies
+ uses: ramsey/composer-install@v3
+
+ - name: Run tests
+ run: make test
diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php
index 0baa5a3..d782eef 100644
--- a/.php-cs-fixer.dist.php
+++ b/.php-cs-fixer.dist.php
@@ -86,6 +86,7 @@
'vendor',
'Tests/Fixtures/TestProject/var',
])
+ ->notPath('Tests/Fixtures/TestProject/config/reference.php')
->in(__DIR__)
)
;
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 30fb002..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-language: php
-
-php: 7.4
-
-before_script:
- - phpenv config-rm xdebug.ini
- - composer install
-
-script:
- - make test
diff --git a/Controller/Demo/Helper/NestedCollectionType.php b/Controller/Demo/Helper/NestedCollectionType.php
index 3e27f55..a9d012f 100644
--- a/Controller/Demo/Helper/NestedCollectionType.php
+++ b/Controller/Demo/Helper/NestedCollectionType.php
@@ -9,7 +9,7 @@
class NestedCollectionType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TextType::class)
diff --git a/Controller/Demo/Helper/TestingType.php b/Controller/Demo/Helper/TestingType.php
index 0c1623d..b0ee4c1 100644
--- a/Controller/Demo/Helper/TestingType.php
+++ b/Controller/Demo/Helper/TestingType.php
@@ -35,7 +35,7 @@
class TestingType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$imaticFormBundle = \class_exists(ImaticFormBundle::class);
diff --git a/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php
index 3595141..83f399f 100644
--- a/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php
+++ b/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php
@@ -18,7 +18,7 @@ class AddExpressionLanguageProvidersPass implements CompilerPassInterface
*
* @SuppressWarnings(PHPMD.UnusedLocalVariables)
*/
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$definition = $container->findDefinition(ExpressionLanguage::class);
diff --git a/DependencyInjection/Compiler/FormatterPass.php b/DependencyInjection/Compiler/FormatterPass.php
index 34f9e40..bdd3423 100644
--- a/DependencyInjection/Compiler/FormatterPass.php
+++ b/DependencyInjection/Compiler/FormatterPass.php
@@ -10,7 +10,7 @@
class FormatterPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$tagOptionsResolver = $this->getTagOptionsResolver();
$formatterDef = $container->findDefinition(FormatHelper::class);
diff --git a/DependencyInjection/Compiler/MenuPass.php b/DependencyInjection/Compiler/MenuPass.php
index e91d150..f3bfb48 100644
--- a/DependencyInjection/Compiler/MenuPass.php
+++ b/DependencyInjection/Compiler/MenuPass.php
@@ -7,7 +7,7 @@
class MenuPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$definition = $container->getDefinition(ContainerProvider::class);
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index 4654722..c4ce0f7 100755
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -11,7 +11,7 @@
*/
class Configuration implements ConfigurationInterface
{
- public function getConfigTreeBuilder()
+ public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('imatic_view');
$rootNode = $treeBuilder->getRootNode();
diff --git a/DependencyInjection/ImaticViewExtension.php b/DependencyInjection/ImaticViewExtension.php
index e064005..885fcb5 100755
--- a/DependencyInjection/ImaticViewExtension.php
+++ b/DependencyInjection/ImaticViewExtension.php
@@ -7,8 +7,8 @@
use Imatic\Bundle\ViewBundle\Twig\Loader\RemoteLoader;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader;
-use Symfony\Component\HttpKernel\DependencyInjection\Extension;
/**
* This is the class that loads and manages your bundle configuration.
@@ -17,13 +17,13 @@
*/
class ImaticViewExtension extends Extension
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
- $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
- $loader->load('services.xml');
+ $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
+ $loader->load('services.yaml');
if (\interface_exists(\Symfony\Component\Clock\ClockInterface::class)) {
$container->register(\Imatic\Bundle\ViewBundle\Clock\SymfonyClockAdapter::class)
diff --git a/EventListener/KernelSubscriber.php b/EventListener/KernelSubscriber.php
index 706a9a7..a1639f1 100644
--- a/EventListener/KernelSubscriber.php
+++ b/EventListener/KernelSubscriber.php
@@ -38,7 +38,7 @@ public function __construct(LayoutHelper $layoutHelper, TranslatorInterface $tra
$this->debug = $debug;
}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return [
KernelEvents::RESPONSE => 'onKernelResponse',
diff --git a/ImaticViewBundle.php b/ImaticViewBundle.php
index 6d743c1..9b29d66 100755
--- a/ImaticViewBundle.php
+++ b/ImaticViewBundle.php
@@ -14,7 +14,7 @@ public function getParent()
return 'TwigBundle';
}
- public function build(ContainerBuilder $container)
+ public function build(ContainerBuilder $container): void
{
parent::build($container);
diff --git a/Menu/Helper.php b/Menu/Helper.php
index cdf8560..17119f5 100755
--- a/Menu/Helper.php
+++ b/Menu/Helper.php
@@ -3,8 +3,8 @@
use Imatic\Bundle\ViewBundle\Templating\Utils\StringUtil;
use Knp\Menu\ItemInterface;
+use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException;
-use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
@@ -35,7 +35,7 @@ public function __construct(TranslatorInterface $translator, Security $security)
* @param ItemInterface $dropDownItem
* @param string $aligment
*/
- public function setDropdown(ItemInterface $dropDownItem, string $aligment = null)
+ public function setDropdown(ItemInterface $dropDownItem, ?string $aligment = null)
{
$dropDownItem
->setUri('#')
diff --git a/Resources/config/routing.xml b/Resources/config/routing.xml
deleted file mode 100644
index cf7de00..0000000
--- a/Resources/config/routing.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-