Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot just run php composer.phar update #7923

Closed
AndersBillLinden opened this issue May 17, 2015 · 15 comments
Closed

Cannot just run php composer.phar update #7923

AndersBillLinden opened this issue May 17, 2015 · 15 comments
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it.
Milestone

Comments

@AndersBillLinden
Copy link
Contributor

In windows 7, using wampserver, I installed composer with the link I had been given in the error page that I get when I try access the /piwik web page the first time.

Here I can read that after the composer installation, I should run php composer.phar update.
This will initialize composer for Piwik and download libraries we use in vendor/* directory.

After the installation of composer, I confirmed that C:\ProgramData\ComposerSetup\bin had been added to the path. Then I launched a console window running the mentioned command.

Expected result: Composer should be initialized for piwik and libraries should be downloaded.
Actual result: I got the error message Could not open input file: composer.phar.

If I specify the full path to the phar file like this: php C:\ProgramData\ComposerSetup\bin\composer.phar update, composer seem to initialize although the output ends with 'misc' is not recognized as an internal or external command, operable program or batch file..

If I am supposed to write the longer command, it could be stated on that error page that the shorter form is insufficient.

What about a line of information about what composer really is? I can read that it is "not yet installed". I understand from that sentense that I will require composer in one way or another, but will it do? That however is outside the scope of this issue.

Another point of view I am having, also outside the scope of this issue, is that the composer installation could be simplier if it was semi automatic. In that error page, there could be a button which I just can click to install composer. When the hour glass from clicking that button dissapears, the webpage will now read "composer was successfully installed, now lets check the rest of your system".

@mattab
Copy link
Member

mattab commented May 19, 2015

Hi @AndersBillLinden thanks for the suggestion.

  • We could tweak the message for windows users as you suggest, but I'm not sure whether we can detect the path to composer automatically. Alternatively what I can recommend is to use Piwik from the ZIP package which does not require composer: http://builds.piwik.org/

@AndersBillLinden
Copy link
Contributor Author

I was running it from git.

@mnapoli
Copy link
Contributor

mnapoli commented May 19, 2015

Composer update should not be used, it should be composer install. @AndersBillLinden could you link where you read these instructions we might need to fix them?

@AndersBillLinden
Copy link
Contributor Author

I have managed to run piwik by only initiating composer with "composer update". The instruction can be found in core/testMinimumPhpVersion.php. Search for php composer.phar update.

@mnapoli
Copy link
Contributor

mnapoli commented May 20, 2015

Thank you I have updated the instructions in 3fcccc2

@mnapoli mnapoli added the answered For when a question was asked and we referred to forum or answered it. label May 20, 2015
@mnapoli mnapoli closed this as completed May 20, 2015
@mnapoli mnapoli self-assigned this May 20, 2015
@mnapoli mnapoli added this to the 2.14.0 milestone May 20, 2015
@AndersBillLinden
Copy link
Contributor Author

So describing what composer is will not be needed? Or how to write the command for windows? (You need to specify the full path to composer.phar).

@mnapoli
Copy link
Contributor

mnapoli commented May 20, 2015

Ah sorry I was into that update/install thing and closed too fast.

@mnapoli mnapoli reopened this May 20, 2015
@mnapoli
Copy link
Contributor

mnapoli commented May 21, 2015

I think this issue will be covered by #7842 since we want to discourage (and not support) using Piwik through Git. As long as users us the normal releases they don't have to use Composer at all (Composer shouldn't be used by end users as it creates problems like what we have here).

@mnapoli mnapoli closed this as completed May 21, 2015
@AndersBillLinden
Copy link
Contributor Author

The information still has to be complete and accurate. If php composer.phar install is incorrect, then why tell people to use it? Why do you want to discourage people from installing through Git? Will they not understand what they are doing?

@mnapoli
Copy link
Contributor

mnapoli commented May 23, 2015

If php composer.phar install is incorrect, then why tell people to use it?

This command is correct (it is composer update that is incorrect). What is "incorrect" is to deploy Piwik using git at all.

Why do you want to discourage people from installing through Git? Will they not understand what they are doing?

See here: #7842

@AndersBillLinden
Copy link
Contributor Author

Are you not required to use the full path to composer.phar? That would make php composer.phar install incorrect.

People that confuses the master branch with the "latest version" is not a problem. We could protect those from themselves but we should not really. However, we do not have to ignore them and let them install software we do not control.

If our treatment of the master branch is adequate, there should not be no worries. If the master only contains tested code we can still sleep at night. Tested as in "a number of other developers have reviewed this and their signatures are in the test protocol".

People that install from another branch than master probably know what they are doing.

The responsibility of users learning concepts such as "version control", "stable version" or "release" is not on the piwik team. Am I not right?

@mnapoli
Copy link
Contributor

mnapoli commented May 24, 2015

Yes this is indeed not our concern, but we don't want to encourage people to use master (even if it is well tested) because it affects us (our work, and Piwik's codebase) is some ways. We shouldn't have to loose some time because of this, so it's not just about stability, it's also about us being able to work on Piwik without having to change some code for a use case we don't support (and spend time doing support for this).

Maybe I am not understanding everything correctly but what are you suggesting we could improve?

@AndersBillLinden
Copy link
Contributor Author

I am suggesting that the procedure of installing from git should not be obfuscated by instructions that can not be followed literally. A message about why to not install from git should be added.

@mnapoli
Copy link
Contributor

mnapoli commented May 24, 2015

OK #7842 should do it then.

@AndersBillLinden
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants