Skip to content

Commit

Permalink
SF6 Support (#1087)
Browse files Browse the repository at this point in the history
* fixes for SF6

* Fix GridTest (SF6)

* Fix GridTest (SF6) 2

* Update continuous-integration.yaml

add php 8.2
add SF 6
remove SF 4.4

* Fix Grid and GridFactoryTest (SF6)

* Fix  GridFactoryTest (SF6)

* Fix source in Grid (SF6)
  • Loading branch information
FredDut authored Sep 7, 2023
1 parent 36c43b5 commit 2b23fc9
Show file tree
Hide file tree
Showing 23 changed files with 182 additions and 133 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
symfony:
- '4.4.*'
- '5.4.*'
- '6.3.*'
dependencies:
- 'highest'
include:
Expand Down Expand Up @@ -49,4 +50,4 @@ jobs:
run: |
vendor/bin/phpunit
# ... then your own project steps ...
# ... then your own project steps ...
2 changes: 1 addition & 1 deletion DependencyInjection/APYDataGridExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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

class GridExtensionPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container):void
{
if (false === $container->hasDefinition('grid')) {
return;
Expand Down
4 changes: 2 additions & 2 deletions Grid/Columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(AuthorizationCheckerInterface $authorizationChecker)
*
* @return ColumnsIterator
*/
public function getIterator($showOnlySourceColumns = false)
public function getIterator($showOnlySourceColumns = false):ColumnsIterator
{
return new ColumnsIterator(new \ArrayIterator($this->columns), $showOnlySourceColumns);
}
Expand Down Expand Up @@ -128,7 +128,7 @@ public function getPrimaryColumn()
/**
* @return int
*/
public function count()
public function count():int
{
return count($this->columns);
}
Expand Down
2 changes: 0 additions & 2 deletions Grid/Export/ExcelExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

namespace APY\DataGridBundle\Grid\Export;

use APY\DataGridBundle\Grid\Grid;

/**
* Excel (This export produces a warning with new Office Excel).
*/
Expand Down
10 changes: 8 additions & 2 deletions Grid/Export/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Response;
use Twig\TemplateWrapper;
use Twig\Environment;

abstract class Export implements ExportInterface, ContainerAwareInterface
{
Expand Down Expand Up @@ -60,13 +61,14 @@ abstract class Export implements ExportInterface, ContainerAwareInterface
*
* @return \APY\DataGridBundle\Grid\Export\Export
*/
public function __construct($title, $fileName = 'export', $params = [], $charset = 'UTF-8', $role = null)
public function __construct( $title, $fileName = 'export', $params = [], $charset = 'UTF-8', $role = null)
{
$this->title = $title;
$this->fileName = $fileName;
$this->params = $params;
$this->charset = $charset;
$this->role = $role;
// $this->twig = $twig;
}

/**
Expand All @@ -80,11 +82,15 @@ public function setContainer(ContainerInterface $container = null)
{
$this->container = $container;

$this->twig = $this->container->get('twig');


return $this;
}

public function setTwig(Environment $twig)
{
$this->twig=$twig;
}
/**
* gets the Container associated with this Controller.
*
Expand Down
2 changes: 0 additions & 2 deletions Grid/Export/JSONExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

namespace APY\DataGridBundle\Grid\Export;

use APY\DataGridBundle\Grid\Grid;

/**
* JSON.
*/
Expand Down
2 changes: 1 addition & 1 deletion Grid/Export/PHPExcel5Export.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

/*
/**
* This file is part of the DataGridBundle.
*
* (c) Abhoryo <abhoryo@free.fr>
Expand Down
1 change: 0 additions & 1 deletion Grid/Export/XMLExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Symfony\Component\Serializer\Encoder\XmlEncoder;
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
use Symfony\Component\Serializer\Serializer;
use APY\DataGridBundle\Grid\Grid;

/**
* XML.
Expand Down
Loading

0 comments on commit 2b23fc9

Please sign in to comment.