Symfony 2.8 - Ivory Google Maps Bundle - Unrecognized option “api_key” under “ivory_google_map” - google-maps

I have followed master documentation and tried to download it's version of bundle by running:
$ composer require egeloen/google-map-bundle
But unfortunatelly it downloaded 2.2 version of a bundle. I would think that this is correct version, but it is not. When I follow the documentation further I get an error in configuration after adding this to config.yml:
ivory_google_map:
api_key: "%api_key%"
Error says:
Unrecognized option “api_key” under “ivory_google_map”
Here creator says:
Let me explain your issue, when refering to https://github.com/egeloen/IvoryGoogleMapBundle/blob/master/Resources/doc/service/distance_matrix.md#api-key you're refering to dev-master doc whereas if you're using the 2.2.1 version, you should use: https://github.com/egeloen/IvoryGoogleMapBundle/blob/2.2.1/Resources/doc/usage/services/distance_matrix/distance_matrix.md
Unfortunatelly for you, the api key support has only been added on
master, so if you want to take benefit of it, you will need to
upgrade.
Okay so I am 100% sure that documentation installation I followed downloaded wrong version and I have to upgrade it. But how?
I tried running:
$ composer require egeloen/google-map-bundle dev-master
And I got an error:
Problem 1
- Installation request for egeloen/google-map-bundle dev-master -> satisfiable by egeloen/google-map-bundle[dev-master].
- egeloen/google-map-bundle dev-master requires egeloen/google-map ^2.0#dev -> satisfiable by egeloen/google-map[2.0.x-dev] but these conflict with your requirements or minimum-stability.
^2.0#dev does not solve my problem either. Please can anyone help? I cannot find any articles according this problem.

Composer has an option called minimum-stability that is set by default to stable. This means that when you run composer install or composer update, composer will only accept properly tagged versions.
If you want to use the dev-master of a vendor, you will have to set the minimum-stability option to dev in your composer.json :
{
"name": "myproject",
...
"require": {
...
},
"require-dev": {
...
},
"minimum-stability": "dev",
...
}
Be aware that this could lead to non-stable versions of vendors being installed in your project, so this is to avoid when you can. You can also prevent this by setting the version of your vendors to be sure a specific tag will be used, but then you would have to check your vendors update manually.

Related

Composer init (new project) Aborted with Symfony RuntimeException

In a new folder completely empty :
composer init
i have :
Welcome to the Composer config generator
This command will guide you through creating your composer.json config.
Package name (<vendor>/<name>) [slordef/test-composer]:
[Symfony\Component\Console\Exception\RuntimeException]
Aborted
init [--name NAME] [--description DESCRIPTION] [--author AUTHOR] [--type [TYPE]] [--homepage HOMEPAGE] [--require REQUIRE] [--require-dev REQUIRE-DEV] [-s|--stability STABILITY] [-l|--license LICENSE] [--repository REPOSITORY]
Composer is up to date...
Dont know how it append
This is probably a problem with PHP version 7.4, had to switch to version 7.3 to make it work
by running :
composer init -vvv
get :
Exception trace:
() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:148
Symfony\Component\Console\Helper\QuestionHelper->doAsk() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:75
Symfony\Component\Console\Helper\QuestionHelper->Symfony\Component\Console\Helper{closure}() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:404
Symfony\Component\Console\Helper\QuestionHelper->validateAttempts() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:78
Symfony\Component\Console\Helper\QuestionHelper->ask() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/IO/ConsoleIO.php:291
Composer\IO\ConsoleIO->askAndValidate() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/InitCommand.php:240
Composer\Command\InitCommand->interact() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:230
Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:835
Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:185
Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:267
Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:106
Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:61
require() at C:\ProgramData\ComposerSetup\bin\composer.phar:24
i had the same bug, but I after all I realized that it happens in the last version of php. Example: I am now using PHP 7.4 but when I switched to PHP 7.3.12 the bug was solved! So I could dare saying that for that specific bug the first thing to check is the version of PHP you're using whether is it stable of not..
Uninstall and reinstall Composer. Note that when installing, set php version 7.0. * To environment variables. So your problem will be solved

Cannot Upgrade Yii2 Version Via Composer

