I'm getting an error when i work with FOSRestBundle.
Fatal error: Class 'JMS\Serializer\SerializationContext' not found in
/home/a15net/public_html/kavuklar/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/View/ViewHandler.php
on line 209
It was working before composer.phar update.
Do you any have idea about this why i'm getting this error?
I had the same problem.
I solved it reading the FOSRestBundle upgrade file, and then updating my composer.json. You should try to put in require section this next lines:
"friendsofsymfony/rest-bundle": "0.11.*",
"jms/serializer-bundle": "0.12.x-dev"
and then
composer.phar update
It works for me.
Try and comment.
Related
i have a problem since upgrading to laravel 8.0 with vonage/Nexmo. The website still works but CronJobs doesn't work (because of the Warning probably?).
Here is the Warning that appears in the Apache Error log:
Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/autoload.php) is not within the allowed path(s): (/home/webapps/preprod/:/var/lib/php/session:/tmp) in /home/webapps/preprod/vendor/vonage/nexmo-bridge/src/Autoloader.php on line 69
My composer.json:
"require": {
"php": "^7.3|^8.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"nexmo/laravel": "^2.4.1",
"vonage/nexmo-bridge": "^0.1.0" (this one was added after upgrading but the problem is still there)
I have tried to add the folder to the open_dir directory, but the warning is still there.
Can anyone point me in the right direction? Or is it possible to make Cronjob ignore the Warnings?
Thank you
After removing line 69 everything works.
I had wrong php version on server too (so i had to update that too).
I will retry later if the error is still there with the good php version.
The issue has been fixed with the latest update of vonage-php-nexmo-bridge. Just upgrade to version 0.1.2.
I'm using Symfony 4.4 on a project and I need to use stfalcontinymce. Since I'm on SF4 I need the version 2.4. So I did this:
composer require stfalcon/tinymce-bundle=2.4
But then I get this error:
!! 11:03:44 CRITICAL [php] Uncaught Error: Class 'Twig_Extension' not found ["exception" => Error { …}]
!!
!! In StfalconTinymceExtension.php line 13:
!!
!! Attempted to load class "Twig_Extension" from the global namespace.
!! Did you forget a "use" statement?
Someone told me that it's because this version doesn't get along with Twig 3 so I need to downgrade my Twig version. I then did this to downgrade Twig:
composer require twig/twig=2
But then I get this error:
13:14:07 CRITICAL [php] Uncaught Error: Call to undefined method Twig\Environment::registerUndefinedTokenPa
rserCallback() ["exception" => Error { …}]
!!
!! In srcApp_KernelDevDebugContainer.php line 2040:
!!
!! Attempted to call an undefined method named "registerUndefinedTokenParserCallback" of class "Twig\Environm ent".
!! Did you mean to call e.g. "registerUndefinedFilterCallback" or "registerUndefinedFunctionCallback"?
I tried adding in composer.json
"twig/extensions": "*"
Then composer install, then running the command:
composer require stfalcon/tinymce-bundle=2.4 -W
And I get this error:
!! 13:49:04 CRITICAL [php] Uncaught Error: Call to undefined method
Twig\Environment::registerUndefinedTokenParserCallback() ["exception" => Error { …}]
!!
!! In srcApp_KernelDevDebugContainer.php line 2045:
!!
!! Attempted to call an undefined method named "registerUndefinedTokenParserCallback" of class "Twig\Environment".
!! Did you mean to call e.g. "registerUndefinedFilterCallback" or "registerUndefinedFunctionCallback"?
I'm really lost here. Can someone help? thanks
Your executed commands don't seem to be possible on my system at all since there will be version constraint conflicts.
Instead of restricting to one version for your dependencies, you should use a constraint.
Your require in composer.json may contain something like the following
"twig/twig": "^2",
"stfalcon/tinymce-bundle": "2.4.*",
"twig/extra-bundle": "^2"
The constraints are explained here. But the ^2 basically means >= 2.x.x and < 3.0.0
For the tinymce bundle I used the above because of the this GitHub issue
Furthermore twig/extensions seems to be deprecated, and this GitHub issue mentions twig/extra-bundle which is needed and may be its replacement.
I have connect with strava and got data via Socialite package in PHP Laravel. And extract data without no issues. But recently i can't connect to the strava again. It show ans exception.
$stravaUser = Socialite::driver('strava')->user(); // this line shown error
The error was:
local.ERROR: exception 'ErrorException' with message 'Undefined index: email' in c:\my web folder\vendor\socialiteproviders\strava\Provider.php:57
This issue has been fixed in a recent commit but has yet to be included in release so you need to use the dev-master for now.
In your composer.json, replace:
"socialiteproviders/strava": "^3.0"
with
"socialiteproviders/strava": "dev-master"
And run
$ composer update
I've tried updating Symfony to v2.7.40 today. At the end of the update process while clearing the cache I encounter
PHP Fatal error: Class 'Twig\Extension\AbstractExtension' not found
In my composer.json I already have required and installed "twig/extensions": "~1.5"
Do I need to update any other bundle/library?
Thank you
I wanted to integrate twitter-bootstrap in my Symfony2 project and trying to make it work, I followed documentation is BootstrapBundle.
After installing all dependencies set in composer.json, i get this error:
Fatal error: Interface 'Knp\Menu\Matcher\Voter\VoterInterface' not found in /var/www/cv- editor/vendor/mopa/bootstrap-sandbox-bundle/Mopa/Bundle/BootstrapSandboxBundle/Navbar/Example/Voter/RequestVoter.php on line 12
Have you any idea ?
After debvugging, i found that there is a problem in dependencies of MopaBootsrapBundle which works with Knp-menu-bundle version 1.2