I am trying to install package library by composer in YII2. But after running the command from my command prompt I am getting following error
My composer command is
composer.phar require kartik-v/yii2-widget-datetimepicker "*"
Package yiisoft/yii2-codeception is abandoned, you should avoid using it. Use codeception/codeception instead.
When installing by this command
php composer.phar require kartik-v/yii2-social "#dev"
Then I am getting following error
Package facebook/php-sdk-v4 is abandoned, you should avoid using it. Use facebook/graph-sdk instead.
Generating autoload files
Please suggest me how can I resolve this error
This is not an error. This is just an information for you from composer that one of the required packages has been abandoned and you should not expect to get updates for it.
If you want to get rid of this information simply remove the mentioned packages from the composer.json file of your project.
If the package is not listed there it means that one of the required packages listed needs it as dependency so you can not remove it directly.
As for the Yii 2 - here is the current advanced project template's composer.json so you can update the one in your project - package yiisoft/yii2-codeception is no longer used.
Related
I did not use the sudo when installing doctrine in symfony
So this is what i got..
The "https://flex.symfony.com/aliases.json" file could not be downloaded: failed to open stream: Connection refused https://flex.symfony.com/aliases.json could not be fully loaded, package information was loaded from the local cache and may be out of date
to fix that i did this curl -XGET https://flex.symfony.com/aliases.json
and then i installed composer require symfony/orm-pack composer require --dev symfony/maker-bundle
The problem is that it wont add any db config in the env file....
and when i do the composer require doctrine
i get this
Pontuss-MacBook-Air:cauldron_overflow Pontus$ composer require doctrine
Using version ^1.0 for symfony/orm-pack
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.4.*"
Nothing to install or update
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Generating autoload files
34 packages you are using are looking for funding.
Use thecomposer fundcommand to find out more!
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [OK]
Executing script assets:install public [OK]
Executing script security-checker security:check [OK]
So why wont it add the correct data to my env files?
Please any advice
When you install a recipe it installs some sample data to your .env.dist file.
This is only for the first run when you install the recipe. After the install you can do what you want and remove that variables and use it from your Docker for example. So perhaps i don't understood your problem because you wrote that you don't want db config in your env file and in the last line you write that it won't add it.
https://symfony.com/doc/current/configuration.html
I know you use flex but there are some good examples how to use and how to do it. Flex should use the DotEnv-Component.
The last thing is your error (https://flex.symfony.com/aliases.json). I think you have firewall that blocks the load of the aliases file. So you have to check that first. That call should work if you run it in your browser or with curl. Otherwise it could give a problem to load all components.
I solved the issue by removing doctrine and reinstall the package :) and now the env file looks like it should :)
I'm trying to add the "cedarmaps-php-sdk" composer package to my Laravel project
the package can be found here: https://github.com/cedarstudios/cedarmaps-php-sdk
I have successfully installed the package using
composer install
&
composer update
The problem is when I want to use the 'CedarMaps' I get the error:
"main(): Failed opening required 'vendor/autoload.php' (include_path='C:\xampp\php\PEAR')" *image
for now, I'have manually bypassed this problem by changing
require('vendor/autoload.php');
to
require('../vendor/autoload.php');
in the below file (the repository file)
vendor/cedarmaps/cedarmaps-php-sdk/src/CedarMaps.php
am I doing anything wrong?
+++++++++++++++++++++++++++++++++
Let me ask a question: Was that necessary for this package to require autoload.php itself
, I mean doesn't composer handle this autoloading for all packages automatically?
You need to use composer require 'package name' to install a package to your existing project then do a composer dump-autoload.
I'm trying to use https://github.com/consolibyte/quickbooks-php in a Drupal 8 project. I think I've followed composer ways of adding it:
composer config repositories.quickbooks-php vcs https://github.com/consolibyte/quickbooks-php
composer require "consolibyte/quickbooks-php master"
But the 2nd command returns "Could not find package consolibyte/quickbooks-php".
Any ideas what I'm doing wrong?
You're using incorrect package name - real package name is defined in composer.json of this package and it is consolibyte/quickbooks instead of consolibyte/quickbooks-php.
composer require "consolibyte/quickbooks:dev-master"
Also this package is registered at Packagist, so you don't need to add repository for it. See https://packagist.org/packages/consolibyte/quickbooks
I am currently trying to run on Vagrant/Homestead a Laravel Application that I pulled from Github. I connected it to the database, and run Composer Install, Composer Update inside the folder. When I try to access to it on the Browser I get the following error:
Warning: require(/home/vagrant/.../public/vendor/autoload.php): failed to open stream: No such file or directory in /home/vagrant/..../public/autoload.php on line 2
I navigated to the vendor folder and noticed that it was not created. Any ideas how to fix it?
The application runs in Laravel 4, and I got the following output from the terminal when I run Composer Install:
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package herrera-io/json is abandoned, you should avoid using it. Use kherge/json instead.
Package kherge/version is abandoned, you should avoid using it. No replacement was suggested.
Package herrera-io/phar-update is abandoned, you should avoid using it. No replacement was suggested.
Package mjolnic/bootstrap-colorpicker is abandoned, you should avoid using it. Use itsjavi/bootstrap-colorpicker instead.
Generating autoload files
php artisan clear-compiled
php artisan optimize
Generating optimized class loader
Any ideas?
Composer needs to be run from the root of your application, i.e. not from the public folder as your error seems to indicate.
You can first try running:
composer install --no-scripts
This command should list the packages that are being downloaded and installed. If the above works, you can then run:
php artisan optimize
This will create the autoload.php file that Laravel will use.
I also experienced that, i solved the problem by creating a vendor/bin folder inside the Composer directory.
$PATH/users/*-system_name-*/AppData/Roaming/Composer
I got the same problem, some answer are valid but didnt help then i tried a command = composer dump-autoload. Then it works fine. HOPE this helps you the best.
I executed these 2 commands:
composer require realrashid/sweet-alert
composer require infinety/alerts *#dev
They are packages to use SweetAlert on Laravel but they are not working and I found a better one, I want to remove them, when I do composer remove vendor/realrashid or composer remove vendor/infinety it say that the package is not installed and is not required in my composer.json, so It has not been removed but the package is still here..
No need to use vendor. Just composer remove realrashid/sweet-alert.
Another way is to go to your composer.json file and then remove that certain package then recall the 'composer update' method. Since composer remove will completely remove the library to your composer cache because you might using that library to other projects so when you try to composer install again that library, composer will download that package again instead of checking the composer cache memory.
you have to run this command in your terminal: composer remove vendor/package_name