Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Remove SonataIntlBundle dependency #227

Merged
merged 1 commit into from
Feb 29, 2020

Conversation

franmomu
Copy link
Member

@franmomu franmomu commented Dec 19, 2019

Subject

Ref sonata-project/SonataIntlBundle#280

I am targeting this branch, because this is BC.

Changelog

### Added
- Support for Twig 3
### Removed
- Remove `sonata-project/intl-bundle` dependency

@core23
Copy link
Member

core23 commented Dec 19, 2019

There is no usage in Twig templates too?

@franmomu franmomu changed the title Remove CoreBundle and SonataIntlBundle dependencies WIP: Remove CoreBundle and SonataIntlBundle dependencies Dec 19, 2019
@franmomu
Copy link
Member Author

There is no usage in Twig templates too?

You're right 😟

composer.json Outdated Show resolved Hide resolved
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="sonata.timeline.twig.intl_extension" class="Twig\Extensions\IntlExtension">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I've used them in a project, I had to add them as services. In the docs it says:

use Twig\Extra\Intl\IntlExtension;

$twig = new \Twig\Environment(...);
$twig->addExtension(new IntlExtension());

which I haven't check but I guess is what twig.extension tag does.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay then. We could keep this for the stable release to stay BC. We should remove this service and update the installation instruction for the next major release.

core23
core23 previously approved these changes Dec 20, 2019
@franmomu franmomu changed the title WIP: Remove CoreBundle and SonataIntlBundle dependencies Remove SonataIntlBundle dependencies Dec 27, 2019
@franmomu franmomu changed the title Remove SonataIntlBundle dependencies Remove SonataIntlBundle dependency Dec 27, 2019
@SonataCI
Copy link
Collaborator

Could you please rebase your PR and fix merge conflicts?

@franmomu
Copy link
Member Author

Since the minimum is now 4.3, I required twig/extra-bundle which registers the IntlExtension.

@OskarStark OskarStark closed this Feb 29, 2020
@OskarStark
Copy link
Member

Ups

@OskarStark OskarStark reopened this Feb 29, 2020
@greg0ire greg0ire merged commit 8b7881a into sonata-project:3.x Feb 29, 2020
@greg0ire
Copy link
Contributor

Thanks @franmomu !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants