After updating symfony/swiftmailer-bundle to v2.2.5 with composer.phar update I get such error:
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/swiftmailer-bundle (v2.2.4)
- Installing symfony/swiftmailer-bundle (v2.2.5)
Loading from cache
Writing lock file
Generating autoload files
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
The service definition "swiftmailer.mailer" does not exist.
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
Problem is fixed after downgrading to 2.2.4
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/swiftmailer-bundle (v2.2.5)
- Installing symfony/swiftmailer-bundle (v2.2.4)
Loading from cache
Writing lock file
Generating autoload files
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets (part of code removed)
You should definitely use mailer service, as it's an alias to the correct swiftmailer service, regardless how it named. For example im v2.3.3 it's swiftmailer.mailer.default
But you have to use
$container->findDefinition('mailer');
which unlike getDefinition() also resolves aliases so if the $serviceId argument is an alias you will get the underlying definition.
The line that triggerd the error was:
$definition = $container->getDefinition('swiftmailer.mailer') ;
Error was caused by change of service name. Until 2.2.4 the name was
swiftmailer.mailer
and since 2.2.5 it is:
swiftmailer.mailer.abstract
I changed the line to:
$definition = $container->hasDefinition('swiftmailer.mailer') ? $container->getDefinition('swiftmailer.mailer') : $container->getDefinition('swiftmailer.mailer.abstract');
That fixed the error.
Related
my all project is working fine but when i install image crop picker dependency then it shows the error even there is no build.
FAILURE: Build failed with an exception. Error given below
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
F:\bgbyteappfolder\newbgb\node_modules\react-native-image-crop-picker\android\build\intermediates\library_manifest\debug\AndroidManifest.xml:10:5-14:15: AAPT: error: unexpected element found in .
BUILD FAILED in 31s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API..
i Am expecting rapid action on this failure stackoverflow family
Upgrade your gradle version by adding classpath 'com.android.tools.build:gradle:4.0.1' in your android/build.gradle file:
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
}
After this clean your build folder by:
cd android
./gradlew clean
I have downloaded the fix pack from below URL.
https://www-945.ibm.com/support/fixcentral/swg/downloadFixes?parent=ibm%2FWebSphere%E2%88%8Fuct=ibm/WebSphere/WebSphere+Application+Server&release=All&platform=All&function=fixId&fixids=8.5.5-WS-WAS-FP013-part3,8.5.5-WS-WAS-FP013-part2,8.5.5-WS-WAS-FP013-part1%E2%88%88cludeRequisites=1%E2%88%88cludeSupersedes=0&downloadMethod=http&login=true
Upgrade Version - From WebSphere 8.5.5.0 to 8.5.5.13
While running the imcl command i have faced below error. Can someone please suggest what could cause this isssue?
# ./imcl install com.ibm.websphere.BASE.v85_8.5.5013.20180112_1418 -repositories /data/repo/repository.config -installationDirectory /appl/IBM/WebSphere/AppServer/ -acceptLicense -showProgress
25% 50% 75% 100%
------------------|------------------|------------------|------------------|
............................................................................
ERROR: Failed to find required installation files.
CRIMA1161E ERROR: Failed to find required installation files.
Explanation: Installation Manager did not find required installation files from the repository. An issue has occurred with the package that cannot be resolved by Installation Manager.
User Action: If the repository files were transferred from a different location before the installation, verify that the files were not altered during the transfer operation. Copy the repository files to a different location and install from that location. If the repository files were not transferred note the package name and version number and contact customer support.
ERROR: 'plug-in com.ibm.was.detect.offering.update.v85_8.5.0.20120308_0100' not found in /data/repo.
ERROR: 'plug-in com.ibm.was.detect.backlevel.jdk.ifix_8.0.2.20120308_0004' not found in /data/repo.
ERROR: 'plug-in com.ibm.was.determine.job.type_8.5.0.20120326_1010' not found in /data/repo.
Looks like you have old repositories enabled in Installation Manager preferences, for which the installation files are missing.
Try below steps to resolve this issue:
If you can enable GUI, Open IM, go to File > preferences >
Repositories. Do a test connection for all enabled repositories and
uncheck/disable repositories that are not working/you no longer
read.
If you cannot enable GUI, there are 2 options
Modify com.ibm.cic.agent.core.prefs file in order to enable/disable repositories (default location in linux:
/var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs)
Enable/Disable repositories using 'imcl -c' command line https://www.ibm.com/support/knowledgecenter/SSDV2W_1.8.5/com.ibm.cic.agent.console.doc/topics/t_console_pref_repository.html#remove_rep
Once old repositories for which installation files are missing are disabled, try installing the fixpack again.
Here are the steps, I am following:
Cloning my repository from github
git clone https://github.com/EresDev/EresNoteSymfony.git .
Updating .env file with APP_ENV=prod
Then performing install
composer install --no-dev
I get following error:
.
.
.
- Installing symfony/translation (v4.2.4): Loading from cache
- Installing symfony/validator (v4.2.4): Loading from cache
- Installing symfony/yaml (v4.2.4): Loading from cache
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!!
Script #auto-scripts was called via post-install-cmd
However, it works fine if I just use composer install without --no-dev
What can I do to make it work with --no-dev
Please refer to repository to access code if required.
apparently you have somehow managed to turn error display off (or it's some default). I get a very distinct error message when I run composer install --no-dev (run with commit e722218...)
!! PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "TwigBundle" from namespace "Symfony\Bundle\TwigBundle".
!! Did you forget a "use" statement for another namespace? in [path]/EresNoteSymfony/src/Kernel.php:23
!! Stack trace:
!! #0 [path]/EresNoteSymfony/vendor/symfony/http-kernel/Kernel.php(424): App\Kernel->registerBundles()
!! #1 [path]/EresNoteSymfony/vendor/symfony/http-kernel/Kernel.php(130): Symfony\Component\HttpKernel\Kernel->initializeBundles()
!! #2 [path]/EresNoteSymfony/vendor/symfony/framework-bundle/Console/Application.php(65): Symfony\Component\HttpKernel\Kernel->boot()
!! #3 [path]/EresNoteSymfony/vendor/symfony/console/Application.php(145): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
!! #4 [path]/EresNoteSymfony/bin/console(38): Symfony\Component\Console\Application->run(Object(Symfony\Componen in [path]/EresNoteSymfony/src/Kernel.php on line 23
!!
you should somehow turn error display on ;o)
update:
your config/bundles.php:6 says:
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
which essentially says, the twigbundle is expected in prod as well as in dev. thus the error? (but anyway, the point still stands, that you should display errors when running on cli)
after you change that line in your bundles.php, you have to move your twig.yaml config into the dev/test folders, I suppose.
I have upload pushed a Symfony project (based on symfony-demo) to github, however since doing so, I am unable to log in to the demo application as either the demo user or admin - instead I get the the following:
Authentication request could not be processed due to a system problem.
I have tried the below code as the page advises if the users are not working:
php app/console doctrine:fixtures:load
However, when I submit this I get the following error:
[Doctrine\DBAL\Exception\DriverException]
An exception occured in driver: could not find driver
[Doctrine\DBAL\Driver\PDOException]
could not find driver
I then tried submitting the following in the hope it would fix the doctrine issue:
composer require doctrine/doctrine-fixtures-bundle
However this fed back the following:
Using version ^2.2 for doctrine/doctrine-fixtures-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-pdo_sqlite * is missing from your system.
Problem 2
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for sensiolabs/security-checker == 2.0.5.0 -> satisfiable by sensiolabs/security-checker[v2.0.5].
Installation failed, reverting ./composer.json to its original content.
Type into your terminal php -m. Do you see curl?
If not, it's not installed. Depending on your distro you might do:
RHEL/Centos:
yum install php5_curl
Ubuntu/Debian:
apt-get install php5_curl
If not found, try one of the following: php_curl, php-curl, php5_curl or php5-curl. Less frequently there is 56 instead of 5. You could simplify by searching for curl and then looking over the list.
Not sure about other distros, but it should be similar.
I'm using Behat,mink in my Symfony2 project,so I follow those tutorials to make installation :
http://extensions.behat.org/symfony2/ , http://extensions.behat.org/symfony2/migrating_from_2.3_to_2.4.html
but when I run this command php behat.phar --init "#YouBundleName",I get this very strange error :
PHP Warning: require(Behat\MinkExtension\Extension): failed to open stream: No such file or directory in phar:///var/www/project/behat.phar/src/Behat/Behat /Extension/ExtensionManager.php on line 112
PHP Fatal error: require(): Failed opening required 'Behat\MinkExtension\Extension' (include_path='.:/usr/share/php:/usr/share/pear') in phar:///var/www/project/behat.phar/src/Behat/Behat/Extension/ExtensionManager.php on line 112
I'm sure I installed the last version of behat and mink mentionned in the second link above and then I made php composer.phar unpdate and cache clear too,but still the same error?
I had the same problem. Forgot you need to install behat/mink-extension as well as behat/mink. For example you might need to run:
php composer.phar require behat/mink-extension:*
Worked for me.
By the way, looks like you got confused by the two installation methods, phar vs composer. I'd go with the composer route because it's easier to update and manage versions. This would mean running php bin/behat ... instead of php behat.phar ....