composer is not updateing dependancy with lumen - laravel

I am using php 5.6.12 version,
I have to compulsory use this version.
running command : composer update
it is showing me like below,
Loading composer repositories with package information
Updating dependencies (including require-dev)
It is showing this only this since long time, not updates any dependancy of my packages
my composer.json file package as below,
"require": {
"php": ">=5.5.9",
"laravel/lumen-framework": "5.2.*",
"vlucas/phpdotenv": "~2.2",
"google/apiclient": "^2.0",
"maatwebsite/excel": "~2.1.0",
"googleads/googleads-php-lib": "^32.1",
"aws/aws-sdk-php-laravel": "~3.0",
"baopham/dynamodb": "^4.11",
"laravelista/lumen-vendor-publish": "^2.1",
"jenssegers/mongodb": "3.2.*",
"php-imap/php-imap": "^3.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"phpunit/phpunit": "~5.0",
"mockery/mockery": "~0.9"
},
I have run composer update -vvv command , it gives me below error,
Reading ./composer.json
Loading config file ./composer.json
Checked CA file E:\xampp7\apache\bin\curl-ca-bundle.crt: valid
Executing command (E:\xampp563\htdocs\delrentals-dashboard-api): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: C:/Users/hetal.gohel/AppData/Roaming/Composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Running 1.7.2 (2018-08-16 16:57:12) with PHP 7.0.27 on Windows NT / 6.1
Loading composer repositories with package information
Downloading https://repo.packagist.org/packages.json
Writing C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2013.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2014.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2015.json from cache
Downloading http://repo.packagist.org/p/provider-2016%2421f5855cc4abf8648b47c77d76fee501bfc9fd4d893d6a602e8c8dbd0c4ea0ff.json
Writing C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2016.json into cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2017.json from cache
Downloading http://repo.packagist.org/p/provider-2018-01%24ebbeedf5cdf822efb5bb90b0b147c964df3e11e74d453bbdb6b04b537c180a7e.json
Writing C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-01.json into cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-04.json from cache
Downloading http://repo.packagist.org/p/provider-2018-07%240016a26f1005f0fb0be2f409b3fc05dde3132eb7694bc50e386e2a6be4802ee6.json
Writing C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-07.json into cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-10.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-archived.json from cache
Downloading http://repo.packagist.org/p/provider-latest%242eb9ff7604840d5f7b019a1d5770e987526594ecf1528f5fe6b613654914d5c4.json
......
I have create composer.json file with empty object "{}"
in location C:\Users\hetal.gohel\AppData\Roaming\Composer
Loading config file ./composer.json
Checked CA file E:\xampp7\apache\bin\curl-ca-bundle.crt: valid
Executing command (E:\xampp563\htdocs\delrentals-dashboard-api): git branch --no-color --no-abbrev -v
Reading C:/Users/hetal.gohel/AppData/Roaming/Composer/composer.json
Loading config file C:/Users/hetal.gohel/AppData/Roaming/Composer/composer.json
Running 1.7.2 (2018-08-16 16:57:12) with PHP 7.0.27 on Windows NT / 6.1
Loading composer repositories with package information
Downloading https://repo.packagist.org/packages.json
Writing C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2013.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2014.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2015.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2016.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2017.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-01.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-04.json from cache
Downloading http://repo.packagist.org/p/provider-2018-07%24456764a723221fb097b4ae41ef2ce7d91d1207de7b45ed8301c2e0bf1c55387e.json
Writing C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-07.json into cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-10.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-archived.json from cache
Downloading http://repo.packagist.org/p/provider-latest%245fb6a563ef29d0728dfbcf5cc60a8e56619893d5635943fb610b74eb55281719.json
Writing C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-latest.json into cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel$lumen.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel$lumen-framework.json from cache
Reading C:/Users/hetal.gohel/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$auth.json from cache
.....
It gives still error

Ok let me summarize.
Create a composer.json file in C:/Users/hetal.gohel/AppData/Roaming/Composer/composer.json. Just fill it with an empty json object {}. And then run composer update -vvv to see the update process in detail. Just wait until it's done. If the update process takes too long may be you should add the package dependency one by one.

