These are chat archives for composer/composer

14th
Jul 2016
ghalenir
@ghalenir
Jul 14 2016 20:01
I am trying to update drupal 8 core through the core but its not working
Anybody has any idea ?
Ben Johnson
@mmic-bjohnson
Jul 14 2016 20:16
@ghalenir Please show us the specific commands you're using, and more importantly, the resultant error messages. Use composer -vvv ....
ghalenir
@ghalenir
Jul 14 2016 20:31
composer update drupal/core
and the error is
Package "drupal/core" listed for update is not installed. Ignoring
This message was deleted
@mmic-bjohnson
@mmic-bjohnson or is there any other specif command to update drupal core
ghalenir
@ghalenir
Jul 14 2016 20:45
Composer version 1.1.2
Ben Johnson
@mmic-bjohnson
Jul 14 2016 20:47
@ghalenir Are you sure that the library is actually installed? What happens if you do composer require drupal/core?
It's also possible that your installed.json is missing.
(for whatever reason)
That's how Composer determines what's installed and what's not.
ghalenir
@ghalenir
Jul 14 2016 20:48

```composer require drupal/core
Using version ^8.1 for drupal/core
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files

Drupal\Core\Composer\Composer::preAutoloadDump
Drupal\Core\Composer\Composer::ensureHtaccess```

inside the root folder there is composer.json file
Ben Johnson
@mmic-bjohnson
Jul 14 2016 20:49
Okay, and now if you do composer update?
ghalenir
@ghalenir
Jul 14 2016 20:49
yes waiting

`composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

Drupal\Core\Composer\Composer::preAutoloadDump
Drupal\Core\Composer\Composer::ensureHtaccess`

its not working
current release is 8.1.6
Do I need to change in composer.json file ?
Ben Johnson
@mmic-bjohnson
Jul 14 2016 20:52
What does composer -i show say?
(for that library)
Yes, it's possible that you need to adjust the version constraint in composer.json.
ghalenir
@ghalenir
Jul 14 2016 20:53
I can see all the libraries when I run composer -i show
Ben Johnson
@mmic-bjohnson
Jul 14 2016 20:53
Yep, and what's the version for drupal/core?
It looks like the version constraint in composer.json is set to ^8.1, which should include 8.1.6.
ghalenir
@ghalenir
Jul 14 2016 20:54
yes chaning that
Ben Johnson
@mmic-bjohnson
Jul 14 2016 20:54
^8.1 should include everything up to (but not including) 9.0.
So, that value seems fine.
ghalenir
@ghalenir
Jul 14 2016 20:55
ok so nothing is happening
its not really updating drupal core
Ben Johnson
@mmic-bjohnson
Jul 14 2016 20:56
You never said what the version is when you do composer -i show drupal/core
ghalenir
@ghalenir
Jul 14 2016 20:57

composer -i show drupal/core
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.

[InvalidArgumentException]
Package drupal/core not found

show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [-D|--direct] [--] [<package>] [<version>]

I also tried this

composer require drupal/core
Using version ^8.1 for drupal/core
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files

Drupal\Core\Composer\Composer::preAutoloadDump
Drupal\Core\Composer\Composer::ensureHtaccess

Ben Johnson
@mmic-bjohnson
Jul 14 2016 21:00
Weird. What happens if you composer install?
ghalenir
@ghalenir
Jul 14 2016 21:01

composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

Drupal\Core\Composer\Composer::preAutoloadDump
Drupal\Core\Composer\Composer::ensureHtaccess

Ben Johnson
@mmic-bjohnson
Jul 14 2016 21:02
Something seems jacked-up here.
ghalenir
@ghalenir
Jul 14 2016 21:02

composer -vvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /private/var/folders/3g/pbdvtjys0d79rfz4cm8mt31mdysdqg/T/composer-cacert-bcf331364fef73d53e4368ba519a6c3fcb21ea7836c3d8efad4ec32731e8152a.pem: valid
Executing command (/Users/nirod.ghale/Sites/d8): git branch --no-color --no-abbrev -v
Executing command (/Users/nirod.ghale/Sites/d8): git describe --exact-match --tags
Failed to initialize global composer: Composer could not find the config file: /Users/nirod.ghale/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /Users/nirod.ghale/Sites/d8/vendor/composer/installed.json
Loading plugin Wikimedia\Composer\MergePlugin
Loading plugin Composer\Installers\Plugin
Running 1.1.3 (2016-06-26 15:42:08) with PHP 5.6.10 on Darwin / 14.5.0


