Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
'vendor',
'Tests/Fixtures/TestProject/var',
])
->notPath('Tests/Fixtures/TestProject/config/reference.php')
->in(__DIR__)
)
;
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Controller/Demo/Helper/NestedCollectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Controller/Demo/Helper/TestingType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/FormatterPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/MenuPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class MenuPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$definition = $container->getDefinition(ContainerProvider::class);

Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('imatic_view');
$rootNode = $treeBuilder->getRootNode();
Expand Down
8 changes: 4 additions & 4 deletions DependencyInjection/ImaticViewExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion EventListener/KernelSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion ImaticViewBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function getParent()
return 'TwigBundle';
}

public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
parent::build($container);

Expand Down
4 changes: 2 additions & 2 deletions Menu/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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('#')
Expand Down
8 changes: 0 additions & 8 deletions Resources/config/routing.xml

This file was deleted.

3 changes: 3 additions & 0 deletions Resources/config/routing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
imatic_view_default:
resource: '@ImaticViewBundle/Controller/DefaultController.php'
type: attribute
8 changes: 0 additions & 8 deletions Resources/config/routing_demo.xml

This file was deleted.

3 changes: 3 additions & 0 deletions Resources/config/routing_demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
imatic_view_demo:
resource: '@ImaticViewBundle/Controller/Demo'
type: attribute
191 changes: 0 additions & 191 deletions Resources/config/services.xml

This file was deleted.

Loading
Loading