Related

Error trying to publish config file of laravel-livewire?

Reading laravel-livewire docs at
https://laravel-livewire.com/docs/2.x/installation
I tried to publish The Config File and I got unexpected results
$ php artisan livewire:publish
Command "livewire:publish" is not defined.
Did you mean one of these?
livewire:configure-s3-upload-cleanup
livewire:copy
livewire:delete
livewire:discover
livewire:make
livewire:move
livewire:stubs
stub:publish
sweetalert:publish
vendor:publish
Why so and which command have I use to to publish config file ?
I have :
"laravel/framework": "^7.0",
"livewire/livewire": "^1.3",
Thanks!
You have installed
"livewire/livewire": "^1.3",
and are referring to version 2 documentation
https://laravel-livewire.com/docs/2.x/installation
Use liverwire version 2 or version 1 documentation instead.
In case others wonder, the line "livewire/livewire": "^1.3" can be found in require section of the composer.json file in the project's root directory.

How to use global composer.json when create project in Composer?

I have add the following config, and if I reqiure global package, all is Okey. Every packages will be installed from mirrors.aliyun.com
composer global config repo.packagist composer https://mirrors.aliyun.com/composer/
and content from ~/.composer/composer.json
{
"require": {
"laravel/installer": "^4.0",
"laravel/valet": "^2.11"
},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://mirrors.aliyun.com/composer/"
}
}
}
But if I create project with composer like this, I found package downloading from https://repo.packagist.org/packages.json
composer create-project --prefer-dist laravel/laravel sample.com -vvv
I need to download from mirror, but the config in global composer.json is ignored, anyone knows why is that?
Here is some related logs
Reading /Users/jack/.composer/composer.json
Loading config file /Users/jack/.composer/config.json
Loading config file /Users/jack/.composer/auth.json
Loading config file /Users/jack/.composer/composer.json
Loading config file /Users/jack/.composer/auth.json
Reading /Users/jack/.composer/auth.json
Reading /Users/jack/.composer/vendor/composer/installed.json
Creating a "laravel/laravel" project at "./sample.com"
Downloading https://repo.packagist.org/packages.json
UPDATE # 19:55
I add --repository parameter, then the laravel/laravel template is downloaded from mirror repository
composer create-project laravel/laravel sample.com --prefer-dist --repository=https://mirrors.aliyun.com/composer/ -vvv
But after downloading laravel/laravel, still download from Packagist, here are some related logs
Reading /Users/cuimingda/.composer/composer.json
Loading config file /Users/cuimingda/.composer/config.json
Loading config file /Users/cuimingda/.composer/auth.json
Loading config file /Users/cuimingda/.composer/composer.json
Loading config file /Users/cuimingda/.composer/auth.json
Reading /Users/cuimingda/.composer/auth.json
Reading /Users/cuimingda/.composer/vendor/composer/installed.json
Creating a "laravel/laravel" project at "./api.mingda.net"
Downloading https://mirrors.aliyun.com/composer/packages.json
Installing laravel/laravel (v7.25.0)
Created project in /Users/cuimingda/Sites/api.mingda.net
Reading ./composer.json
Reading /Users/cuimingda/.composer/composer.json
Loading config file /Users/cuimingda/.composer/config.json
Loading config file /Users/cuimingda/.composer/auth.json
Loading config file /Users/cuimingda/.composer/composer.json
Loading config file /Users/cuimingda/.composer/auth.json
Reading /Users/cuimingda/.composer/auth.json
Reading /Users/cuimingda/.composer/vendor/composer/installed.json
> post-root-package-install: #php -r "file_exists('.env') || copy('.env.example', '.env');"
Executing command (CWD): '/usr/local/Cellar/php/7.4.8/bin/php' -d allow_url_fopen='1' -d disable_functions='' -d memory_limit='1536M' -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Downloading https://repo.packagist.org/packages.json
I just found the answer myself.
DO NOT USE the follow methods to set mirror, because they will modify ~/.composer/composer.json, and composer.json will not work when create project
composer global config repo.packagist composer https://mirrors.aliyun.com/composer/
RIGHT WAY - Manually put the following code to ~/.composer/config.json, and whether composer global require or composer create-project, they all will fetch files from mirror site, not packagist.org
{
"config": {},
"repositories": [
{
"type": "composer",
"url": "https://mirrors.aliyun.com/composer/"
},
{
"packagist": false
}
]
}
There is no need to add any repositories related configto ~/.composer/composer.json
{
"require": {
"laravel/installer": "^4.0",
"laravel/valet": "^2.11"
}
}

