symfony-cmf / simple-cms-bundle

UNMAINTAINED - A more-than-simple cms based on the cmf components
http://cmf.symfony.com/
49 stars 45 forks source link

fix lower dependency build #146

Closed lsmith77 closed 9 years ago

dbu commented 9 years ago

there seems to be something more required. now the lowest version has a PHPCR\ValueFormatException https://travis-ci.org/symfony-cmf/SimpleCmsBundle/jobs/71724544

dbu commented 9 years ago

hm, the failure left here is some regression because dependecies moved, it seems. current master has the same problem: https://travis-ci.org/symfony-cmf/SimpleCmsBundle/jobs/71726031 (restarted only that build)

dbu commented 9 years ago

oh, i think this is the new twig deprecation thing. great. we don't ever use Twig_Function for example. should we lock to a version that does not have the warnings? or can we use the deprecation helper with symfony 2.3 and 2.6? @WouterJ would you happen to know?

wouterj commented 9 years ago

We can use deprecation helper with all other versions as well, but I propose to simply add prefer-stable: true to composer.json (this is how we solved it with the SeoBundle as well)

dbu commented 9 years ago

this leads to "ATTENTION: This operation should not be executed in a production environment. Please use "--force" to execute the command." for all except lowest :-(

wouterj commented 9 years ago

@dbu that means we're requiring an incorrect version of symfony-cmf/testing, you should bump that to ^1.3

dbu commented 9 years ago

ups, pushed the testing:^1.3 to master instead.

but it looks like meanwhile, a twig version with the deprecations has been released. 2.3 and 2.6 still failing because deprecations. so how do we use the deprecation helper? do we require it, or just set the env variable?

wouterj commented 9 years ago

Well, we are seeing the deprecations because the deprecation helper is installed. without the helper, the deprecation notices will be silenced.

As none of these deprecations come from Twig, I think the best solution is to not require the deprecation helper for the 2.3 and 2.6 tests (or use composer remove in these tests).

dbu commented 9 years ago

i see no explicit mention of a deprecation helper in the composer.json. how do i disable it? and all warnings are about Twig_Function and other things that say twig in the description so to me it looks like it is twig complaining here.

wouterj commented 9 years ago

Ah, I've updated the Testing component to rely on the other features of the PHPunit bridge. So we have to set the env variable to ignore these deprecations...

These deprecations are triggered by Twig indeed, but they do it like this: @trigger_error(...). The @ means the error is silenced unless you add a custom error handler. The PHPunit bridge adds a custom error handler to provide the deprecation summary after the tests. If the PHPunit bridge wasn't available, there would be no custom error handler and all deprecations would be ignored (and not shown).

dbu commented 9 years ago

yay, finally green! thanks a lot @WouterJ