Doctrine tool breaking Symfony Dialog Helper in ZF2 - symfony

I recently updated ZF2 and started getting this error in the command line when using the Doctrine tool. While it does not effect the work being done, it is annoying.
I have searched about but as I am relatively new to using Doctrine, I am not 100% sure what I need to do to fix this:
PHP Deprecated: "Symfony\Component\Console\Helper\DialogHelper" is
deprecated since version 2.5 and will be removed in 3.0. Use
"Symfony\Component\Console\Helper\QuestionHelper" instead. in
/var/www/cloud/vendor/symfony/console/Helper/DialogHelper.php on line
34 PHP Stack trace:
I am using ZF2 version: 2.4
Thanks for any help on this!

running composer update cleared up the problem for me.

Related

Use Symfony 4.4.23 without a Database, Symfony update is causing issues with this

I have an old Symfony website which is using the framework bundle but no database is required for the content. This works fine till 4.4.18 but upgrading to the latest version is giving the following error:
An exception occurred in driver: could not find driver
I haven't modified DATABASE_URL in .env or configured the driver in config/packages/doctrine.yaml. Is there anyway I can simple disable the use of database?
Thanks to the comment from #cerad, removing doctrine-migrations package from composer.json helped with the issue.
As I am not using a Database for the site, this is fine for me.
if your app doesn't use the database the best course of action is to remove the doctrine/doctrine-bundle and/or symfony/orm-pack (if you've installed the orm support via pack)
if that's not an option than set the DATABASE_URL= to nothing (like that, not the empty string), or if you've hit some bug in dbal dsn parsing give it the dummy sqlite until the issue gets resolved DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"

Symfony 4.3 error: You cannot set both "templating.hinclude_default_template" and "fragments.hinclude_default_template"

After Symfony 4.1 update to 4.3 I get templating deprecation warnings.
After reading https://symfony.com/blog/new-in-symfony-4-3-deprecated-the-templating-component-integration
I've removed templating and added fragments.
But now I get this error
You cannot set both "templating.hinclude_default_template" and "fragments.hinclude_default_template", please only use "fragments.hinclude_default_template"
I had this same error. It seems FOSUserBundle was still using templating. I was already planning to remove this bundle. When I removed FOSUserBundle the error went away. It may not be an option for you, but maybe it will help you find the problem.

Symfony 2 prod environment Deprecated call

I just finished the Symblog tutorial for symfony. Everything works just fine except when I try running the project on the production environment. On the blog page the following error message appears on the top of the page and on top of the comment section: Deprecated: getEntityManager is deprecated since Symfony 2.1. Use getManager instead in F:\xampp\htdocs\php\symblog\vendor\doctrine\doctrine-bundle\Doctrine\Bundle\DoctrineBundle\Registry.php on line 71
I am wondering why because I used the same version (symfony 2.3.10) for other projects and in these I have never seen this message. So what should I do?
Thanks in advance!
You should replace your code to use getManager() method instead of getEntityManager() or just change your error_reporting PHP setting (take a look at the below snippet).
The reason of not showing other depreciation messages in other project is different error reporting configuration (probably somwthing similar to the following - deprecated warnings will not be reported):
error_reporting(E_ALL ^ E_DEPRECATED);

Implement Sylius into Symfony2 Standard Edition

Hoi,
I am trying to implement the Sylius e-commerce bundles into a fresh Symfony 2.2.2 Standard Edition.
When running the sylius:install command from commandline, i keep getting the following error:
The class 'Sylius\Bundle\CartBundle\Model\CartItemInterface' was not found in
the chain configured namespaces Sylius\Bundle\CoreBundle\Entity,
Sylius\Bundle\SettingsBundle\Entity, Sylius\Bundle\CartBundle\Entity,
Sylius\Bundle\AssortmentBundle\Entity, Sylius\Bundle\TaxationBundle\Entity,
Sylius\Bundle\ShippingBundle\Entity, Sylius\Bundle\PaymentsBundle\Entity,
Sylius\Bundle\PromotionsBundle\Entity, Sylius\Bundle\AddressingBundle\Entity,
Sylius\Bundle\SalesBundle\Entity, Sylius\Bundle\InventoryBundle\Entity,
Sylius\Bundle\TaxonomiesBundle\Entity, FOS\UserBundle\Entity
The Bundles are imported via Composer, activated via AppKernel.php, I've migrated the dependencies and configuration from a plain Sylius installation and actually have no idea, where this error comes from. I just noticed, that its trying to find a Model inside an Entiy-Namespace, which can't be right.
Anyone an idea?
We had the same problem, we are working with symfony 2.1. I fixed it by reordering the bundles registration in the app Kernel.php file.
In this file I placed the syliusCart bundle register before all the other sylius bundles and the doctrine registers.
I really dont know what is causing this or why this worked for me... but I hope this works for you.
Cheers!

What's the correct version of FOSRestBundle to use with Symfony 2.0.18?

I'm trying to upgrade my Symfony2 application from 2.0.16 to 2.0.18. I ran into something that looked like a FOSRestBundle problem, so I upgraded FOSRestBundle too (to their latest commit on their master branch), but that seems to cause different problems. Before we go detailing all of that and troubleshooting, can someone just tell me which version of FOSRestBundle could be reasonably expected to work with Symfony 2.0.18?
The latest master version of FOSRestBundle appears to work fine with Symfony 2.0.18.
I unpinned FOSRestBundle by removing it from my deps.lock file and all is well.
Here's the error I ran into before upgrading FOSRestBundle:
PHP Strict standards: Declaration of FOS\RestBundle\Routing\Loader\RestXmlCollectionLoader::getXmlErrors() should be compatible with that of Symfony\Component\Routing\Loader\XmlFileLoader::getXmlErrors() in /home/adamm/git/bv-bundles/SingleServerApplication/vendor/bundles/FOS/RestBundle/Routing/Loader/RestXmlCollectionLoader.php on line 137
I was using FOSRestBundle version d9a876803df61858ce3e8d3f0c934727638ad874.

Resources