Configure composer to get data from packagist.org via https

When building files in an environment that blocks outbound http requests, I get an error like:
Updating dependencies (including require-dev)
The "http://packagist.org/p/provider-2013%ahash.json" file could not be downloaded: failed to open stream: Connection timed out
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Is there some way to instruct composer to use https connection to packagist?
I've experienced the issue with both 1.2.0 and 1.6.5 versions of composer.
You can either force composer to use https by:
composer config -g repo.packagist composer https://packagist.org
Or you could set in your composer.json file:
"repositories": [
{
"type": "composer",
"url": "https://packagist.org"
},
{ "packagist": false }
]
Source: issue #5656 on composer's github repository.

Downloading: connection...Failed to download cartalyst/nested-sets from dist:

I'm having some problems with a package (cartalyst/nested-sets) on my local laravel application. My composer.json is valid as:
$ composer validate
./composer.json is valid
I have a copy of the nested-sets package files on my desktop and have included them in my project tree - so the files are present and paths are correct.
Here's a snapshot of my composer.json file:
"require": {
"cartalyst/nested-sets": "2.0.*"
},
"repositories": [
{
"type": "composer",
"url": "http://packages.cartalyst.com"
}
],
...
I then issue:
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing cartalyst/nested-sets (v2.0.2)
Downloading: connection...Failed to download cartalyst/nested-sets from dist: The "https://api.github.com/repos/cartalyst/nested-sets/zipball/7a425710ece922556e55150f5a1f2dfbedd4ffaa" file could not be downloaded (HTTP/1.1 404 Not Found)
Now trying to download from source
- Installing cartalyst/nested-sets (v2.0.2)
Cloning 7a425710ece922556e55150f5a1f2dfbedd4ffaa
It then just hangs with a blinking cursor at the shell. PHP OpenSSL extension is installed on my local and switching the firewall off makes no difference.
From the shell:
Failed to download cartalyst/nested-sets from dist: file could not be downloaded (HTTP/1.1 404 Not Found) but the files are already there? I don't understand.
You encounter this problem because you have to subscribe to Cartalyst repositories so you can get full access of their ressources and products ( libraries , components , sources ).
When Composer is trying to fetch Cartalyst from donwload or accessing a repository , it will ask you a valid username / password , if you have paid for a subscription you will get a valid auth credentials that enable you to access the repository and donwload via composer the required component / library ...
please read the following : https://medium.com/#Cartalyst/boss-sheet-8019c5e07246

Setting up alias for master branch in composer

I am trying to package a module for use with composer. I have a valid composer file and I am able to install it with composer, but only when I specify that it should use dev releases (via the "#dev" version directive or minimum stability dev). I am having trouble packaging my repo so that it is seen as a master release.
I found a composer document about aliases that seems to be made for my case, but I cant get it working. Heres the relevant portion of my composer.json:
"extra": {
"branch-alias": {
"dev-master": "1.0"
}
}
Also for reference heres the require from my main projects composer file:
"require": {
"misterglass/kohana-twig" : "1.*"
},
And the actual error from composer is:
Problem 1
- The requested package misterglass/kohana-twig 1.* could not be found.
According to some helpful people on the #composer IRC channel, aliases are just to associate different versions to each other, and not to assign stability.
In order to for composer to consider it stable, you need to add a tag, which you can do on the command line or by creating a release in github.

Resources