i'm new to symfony i tried to install package admin panel by command composer require admin but it gives me error The deprecation template must contain the “% service_id%” placeholder, i executed command composer update, and found some answer ( Updating easycorp/easyadmin-bundle, Updating doctrine/doctrine-migrations-bundle, Updating symfony/orm-pack) I tried these command but it gives me error:
Fatal error: Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure in D:
\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php on line 5876
Symfony\Component\ErrorHandler\Error\FatalError^ {#33
-error: array:4 [
"type" => 64
"message" => "Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure"
"file" => "D:\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php"
"line" => 5876
]
#message: "Compile Error: Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer():
?Closure"
#code: 0
#file: "D:\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php"
#line: 5876
}
I had a similar problem after updating some doctrine package. Removing var/cache fixed it for me.
Related
I'm currently facing an important issue when i want to run any "php bin/console" command:
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#29
#message: """
Attempted to load class "Kernel" from namespace "App".\n
Did you forget a "use" statement for "Symfony\Component\HttpKernel\Kernel"?
"""
#code: 0
#file: "./bin/console"
#line: 41
}
2020-06-11T15:43:20+00:00 [critical] Uncaught Error: Class 'App\Kernel' not found
While my Kernel.php class is normally defined in src/Kernel.php
I am working with Symfony 5
I manage to solve my issue performing 3 successive actions :
delete "vendor" folder (I saved it in another folder just in case)
delete "cach-dev" folder
run "composer update" command
Hope it can help other people to solve their issue
I am trying to install Lumen on Mac OS 11.5.2. Running the command composer create-project --prefer-dist laravel/lumen app returns a fatal error of:
Installing dependencies from lock file (including require-dev)
Fatal error: Uncaught TypeError: Argument 3 passed to Composer\Package\Locker::__construct() must be an instance of Composer\Installer\InstallationManager, instance of Composer\Repository\RepositoryManager given, called in /Users/macbox/.composer/vendor/foxy/foxy/Util/LockerUtil.php on line 41 and defined in phar:///usr/local/bin/composer/src/Composer/Package/Locker.php:60
Stack trace:
#0 /Users/macbox/.composer/vendor/foxy/foxy/Util/LockerUtil.php(41): Composer\Package\Locker->__construct(Object(Composer\IO\ConsoleIO), Object(Composer\Json\JsonFile), Object(Composer\Repository\RepositoryManager), Object(Composer\Installer\InstallationManager), '{\n "name": "...')
#1 /Users/macbox/.composer/vendor/foxy/foxy/Fallback/ComposerFallback.php(101): Foxy\Util\LockerUtil::getLocker(Object(Composer\IO\ConsoleIO), Object(Composer\Repository\RepositoryManager), Object(Composer\Installer\InstallationManager), './composer.json')
#2 phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(217) : eval()' in phar:///usr/local/bin/composer/src/Composer/Package/Locker.php on line 60
I am running PHP version 7.4.2 and composer version 2.1.8.
Has anybody run into this issue before and found a solution? I haven't been able to find any similar issues.
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'm currently facing an important issue when i want to run any "php bin/console" command:
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#29
#message: """
Attempted to load class "Kernel" from namespace "App".\n
Did you forget a "use" statement for "Symfony\Component\HttpKernel\Kernel"?
"""
#code: 0
#file: "./bin/console"
#line: 41
}
2020-06-11T15:43:20+00:00 [critical] Uncaught Error: Class 'App\Kernel' not found
While my Kernel.php class is normally defined in src/Kernel.php
I am working with Symfony 5
I manage to solve my issue performing 3 successive actions :
delete "vendor" folder (I saved it in another folder just in case)
delete "cach-dev" folder
run "composer update" command
Hope it can help other people to solve their issue
After I install and configure, all what I need is to make a payment using Paypal (Sandbox).
I copy/pasted the both Keys in my .env file.
Everything works great locally, but after I uploaded it to a shared hosting and process the same payment, I got the following error, and I don't know why.
Error Picture
Errors Lines =>
PayPalConnectionException {#311 ▼
-url: "https://api.sandbox.paypal.com/v1/oauth2/token"
-data: null
#message: "failed setting cipher list"
#code: 59
#file: "/home/artemal/www/artemal/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php"
#line: 181
trace: {▶}
}