-
Notifications
You must be signed in to change notification settings - Fork 36
avoid deprecation notices with Symfony 2.8 #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… 2.8 (the remaining ones seem to be triggered by Symfony itself)
I found out that removing the |
avoid deprecation notices with Symfony 2.8
*/ | ||
public function configureOptions(OptionsResolver $resolver) { | ||
$resolver->setDefaults(array( | ||
'data_class' => get_class(new Setting()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a setting object just to set the class name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, obviously. 😏 I'll change that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #23.
@stof, do you see why the tests exit with a fatal error on Symfony 3.0-dev, btw? |
this looks like there is a Twig_Node_Expression_Function created for a non-existent function. This seems weird as Twig should be preventing it before reaching that point. It seems even more weird if it happens only on Symfony 3. I will look into it this evening |
further improvements based on comments to #22
@stof, any news? I remember when I once tried to find out what's wrong there, it led me to something Assetic-related. |
@stof, I'm still getting that fatal error |
@craue can you run a build without disabling xdebug, so that we can get a stack trace for the fatal error ? |
@craue this is because your functional test kernel is not enabling the Asset component, and so the And the |
@craue just cherry-pick this commit to merge it in master 😄 |
Issue is that |
@craue you can put this in |
With a separate config file for >=3.0? I'm already using multiple config files for various test scenarios. That would complicate things. |
@craue you can load closures too. See https://github.com/symfony/assetic-bundle/blob/master/Tests/TestKernel.php |
This PR is meant for trying to avoid as many deprecation notices as possible introduced by symfony/symfony#15079.
I'm pretty sure I've updated all relevant code to not use deprecated functionality while keeping BC. The remaining notices seem to be triggered by Symfony itself.
Travis log: