Closed haohetao closed 3 years ago
Any solution yet?
No, feel free to provide more information or a bug fix. It makes sense that she'll is not available on windows. Amp should not crash because of that though.
@bally86 use php7.4
@bally86 use php7.4
That's not an option. All my systems and packages are based on PHP 8 now.
@bally86 amphp has a lot of code that doesn't work on php8,I submitted the PR, but no one merged
@haohetao
Is this still an issue? Is it related to amphp or is it specific to our implementation of it?
Since the error is triggered in a stream that is being opened by amphp process, I assume that the issue lies in amphp.
@veewee I send report involves multiple problems, including amphp related problems have been solved (https://github.com/amphp/process/pull/46). Problems with “shell task” should remain. For example, the following sentence is wrong.
The executable for "sh" could not be found.
Glad to hear the amphp issue got resolved!
If shell is not installed on the environment you are running GrumPHP, we won't be able to fix it from this package. If you do have a sh exectuable, it might not be in the PATH. But since it is windows, I assume the error message is as expected.
I am closing this one for now. Feel free to reopen an issue if there is still something going wrong.
Hello,
I think we would need a new release for grumphp-shim. The phar install doesn't include latest amphp so it's still unusable in windows.
So far, I've done some quick tests with only a few tasks (composer, phpcs) and it's working fine once installed the package with dependencies.
Good point. I'll try to publish a new version somewhere next week!
@underdpt Tagged a new release with
- Installing amphp/process (v1.1.1): Extracting archive
Should work fine on Windows now.
grumphp.yml
Running task 1/5: phpcs... Running task 2/5: phpcsfixer... Running task 3/5: shell... ✘ Running task 4/5: composer... Running task 5/5: yamllint... ✔ Aborted ... ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▄███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ █▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▀█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▀▀▓▓▓▓▓▓▓▓▓▓▓▓█▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████████▄ ▄███████ ██████████ ███████▀ ▀▀▀▀▀▄ ▄▀▀▀▀▀ █████ ▀ ▐████ ▐██ ▐██ ████▌ ████▌ ███ ▌██▌ ▄▄ ▄▄ ▐███ ███ ▄▄▄▄▄▄▄▄▄▄▄▄ ▐███ ██▄ ▐███████████████████████████ █▀███████████▀ ▀▀███████████ ██████████▄███████▄███████████ ▐█████████████████████████████ █████████████████████████████ ██ █████████████████████▐██▀ ▀ ▐███████████████████▌ ▐▀ ████▀████████▀▐███ ▀█▌ ▐█████ ██▌ ██▀ ▐▀
shell
The executable for "sh" could not be found. To skip commit checks, add -n or --no-verify flag to commit command PHP Fatal error: Uncaught TypeError: fclose(): supplied resource is not a valid stream resource in D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php:221 Stack trace:
0 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php(221): fclose(Resource id #530)
1 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php(201): Amp\Process\Internal\Windows\Runner->free(Object(Amp\Process\Internal\Windows\Handle))
2 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Process.php(85): Amp\Process\Internal\Windows\Runner->destroy(Object(Amp\Process\Internal\Windows\Handle))
3 [internal function]: Amp\Process\Process->__destruct()
4 {main}
thrown in D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php on line 221
Fatal error: Uncaught TypeError: fclose(): supplied resource is not a valid stream resource in D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php:221 Stack trace:
0 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php(221): fclose(Resource id #530)
1 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php(201): Amp\Process\Internal\Windows\Runner->free(Object(Amp\Process\Internal\Windows\Handle))
2 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Process.php(85): Amp\Process\Internal\Windows\Runner->destroy(Object(Amp\Process\Internal\Windows\Handle))
3 [internal function]: Amp\Process\Process->__destruct()
4 {main}
thrown in D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php on line 221