This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Strict standards "error"

Strict standards "error"

Strict standards "error"

Tuesday 02 December 2014 12:09:58 am - 13 replies

Making a controller I got:

Strict Standards: Declaration of eZ\Bundle\EzPublishCoreBundle\Controller::isGranted() should be compatible with Symfony\Bundle\FrameworkBundle\Controller\Controller::isGranted($attributes, $object = NULL) in /home/mysite/www/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Controller.php on line 16

So I dove into and copied the isGranted() from there over to /home/mysite/www/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Controller

The problem went away, but I'm unsure if it was the right way to fix it.

Any ideas?


Tuesday 02 December 2014 12:56:16 am

So seems you have done a composer update happy.gif Emoticon

At least from what I can see this function is added in Symfony 2.6 with a different signature than what we have. change composer.json to refer to Symfony "~2.5.0" for now and re run composer update if you want to avoid the issue.

Tuesday 02 December 2014 9:25:02 am

I knew it was my fault.

I downgraded and the "error" goes away, but now I get a hang when updating with composer:

  - Installing ezsystems/ezpublish-legacy (dev-master 24317f2)

    Cloning 24317f20762c508923236bcce8037e029b850f54

As a result perhaps I now get:

Fatal error: Class 'Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle' not found in /home/mysite/www/ezpublish/EzPublishKernel.php on line 59

Any ideas on what I did wrong this time?



Modified on Tuesday 02 December 2014 9:29:05 am by Felix Laate

Tuesday 02 December 2014 12:06:40 pm

Maybe past a diff between your composer.json and the one included in the download?
Can also find it here: 



Only diff should be something like:

- "symfony/symfony": "~2.5",
+ "symfony/symfony": "~2.5.0",

Modified on Tuesday 02 December 2014 12:10:20 pm by André R

Tuesday 02 December 2014 4:41:29 pm



I had also this error. Why eZ Publish do not modify their composer.json ?



Tuesday 02 December 2014 8:27:59 pm

We did in 5.4, but unfortunately not in 2014.11.

But depending on time we take to fix this we should consider making a new tag, however did the two of you install via download or composer create-project? In case of download a tag won't help.

Tuesday 02 December 2014 10:55:37 pm

I installed with composer as described here:


Wednesday 03 December 2014 9:32:54 am

We installed via download, then we frequently upgrade the project with composer.

Moreover, we do not understand also why the version of eZ in the composer.json is not limited. For example, when we had updated our project with composer with the community 2014.07, the project was broken because the version automatically had moved to 2014.11.

Wednesday 03 December 2014 9:45:32 am

@Clem The >=2014.07 / >=2014.11 limitations are made that way to ensure you can have micro updates (e.g. 2014.11.5). It's not possible with Composer to do 2014.11.* as this doesn't work with date based versions. However, we might do something like >=2014.11,<2014.12.

Anyway, it's usually safer to do composer updates for each package (e.g. composer update symfony/symfony).

Wednesday 03 December 2014 10:12:51 am

Tkx for your response. We agree it is normal to get micro updates.

For the limations, that's what we made when the project was broken and indeed we fixed it with this line : >=2014.07, <2014.11

But, we think it would be a better idea to put this directly in the download of ez community. We can imaginate another developer which download on older version and update it with composer, he will have the last community ez project and not the version he want to have. It is the same with the version of symfony.

And it is a bit paradoxal because in the documentation of eZ Publish, it is written to do a composer install when the project is downloaded happy.gif Emoticon :

Modified on Wednesday 03 December 2014 10:13:15 am by Clem PERISCOPE

Wednesday 03 December 2014 11:15:03 am

@Clem Yes, this inconsistency will vanish next year as we will handle both the EE (LTS) versions and the frequent releases in the same way. We will also stop using dates as composer versions, as Jérome mentions it does not work very well.


Felix: As you installed the eZ Publish dev way, you can do git pull to get a fix:

However installing like this you will have master packages of everything, so you will most likely get similar issues in the future. Seems we should clarify that on the repo.

Modified on Wednesday 03 December 2014 11:16:55 am by André R

Friday 05 December 2014 2:40:40 pm


Symfony 2.6 compatibility fixed in master.

Friday 05 December 2014 2:56:00 pm


Tkx for your responses !

eZ 5 is a really good project. We can see that the team is reactive. 
Waiting for eZ 6 with the full stack !

Tuesday 28 April 2015 8:22:21 am


I recently ran into this problem as well and found that the changes provided by Jerome in the following commit solved the problem for me!

I hope this helps others!



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from