Symfony 3.3.2 Method ReflectionMethod::__toString() - php

I had fresh install symfony (3.3.2) project on Debian 8, PHP 5.6, but I have issue when running web application.
PHP Fatal error: Method ReflectionMethod::__toString() must not throw an exception in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ReflectionClassResource.php on line 0, referer:
I see this message after composer completes symfony installation and tries to clean cache, also web is not working and in error_log is this error.
Can't find solution for this problem, or it's Symfony bug?

Related

Symfony error when attempting to generate Doctrine proxy files

I have a PHP solution which is being moved from PHP7.4 -> PHP8.1. This required updating many packages used, such as Symfony and Doctrine. Everything seems fine, but when I go to run my deployment script, which re-generates Doctrine proxy files, I encounter an error:
Fatal error: Uncaught Symfony\Component\Console\Exception\LogicException: An option named "em" already exists. in /usr/local/store/vendor/symfony/console/Input/InputDefinition.php:232
I've tried playing with the Doctrine and Symfony versions which are required (I've tried symfony/console 5.4.16 and 6.2.5, and I had to downgrade doctrine/dbal from 3.5.1 to 2.13.9 to fix a different issue in the same deployment step), but I can't find any combination of packages that solves this issue.
The deployment is running the following:
php ./vendor/bin/doctrine-module orm:generate-proxies --em=orm_databasename

Symfony framework problem with creating controller

I just started to learn Symfony framework and I got stuck on very begging.
I created with composer with following commands:
composer require symfony/maker-bundle --dev
composer require annotations
php bin/console make:controller ToDoListController.php
Code looks good, but when I try to open this controller I am getting an error message:
Uncaught Error: Class 'Symfony\Bundle\FrameworkBundle\Controller\AbstractController' not found in C:\xampp\htdocs\symfony44\src\Controller\ToDoListController.php:9 Stack trace: #0 {main} thrown in C:\xampp\htdocs\symfony44\src\Controller\ToDoListController.php on line 9.
I am using xampp as a local server, symfony 4.4
Has anyone encountered with this problem?
Please install symfony using the symfony app. Download the app for windows from https://symfony.com/download.
Open the windows command prompt.
type the following commands
symfony new project-name --full
cd project-name
symfony serve
symfony serve starts your development server. Use apache when your app is deployed. With the symfony app you can use https. This method of symfony installation is easy and it is good for those new to symfony. With the --full option maker bundle and all other important bundles are installed for you. You can just start creating controllers

Twig_Error_Runtime ; the "core" extension is not enabled ; symfony

I've inherited a Symfony/PHP web app codebase with zero documentation. I'm a nodejs dev so you can image the fun...! Anyway I'm getting there, my focus atm is to be able to run the project locally.
Here's the Symfony version:
Symfony version 2.7.16 - app/dev/debug
I've installed packages via composer install.
I can start the web app locally via CLI:
php app/console server:run
Server running on http://127.0.0.1:8000
Quit the server with CONTROL-C.
However when I try to access this URL I'm seeing the following error in browser. Have google'd around but couldn't work it out so am hoping someone here can point me in the right direction.
I think this is due to trying to run a new version of twig on an old version of Symfony
as you can see here: https://github.com/symfony/symfony/issues/20284
They mention something similar, perhaps try to include an older version of twig in composer?
composer require twig/twig 1.23

Symfony 2.5 - IvoryCKEditorBundle fatal error (class not found)

I was trying to get installed the bundle egeloen/IvoryCKEditorBundle in my Symfony 2.5 but it's my first time installing a bundle and I need specific steps to make it, I don't understand in which files I have to put the code lines to get it installed, I write the code in the README file in appKernel, autoload.php and composer.json. It runs in a local host and I Use Xampp, my OS is Windows 7.
The error I got was:
Fatal error: Class 'web\bundles\IvoryCKEditorBundle' not found in
D:...\Source\app\AppKernel.php on line 19

Symfony fatal error when trying to run configurator

I successfully completed the configuration check on web/config.php when installing Symfony on a U10 LAMP server, but now running across this error when trying to run web/app_dev.php/_configurator/:
Fatal error: Interface 'Symfony\Bridge\Doctrine\RegistryInterface' not found in /var/www/symfony/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Registry.php on line 26
Did I forget to install something?
You are missing Doctrine bridge for some reason. I guess something went wrong when you installed vendors (github might have been down for a minute and it just skipped this part).
Try to reinstall vendors:
./bin/vendors install
Or just download Symfony2 with pre-installed vendors.

Categories