<p>So, not all hosts allow just using <code>composer</code> and impose to use <code>php composer.phar</code>.</p>

<p>Knowing that, I can now answer my two questions:</p>

<ol>
<li><p>When installing Craft using <code>php composer.phar create-project -s RC craftcms/craft $HOME/craft</code>, the <code>-s</code> switch is just telling which branch of the source project to use. Here, <code>RC</code> stands for <code>Release Candidate</code>. Before that, we had to use <code>-s BETA</code> in order to install the betas. Something I didn't knew since I waited for the RC to jump in Craft 3 and start over from Craft 2.</p></li>
<li><p>When you want to update using <code>php composer.Phar</code>, you need to go inside your project folder (where you installed Craft; <code>craft</code> for me which means once logged I had to <code>cd craft</code>) and then type <code>php ../composer.phar update</code>, where <code>../composer.phar</code> tells to go looking for Composer from the parent folder.</p></li>
</ol>

<p>I am ashamed not having thought of that; I really need to stop overthinking things.</p>

CC BY-SA 3.0
2018-01-03T18:54:35.493Z
Thanks for the follow up and no need to be ashamed!
Brad Bell
CC BY-SA 3.0
2018-01-03T11:32:15.423Z
2018-01-04T21:01:33.193Z
2018-01-04T21:01:33.193Z
Braintrash
<p>I have a problem when updating with Composer.</p>

<p>My installation command line was this one:</p>

<pre><code>php composer.phar create-project -s RC craftcms/craft $HOME/craft
</code></pre>

<p>As such, I tried to update, as per Ryan from Mijingo instructions:</p>

<pre><code>php composer.phar update craftcms/craft
</code></pre>

<p>But I ended up with the following error:</p>

<pre><code>Composer could not find a composer.json file in /home/me
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
</code></pre>

<p>I checked, <code>composer.json</code> and <code>composer.lock</code> are in the <code>craft</code> directory, as expected.</p>

<p>After looking through Composer <code>man</code> page and web docs, I am still clueless, as I haven't found what <code>-s RC</code> are used for in the installation command. I believe understanding these (this?) switches is probably the key, but I rather ask here than making a mistake and blowing the otherwise perfectly working install. ^^</p>

<p>As for the CP, it doesn't work either, but that is not a surprise given the command line didn't and that I am using the <code>php composer.phar</code> method rather than the sole <code>composer</code> one.</p>

CC BY-SA 3.0
2018-01-03T10:52:46.550Z
Why don't you just use `composer update` in your `craft` directory where your `composer.json` file is? You can install it with `php composer.phar create-project -s RC craftcms/craft $HOME/craft` but you should still be able to update with the normal composer. Are there certain reasons why you don't want to do it?
Robin Schambach
CC BY-SA 3.0
2018-01-03T10:58:51.987Z
Because when I run 'php composer.phar' from the 'craft' directory, I get this:

    Could not open input file: composer.phar
Braintrash
CC BY-SA 3.0
2018-01-03T11:00:13.487Z
That's why you should do `composer update` not `php composer.phar`
Robin Schambach
CC BY-SA 3.0
2018-01-03T11:14:47.557Z
'composer: command not found'
Braintrash
CC BY-SA 3.0
2018-01-03T11:18:33.013Z
Then - if you don't mind - installing the required package might be a good idea. If you have Windows https://getcomposer.org/doc/00-intro.md#installation-windows click on the download link and install it. Do you have a valid composer.json in your craft directory?
Robin Schambach
CC BY-SA 3.0
2018-01-03T11:22:39.070Z
Progress: '-s RC' is just telling what source using during project installation: '-s' is for telling Composer the source and 'RC' is to point to the Release Candidate branch.
Braintrash
<craft3><updating><composer>
Updating Craft 3 from RC3 to RC4 through Composer
# Updating Craft 3 from RC3 to RC4 through Composer

(Asked by: username_0 on 2018-01-03)

I have a problem when updating with Composer.
My installation command line was this one:
php composer.phar create-project -s RC craftcms/craft $HOME/craft

As such, I tried to update, as per Ryan from Mijingo instructions:
php composer.phar update craftcms/craft

But I ended up with the following error:
Composer could not find a composer.json file in /home/me
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

I checked, composer.json and composer.lock are in the craft directory, as expected.
After looking through Composer man page and web docs, I am still clueless, as I haven't found what -s RC are used for in the installation command. I believe understanding these (this?) switches is probably the key, but I rather ask here than making a mistake and blowing the otherwise perfectly working install. ^^
As for the CP, it doesn't work either, but that is not a surprise given the command line didn't and that I am using the php composer.phar method rather than the sole composer one.

**Tags:** craft3, updating, composer

> **Comments:**
> **username_1**: Why don't you just use `composer update` in your `craft` directory where your `composer.json` file is? You can install it with `php composer.phar create-project -s RC craftcms/craft $HOME/craft` but you should still be able to update with the normal composer. Are there certain reasons why you don't want to do it?  
> **username_0**: Because when I run 'php composer.phar' from the 'craft' directory, I get this:      Could not open input file: composer.phar  
> **username_1**: That's why you should do `composer update` not `php composer.phar`  
> **username_0**: 'composer: command not found'  
> **username_1**: Then - if you don't mind - installing the required package might be a good idea. If you have Windows https://getcomposer.org/doc/00-intro.md#installation-windows click on the download link and install it. Do you have a valid composer.json in your craft directory?  
> **username_0**: Progress: '-s RC' is just telling what source using during project installation: '-s' is for telling Composer the source and 'RC' is to point to the Release Candidate branch.  

---

## 1 answers

### Answer by username_0 on 2018-01-03. Score: 1

So, not all hosts allow just using `composer` and impose to use `php composer.phar`.

Knowing that, I can now answer my two questions:

1. When installing Craft using `php composer.phar create-project -s RC craftcms/craft $HOME/craft`, the `-s` switch is just telling which branch of the source project to use. Here, `RC` stands for `Release Candidate`. Before that, we had to use `-s BETA` in order to install the betas. Something I didn't knew since I waited for the RC to jump in Craft 3 and start over from Craft 2.
2. When you want to update using `php composer.Phar`, you need to go inside your project folder (where you installed Craft; `craft` for me which means once logged I had to `cd craft`) and then type `php ../composer.phar update`, where `../composer.phar` tells to go looking for Composer from the parent folder.

I am ashamed not having thought of that; I really need to stop overthinking things.

> **Comments:**
> **username_2**: Thanks for the follow up and no need to be ashamed!  

---

