stephpy / timeline-bundle

Symfony2 bundle to make timeline
192 stars 57 forks source link

Symfony 4.4 & 5 compatibility #216

Open cbeyer opened 3 years ago

cbeyer commented 3 years ago

Hi,

I have upgraded my project to Symfony 4.4 and now my timelines don't show anyhting.

composer.json

        "predis/predis": "^1.1",
        "snc/redis-bundle": "^3.3",
        "stephpy/timeline-bundle": "^3.1",

spy_timeline.yaml

spy_timeline:
    render:
        path:     'Timeline/Timeline'
        fallback: 'Timeline/Timeline/default.html.twig'

I assume the bug comes from the following line

https://github.com/stephpy/timeline-bundle/blob/207adaf4cc5dacf0015be9a9616134324fd2183d/Twig/Extension/TimelineExtension.php#L299

Replace with '%s/%s.html.twig' ?

stephpy commented 3 years ago

Hi,

I guess it's a BC break change, since %s/%s.html.twig is may not supported in previous version of Symfony/Twig, can you check if it's BC break ?

If it's BC break I see 2 solutions:

cbeyer commented 3 years ago

I am not expert enough to say if it is a BC or not ;) but while upgrading to SF4.4 I have changed multiple Twig calls, replacing ":" by "/".

Here you have an example of an upgrading article https://codereviewvideos.com/course/upgrade-symfony-3-to-symfony-4/video/part-2-of-2-migrating-to-symfony-4-with-flex (search "This needs the include syntax updating")

Il my opinion your current code doesn't work with SF4.4.

cbeyer commented 2 years ago

Hi, now I upgrade my project to SF5 It seems this bundle is not compatible :( https://packagist.org/packages/stephpy/timeline-bundle

Any workaround ?

cbeyer commented 2 years ago

Nobody ? :(

stephpy commented 2 years ago

Hello,

Sorry but i cannot find time to support this project :(

You can by this way fork it then add your own supports to sf 4.x, 5.x.

Sorry about that, have a good luck.