I've been trying to run the command php bin/console make:entity on my terminal on ubuntu but I have been getting this error message after trying to enter a property name and I have no idea what to do about it.
In Validator.php line 158: Argument 2 passed to
Symfony\Bundle\MakerBundle\Validator::validateDoctrineFieldName() must
be an instance of Doctrine\Common\Persistence\ManagerRegistry,
instance of Doctrin e\Bundle\DoctrineBundle\Registry given, called
in
/home/tautis/NQd/vendor/symfony/maker-bundle/src/Maker/MakeEntity.php
on line 303
Related
I was trying to setup my Laravel lumen project in local. When i run php artisan key:generate command the following error occured and later none of the artisan commands is working. Checked the name space it is correct.
In Container.php line 879:
Target class [\App\Helpers\SMS\Gateway\] does not exist.
In Container.php line 877:
Class \App\Helpers\SMS\Gateway\ does not exist
I couldn't find this Container.php file anywhere.
Can anybody help me to find out solution.
Problem: php artisan command not working on server(using putty name.com) but showing result on my local environment (command prompt windows).
Description: when i am running php artisan command using putty it throws error in my error logs.
PHP Catchable fatal error: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in /home/hisunil4/intraview.co.in/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 62 and defined in /home/hisunil4/intraview.co.in/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 103
I am working on a Symfony 3.3 based application. I have my project locally installed and installed on a server. My laptop and server are both running Ubuntu 16.04.
On my local machine the prod and dev are both error-free. However when I want to visit the prod on the server I get the following messages in my var/logs/prod.log
php.CRITICAL: Undefined class constant 'HEADER_X_FORWARDED_FOR' {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Undefined class constant 'HEADER_X_FORWARDED_FOR' at /home/webwijs/birdbook/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php:122)"} []
request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Undefined class constant 'HEADER_X_FORWARDED_FOR'" at /home/webwijs/birdbook/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php line 122 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Undefined class constant 'HEADER_X_FORWARDED_FOR' at /home/webwijs/birdbook/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php:122)"} []
It might be important to know that it is an installation upgraded from symfony 3.1.
I had the exact same issue.
Basically I dump the Request filepath and it was the old one from SF3.2 loaded from the var/bootstrap.php.cache loaded instead of the new one in Symfony\Component\HttpFoundation\Request.
Just remove your var/bootstrap.php.cache file then clear your cache and everything will be fine.
When I do php app/console service:debug my service is listed as expected, but when I access my bundle from web, or by functional tests - I get:
Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "You have requested a non-existent service "xx.handler"." at xx/app/bootstrap.php.cache line 2031 {"exception":"[object] (Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service \"xx.handler\". at xx/app/bootstrap.php.cache:2031)"} []
I also attempted to type die('di'); in the DependecyInjection Extension, which is never triggered when using the browser to access the controller, but it fires with php app/console service:debug
How to resolve the above error, such that accessing my controller will register my service?
Try:
app/console cache:clear
Also - It's better to debug your code on dev mod via app_dev.php
I got a error when I try create a project using the zend framework command line:
[user ~] /home/user/public_html $ zf create project openstart
PHP Catchable fatal error: Argument 1 passed to Zend_Tool_Framework_Client_Console_ArgumentParser::setArguments() must be an array, null given, called in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console.php on line 194 and defined in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console/ArgumentParser.php on line 79
Catchable fatal error: Argument 1 passed to Zend_Tool_Framework_Client_Console_ArgumentParser::setArguments() must be an array, null given, called in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console.php on line 194 and defined in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console/ArgumentParser.php on line 79
zf is a symlink to /home/user/downloads/ZendFramework-1.10.5/bin/zf.sh
Any ideas?
Try a newer version of Zend Framework if possible, they are at 1.11.10 now and I think a number of zend tool issues have been resolved since then.
If I run your command on the newest version I get no errors and the project is created.