2016-11-19 207 views

回答

4

如果您已經安裝PHPUnit的與PHP檔案(藥業)程序全球範圍內,你可以簡單地運行:

phpunit --self-update 

需要注意的是:

OpenSSL的擴展需要使用該藥業的--self更新功能 。

More info in the doc

希望得到這個幫助

+0

非常感謝你! ^^ –

3

看起來你已經在全局和你的PATH上安裝了PHPUnit 3.7。請將您的全球phpunit替換爲您下載的PHAR或明確執行後者。

+0

謝謝你回答我的問題。 :d。但我想我會使用作曲家的版本PHPUnit。它簡單而偉大! –

6

只要下載最新版本並更換舊的。它是從phpunit主頁提供的。

$ wget https://phar.phpunit.de/phpunit.phar 

$ chmod +x phpunit.phar 

$ sudo mv phpunit.phar /usr/local/bin/phpunit 

您使用的是最新版本。要檢查版本,你可以使用

$ phpunit --check-version 
+0

謝謝。解決了我的問題:) –

+0

這不提供最新版本,今天它給了我6.4.2然而6.4.3(或更多)可在其他地方使用。 – Anders

+0

你可以訪問'https:// phar.phpunit.de /',它實際上顯示最新的更新。我檢查了筆者github上https://github.com/sebastianbergmann/phpunit/commit/06b28548fd2b4a20c3cd6e247dc86331a7d4db13,現在他正準備發佈。如果你想要未發佈的版本,你總是可以自己創建。 – Shiro

1

有兩種不同的東西更新和升級。如果您鍵入

PHPUnit的

它會告訴你所有可用的命令。如果你看到最後它顯示

--self-update  Update PHPUnit to the latest version within the same 
        release series. 

--self-upgrade  Upgrade PHPUnit to the latest version. 

嘗試你所需要的。