Code Monkey home page Code Monkey logo

Comments (25)

borekb avatar borekb commented on July 19, 2024 2

I don't understand the previous conversation but it might be related to my issue where I'm trying to have this in my settings:

"phpunit.phpunit": "plugins/versionpress/vendor/bin/phpunit"

// or this:
"phpunit.phpunit": "${workspaceFolder}/plugins/versionpress/vendor/bin/phpunit"

but it's probably not supported – the extension always seems to try an absolute path, I'm getting errors like this:

Error: spawn /${workspaceFolder}/plugins/versionpress/vendor/bin/phpunit ENOENT

or

Error: spawn /plugins/versionpress/vendor/bin/phpunit ENOENT

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024 1

更新了新版。情況和之前的一樣。
辛苦囉。這麼晚了還沒睡。

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

Phar 試試指定 php 路徑

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

謝謝回應。我再試試。

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

我的 command line 可以直接下 php 及 phpunit 照理說都不填應該也可以。
但不管有沒有填,或絕對路徑,還是不行。

[Trace - 7:52:08 PM] Sending request 'TestRunStartedEvent - (1)'.
Params: {
    "tests": [
        "Shieldon\\IpTraitTest::testSetIp"
    ]
}


[Trace - 7:52:08 PM] Received response 'TestRunStartedEvent - (1)' in 2ms. Request failed: Request TestRunStartedEvent failed with message: Cannot read property 'id' of undefined (-32603).

phpunit language server 回的訊息。

好想用這個插件呀 ><

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

最後這個訊息看起來應該是正常的啊
你先用composer require phpunit/phpunit
試著執行看看

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

奇怪的是,我試另一款插件是可以跑的

打勾的 "Run Test" 是該插件的功能
image

該插件的名字:

image

image

蠻奇怪的。

ps. 各種路徑設定包括 PHP 的設定都試過了,ouput 有時有訊息,但看起來是錯誤,但按很多次以後就都是空的沒反應。重啟 VSCode 後再執行會有 output,如下:

[Trace - 9:46:43 AM] Received request 'TestRunStartedEvent - (4)'.
Params: {
    "tests": [
        "Shieldon\\IpTraitTest::testSetIp"
    ],
    "events": [
        {
            "type": "test",
            "test": "Shieldon\\IpTraitTest::testSetIp",
            "state": "running"
        }
    ]
}


[Trace - 9:46:43 AM] Sending response 'TestRunStartedEvent - (4)'. Processing request took 1ms
No result returned.


[Trace - 9:46:43 AM] Received response 'TestRunStartedEvent - (2)' in 6ms.
No result returned.


(node:9072) UnhandledPromiseRejectionWarning: Error: spawn UNKNOWN
    at ChildProcess.spawn (internal/child_process.js:357:11)
    at Object.spawn (child_process.js:540:9)
    at Promise (c:\Users\terry\.vscode\extensions\recca0120.vscode-phpunit-2.0.50\server\out\server.js:6:123901)
    at new Promise (<anonymous>)
    at e.Process.run (c:\Users\terry\.vscode\extensions\recca0120.vscode-phpunit-2.0.50\server\out\server.js:6:123813)
    at e.TestRunner.<anonymous> (c:\Users\terry\.vscode\extensions\recca0120.vscode-phpunit-2.0.50\server\out\server.js:6:122800)
    at Generator.next (<anonymous>)
    at o (c:\Users\terry\.vscode\extensions\recca0120.vscode-phpunit-2.0.50\server\out\server.js:6:121482)
(node:9072) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9072) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

有可能是 windows 路徑的問題 ...
這要再檢查看看了

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

https://github.com/terrylinooo/shieldon
那你把資料夾的路徑還有vscode的設定檔提供給我
我看能不能重現問題

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

好的,我有時間再多試試,有成果再來分享。

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

對了!方便的話,先幫我裝 1.x版的看能不能正常執行
1.x 版我是在 windows 上開發的

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

裝了1.x 一樣錯誤訊息。不過如果設定值留空白。

[Error - 4:25:39 PM] Request workspace/executeCommand failed.
  Message: Request workspace/executeCommand failed with message: ENOENT: no such file or directory, open 'c:\Users\terry\AppData\Local\Temp\phpunit-lsp-1558427138919.xml'
  Code: -32603 

xml 檔案不是讀 workspace 底下的。

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

@terrylinooo

settings 增加 "phpunit.logpanel": true
輸出會多增加一個 PHPUnit Test Explorer
執行完程式後把訊息提供給我一下

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024
[2019-05-26 12:13:28.462] [INFO] Running tests ["Shieldon\\Component\\RobotTest::testSetStrict"]
[2019-05-26 12:13:42.527] [INFO] Running tests ["Shieldon\\Component\\IpTest::testInRange"]
[2019-05-26 12:14:02.427] [INFO] Running tests ["Shieldon\\Component\\IpTest::testDecimalIpv6"]
[2019-05-26 12:14:06.319] [INFO] Running tests ["Shieldon\\Component\\IpTest"]

類似這樣的訊息。

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

@terrylinooo 再試看看,應該至少要看到這個訊息

螢幕快照 2019-05-30 上午1 25 48

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

@terrylinooo 看樣子要加個 facebook 好友私聊一下了

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

很歡迎加喔。不過我會發政治文喔。哈哈。還是加賴比較好 @@

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

@terrylinooo 換了一個方案再幫我試看看
螢幕快照 2019-06-22 上午10 50 28

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

好喔。感謝。晚點試試。

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

更新之後還是不行。連左邊列表都抓不到了

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

看樣子要加你了 來個 line id

from vscode-phpunit.

terrylinooo avatar terrylinooo commented on July 19, 2024

看樣子要加你了 來個 line id

staroo

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

@terrylinooo 加你了

from vscode-phpunit.

shawnhind avatar shawnhind commented on July 19, 2024

I also see this same error happen.

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

try version 3.0

from vscode-phpunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.