Composer scripts

I am trying to run a  command though composer by clicking the green arrow next to it, but then it runs with composer instead of php. ( if that makes sense )

In the terminal I can run composer start and it works.

Any assistance is welcome.

"scripts": {
"start": "php -S localhost:8000 -t src/"
},
0
9 comments

I can't reproduce that on 2020.3 for some reason: https://recordit.co/oHJCHorcIP
As you can see, I just pasted your snippet into my composer.json.
Could you please share the whole composer.json and also let me know the exact PhpStorm version you are using? Thanks!

0

Thank you for taking the time to check this out, I just got PHPStorm so it is 99.9% my fault :)

https://www.icloud.com/iclouddrive/0F3D_2AEnoVAsQRGM6xcLJSoQ#Screen_Recording_2020-12-07_at_11.38.17


version 2020.3

{
"name": "xile/nuhet",
"description": "Modern marknadsföring vid e-post och sms",
"minimum-stability": "stable",
"license": "proprietary",
"authors": [
{
"name": "Björn Hjorth",
"email": "removed",
"role": "Developer"
}
],
"scripts": {
"start": "php -S localhost:8000 -t src/"
},
"config": {
"platform": {
"php": "8.0.0"
}
},
"require": {
}
}

 

0

Thanks! Can't reproduce that on macOS using your composer.json too.
Could you please capture a similar screenshot? https://prnt.sc/vxmrrh

1

Everything seems to be configured just as expected. Dunno.
Please try it with empty settings. You can reset via File | Manage IDE Settings | Restore Default Settings.
You will be able to import the settings back later with File | Manage IDE Settings | Import Settings.
Also, what Composer version do you use?

0

Same issue, sorry.
Composer version 2.0.7 2020-11-13 17:31:06

0

Hm, I have an idea. Is there any chance you've added command-line parameters manually in here? http://recordit.co/eyCX9n8BX6
Does removing them help?

0

Euguene you can have a good weekend as you just solved this PHPstorm beginners problem. Thanks for the assistance.

1

Great, thank you for the update, and have a great weekend too!

1

Please sign in to leave a comment.