/ _/ _ _
/ / / \/ ` \/ \/ \/ _/ \/ /
/ // // / / / / / / // / // ( ) / /
__
/_// /_/ // ./_/_/__//
/_/
Composer version 1.1.3 2016-06-26 15:42:08

Ben Johnson
@mmic-bjohnson
Jul 14 2016 21:02
It tells you very plainly
Using version ^8.1 for drupal/core
./composer.json has been updated
ghalenir
@ghalenir
Jul 14 2016 21:03
looks like I need to install composer globally
Ben Johnson
@mmic-bjohnson
Jul 14 2016 21:03
Perhaps... worth a try, as it only takes a second.
I always install globally, myself.
ghalenir
@ghalenir
Jul 14 2016 21:04
how can I do that
via homebrew ?
Not a homebrew expert myself, so not sure... but I would expect that you can simply follow those instructions.
It's just a phar file (PHP archive), and you can place it anywhere.
Instructions look the same for Mac OS and Linux.
Gotta make the commute, but will check in shortly. :)
ghalenir
@ghalenir
Jul 14 2016 21:18
there is nothing wrong with the composer but still its not download latest version of drupal 8 core
Rob
@alcohol
Jul 14 2016 21:21
pls dont use homebrew :<
@ghalenir looks good to me
ghalenir
@ghalenir
Jul 14 2016 21:22
:smile: but its not updating drupal 8 core
Rob
@alcohol
Jul 14 2016 21:22
says who
ghalenir
@ghalenir
Jul 14 2016 21:23
This message was deleted
Rob
@alcohol
Jul 14 2016 21:23
i dont know what this is
ghalenir
@ghalenir
Jul 14 2016 21:24
I mean right now the drupal 8 core is 8.1.6
Rob
@alcohol
Jul 14 2016 21:24
ok
ghalenir
@ghalenir
Jul 14 2016 21:24
but my local is 8.1.2
Rob
@alcohol
Jul 14 2016 21:24
ok
and what did you do to try and update it?
ghalenir
@ghalenir
Jul 14 2016 21:24
so I am just trying to update drupal 8 core
composer require drupal/core
Rob
@alcohol
Jul 14 2016 21:25
no
composer update drupal/core
ghalenir
@ghalenir
Jul 14 2016 21:25
I tried that too
Rob
@alcohol
Jul 14 2016 21:25
ok
next attempt
composer update drupal/core --with-dependencies
This is the result
Rob
@alcohol
Jul 14 2016 21:26
that doesnt have the flag i told you to use
ghalenir
@ghalenir
Jul 14 2016 21:26
ok running that command now
Rob
@alcohol
Jul 14 2016 21:27
it could be 8.1.6 has new requirements that you need to fulfil
update normally only allows updating the package you whitelist
not other dependencies
unless you specify that flag
ghalenir
@ghalenir
Jul 14 2016 21:28
I don’t know I have been trying to update Drupal 8 core for a month
Rob
@alcohol
Jul 14 2016 21:28
what does the command i gave you return?
ghalenir
@ghalenir
Jul 14 2016 21:28
none of the website has clear documentation
Rob
@alcohol
Jul 14 2016 21:29
can you give me the full output of composer show ?
Drupal core is not in the list
Rob
@alcohol
Jul 14 2016 21:31
ugh
drupal is not on github
ghalenir
@ghalenir
Jul 14 2016 21:31
You mean the core ?
Rob
@alcohol
Jul 14 2016 21:31
ah
monorepo
that explains it
ghalenir
@ghalenir
Jul 14 2016 21:32
so how do we fix that
Rob
@alcohol
Jul 14 2016 21:32
i dont understand why it doesnt show in the list
i think your application is completely broken lol
ghalenir
@ghalenir
Jul 14 2016 21:33
I haven’t changed anything in the composer.json file
Rob
@alcohol
Jul 14 2016 21:33
can you share your composer.json ?
oooo
i dont think installing that has any purpose D:
ghalenir
@ghalenir
Jul 14 2016 21:34
here is the file
Rob
@alcohol
Jul 14 2016 21:34
oh god
pls no attachment
im not opening that
Rob
@alcohol
Jul 14 2016 21:35
yeah i just saw
ghalenir
@ghalenir
Jul 14 2016 21:35
this is my local composer.json file
Rob
@alcohol
Jul 14 2016 21:35
they use their own installers
sorry
you have to ask them how to update
this is not a composer issue
ghalenir
@ghalenir
Jul 14 2016 21:36
Can you please file an issue
Rob
@alcohol
Jul 14 2016 21:36
no
ghalenir
@ghalenir
Jul 14 2016 21:37
is there any alternavite way to update drupal 8 core ?
Rob
@alcohol
Jul 14 2016 21:37
ask drupal :)
ghalenir
@ghalenir
Jul 14 2016 21:37
looks like it will not work through composer
I will ask but someone has to say from composer side that
Rob
@alcohol
Jul 14 2016 21:38
i just did
ghalenir
@ghalenir
Jul 14 2016 21:38
updating drupal core 8 is not working from composer
Did you create an issue on the drupal.org ?
Rob
@alcohol
Jul 14 2016 21:39
no
ghalenir
@ghalenir
Jul 14 2016 21:41
Can you please communicat with the “Drupal Core team” that they need to change something in order to make composer work
or is there a quick way that I can change in the composer.json file and make it work
Ben Johnson
@cbj4074
Jul 14 2016 21:54
@ghalenir Rob's point seems to be that this has nothing to do with Composer. It has to do with Drupal doing things their own way. Why don't you open an issue with Drupal?
As a last resort, you can try trashing your vendor directory, recreating it (and the composer directory inside it), then composer cache-clear, drop the composer.json from https://github.com/drupal/drupal/blob/8.2.x/composer.json into your project root, and then try composer install.
The Drupal installation page says absolutely nothing about using Composer to install or update.
ghalenir
@ghalenir
Jul 14 2016 21:57
ok let me try this
Ben Johnson
@cbj4074
Jul 14 2016 21:57
If that doesn't work, you will need to seek support from Drupal, unfortunately.
ghalenir
@ghalenir
Jul 14 2016 22:03
thanks both
I will reach out to Drupal team
Ben Johnson
@cbj4074
Jul 14 2016 22:06
@ghalenir No problem, please do let us know what you discover, so we can tell anyone else who has the same issue.