delight-im / PHP-Foundation

Writing modern PHP applications efficiently
MIT License
29 stars 7 forks source link

Question: Twig version. #36

Open Tapchou opened 4 years ago

Tapchou commented 4 years ago

Can Twig be safely updated without breaking any features?

Some Filters were added in later versions, even in the 1.x branch.

ocram commented 4 years ago

Good question, thank you!

Generally, you should be able to update any dependency via composer update without breaking anything. That’s because most version constraints in the default composer.json exclude new major versions (which usually include breaking changes).

But, of course, there’s always something that could go wrong. So please be prepared, and do some testing after any update.

We try to update the default versions here in the repositories for the framework to assist with updating, so that you know which updates are most definitely safe.

As for Twig, we have tested all versions through version 1.42.5. So that’s the version you should be able to safely update to. With anything newer (or with new major versions), you have to test this yourself and may very well encounter things that stop working.

Does that help?