APYDataGridBundle icon indicating copy to clipboard operation
APYDataGridBundle copied to clipboard

Symfony 5 support

Open jmontoyaa opened this issue 6 years ago • 9 comments

  • Fix php unit tests
  • Add PHP 7.2 and 7.3 in travis - (remove PHP 5.6 in travis)

jmontoyaa avatar Dec 17 '19 10:12 jmontoyaa

I'm preparing another change to add support to Symfony 5

jmontoyaa avatar Dec 17 '19 10:12 jmontoyaa

SF5 support would be much appreciated ;) Thanks a bunch in advance

Thunderbird69 avatar Jan 03 '20 15:01 Thunderbird69

Got an error with this PR: Attempted to call an undefined method named "renderResponse" of class "Twig\Environment". in vendor/apy/datagrid-bundle/Grid/Grid.php (line 2152)

The method does not exists anymore and must be replaced by a code like:

        $content = $this->container->get('twig')->renderView($view, $parameters);

        if (null === $response) {
            $response = new Response();
        }

        $response->setContent($content);

        return $response;

pierrotevrard-dbit avatar Dec 21 '20 09:12 pierrotevrard-dbit

I've finally made a branch for Twig 3.1 compatibility, see https://github.com/pierrotevrard-dbit/APYDataGridBundle/tree/fix/twig_31_compatibility

It does not seem backward compatible with Twig 2.0, sry

pierrotevrard-dbit avatar Jan 11 '21 12:01 pierrotevrard-dbit

Hello,

I've been working on this branch https://github.com/APY/APYDataGridBundle/tree/feature/sf5-compat to have a working Bundle with latest version on Symfony 5.

All tests are green and I've created a real life example that also allows to test the bundle locally : https://github.com/npotier/apydatagrid-demo

I've created a PR here : https://github.com/APY/APYDataGridBundle/pull/1063

Feel free to tell me what you think about it.

npotier avatar Sep 13 '21 16:09 npotier

Hello, It's a nice job. I think something is missing: when you filter, the column is filtered but the value disappears from the input box. Regards

FredDut avatar Sep 13 '21 20:09 FredDut

Hello , Do you plan to merge fixes from jmontoya in sf5-compat branch? I can't see fixes for Export.php (630a1b5) , GridManager.php (56c62e1) and spaceless in blocks.html.twig (9425cd1) in sf5-compat branch. Maybe I misunderstand something.

FredDut avatar Oct 21 '21 09:10 FredDut

I think the datagrid is OK for php7.2 with this fixes. With php 7.4 it's not ok. When you extend the grid with custom twigs, columns or data are not initialized. Same problem for exports. I don't know what to do with this.

FredDut avatar Nov 16 '21 14:11 FredDut

Hello @FredDut Thank you for your message. I've integrated the changes in the 4.0.1 tag of the bundle.

Unfortunately, I don't have access to packagist for this bundle in order to trigger an update

npotier avatar Jan 19 '22 17:01 npotier

I think we can close this PR, as the modifications has been integrated in new versions. Feel free to add comment if necessary

npotier avatar Feb 10 '23 22:02 npotier