I'm trying to update my yii2-basic app version because of what I think is its incompatibility with my new XAMPP (PHP 7.4.1).
This is how I did it:
composer self-update
composer global require "fxp/composer-asset-plugin:^1.4.1" --no-plugins
composer require "yiisoft/yii2:~2.0.14" --update-with-dependencies
This is how it shows in command window:
./composer.json has been updated
The "extra.asset-installer-paths" option is deprecated, use the "config.fxp-asset.installer-paths" option
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
- Conclusion: remove phpunit/phpunit 5.7.x-dev
- Conclusion: remove sebastian/recursion-context 3.0.x-dev
- Installation request for phpunit/phpunit (locked at 5.7.x-dev) -> satisfiable by phpunit/phpunit[5.7.x-dev].
- Conclusion: don't install sebastian/recursion-context 3.0.x-dev
- phpunit/phpunit 5.7.x-dev requires sebastian/object-enumerator ~2.0 -> satisfiable by sebastian/object-enumerator[2.0.0, 2.0.1, 2.0.x-dev].
- sebastian/object-enumerator 2.0.0 requires sebastian/recursion-context ~2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- sebastian/object-enumerator 2.0.1 requires sebastian/recursion-context ~2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- sebastian/object-enumerator 2.0.x-dev requires sebastian/recursion-context ^2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- Can only install one of: sebastian/recursion-context[2.0.0, 3.0.x-dev].
- Can only install one of: sebastian/recursion-context[2.0.x-dev, 3.0.x-dev].
- Installation request for sebastian/recursion-context (locked at 3.0.x-dev) -> satisfiable by sebastian/recursion-context[3.0.x-dev].
Installation failed, reverting ./composer.json to its original content.
I tried these lines too but none of them worked:
composer require "yiisoft/yii2:2.0.14" --update-with-dependencies
composer require "yiisoft/yii2:~2.0.14"
Simply update your composer.json like this:
....
"require": {
"php": ">=5.6.0",
"yiisoft/yii2": "~2.0.14",
....
"require-dev": {
"codeception/codeception": "*",
We change the version of Yii2 minimum at 2.0.14 and yii2-codeception directly to codeception.
And don't forget to update you bower and npm asset config to newer composer configuration. Newer configuration looks like this.
"config": {
"vendor-dir": "vendor",
"process-timeout": 1800,
"fxp-asset":{
"installer-paths": {
"npm-asset-library": "_protected/vendor/npm",
"bower-asset-library": "_protected/vendor/bower"
}
}
},
and delete "asset-installer-paths" in "extra" parameter.
I found the solution.
I update the yii2 app by editing composer.json file, then running composer update on my command line.
Then somehow it worked.

How to solve kartik\dialog\Dialog not found in yii2?

I can run controller in development correctly but I facing error kartik\dialog\Dialog not found in production
like thise picture
Why this thing happen?
How I can check it? in Vendor folder maybe.
and How to solve it?
Here is my composer.json
{
"name": "vendor/myweb",
"description": "Description of project myweb.",
"authors": [
{
"name": "Administrator",
"email": "developer1#myweb.com"
}
],
"require": {
"kartik-v/yii2-dialog": "*"
}
}
Thanks in advance.
Check in vendor for this, if it does not exist, go to point 2.
Add this line to require section in project-directory/composer.json file
"kartik-v/yii2-dialog": "*"
Then run in project directory command:
composer update
I hope you found the answer by now !
IF NOT:
I have struggled with this problem long enough to feel desperate :)
here's what I ended up doing:
1- install Dialog using composer : composer.phar require kartik-v/yii2-export "*
if it gives these errores :
Problem 1
- kartik-v/yii2-dialog dev-master requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog v1.0.1 requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog v1.0.0 requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog 1.0.x-dev requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- Installation request for kartik-v/yii2-dialog #dev -> satisfiable by kartik-v/yii2-dialog[dev-master, 1.0.x-dev, v1.0.0, v1.0.1].
You need to run this command: composer global require "fxp/composer-asset-plugin:^1.2.0"
it rebuild dependencies and set jquery libraries to match with the ones required by Kartik Dialog. Good luck

unable to install nex/yii2-chosen extension

I am unable to install nex/yii2-chosen extension in my project using composer please.
My composer shows :
C:\xampp\htdocs\labplus>composer require nex/yii2-chosen Deprecation
Notice: The Composer\Package\LinkConstraint\MultiConstraint class is
deprecated, use Composer\Semver\Constraint\MultiConstraint instead. in
phar://C
:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/LinkConstrain
t/MultiConstraint.php:17 Deprecation Notice: The
Composer\Package\LinkConstraint\LinkConstraintInterface interface is
deprecated, use Composer\Semver\Constraint\ConstraintInterface inst
ead. in
phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Packa
ge/LinkConstraint/LinkConstraintInterface.php:17 Failed to decode
response: zlib_decode(): data error Retrying with degraded mode, check
https://getcomposer.org/doc/articles/troubles hooting.md#degraded-mode
for more info Using version dev-master for nex/yii2-chosen
./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 package dbtek/chosen-bootstrap could not be found in any ver sion, there may be a typo in the package name. Problem 2
- The requested package nex/yii-chosen could not be found in any version, th ere may be a typo in the package name.
Installation failed, reverting ./composer.json to its original
content.
see the cmd snap for more

Why rasqal configuration can't recognize the already raptor library on cygwin?

I am trying to install rasqal 0.9.20 library http://librdf.org/rasqal/ onto a windows 7 machine with cygwin.Earlier i have successfully installed the raptor-2.2.0 library http://librdf.org/raptor/ and i can verify this with the rapper tool was created after the installation(./configure , ./make ,/make install)
The error that i am getting from the configuration of rasqal is :
./configure --enable-raptor2
...
checking for raptor... configure: error: Raptor2 is not installed - see http://librdf.org/raptor/ to get a version newer than 1.9.0
I can't find a way to fix it. The code from the cofigure file that handles this flag is the below :
11840 # raptor is REQUIRED despite the checking here
11841 RAPTOR_MIN_VERSION=1.4.19
11842 RAPTOR_MAX_VERSION=1.8.99
11843 RAPTOR2_MIN_VERSION=1.9.0
11844
11845 raptor2=no
11846 # Check whether --enable-raptor2 was given.
11847 if test "${enable_raptor2+set}" = set; then :
11848 enableval=$enable_raptor2; raptor2="$enableval"
11849 else
11850 raptor2="no"
11851 fi
Raptor 2.0.0 uses only pkg-config to provide configuration information, raptor-config was removed. The same applies to rasqal itself, the rasqal-config program will go away at some point. The --enable-raptor2 option to rasqal and librdf was for testing the beta raptor2, and it has been removed from rasqal 0.9.22 and librdf GIT head.
Set PKG_CONFIG_PATH to include the correct path:
env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure
Another method, if available on your system, is to define the environment variable in /etc/environment:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig