Skip to content

[FrameworkBundle][Process] 3.2.0 RC1: Webserver as run configuration in PhpStorm/IntelliJ #20565

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

Closed
derrabus opened this issue Nov 18, 2016 · 8 comments

Comments

@derrabus
Copy link
Member

It has always been handy for me to configure the server:run command as a run configuration in PhpStorm. This way, I can launch the webserver with a single click and relaunch or stop it from within the IDE.

bildschirmfoto 2016-11-19 um 00 35 16

After upgrading to Symfony 3.2, this run configuration has stopped working. When launching it, it stops immediately the following error message:

  [Symfony\Component\Debug\Exception\ContextErrorException]                   
  Warning: proc_open(/dev/tty): failed to open stream: Device not configured 

Running the command in a normal shell still works, though.

System: macOS 10.12.1, php 7.1.0 RC6.

@derrabus derrabus changed the title 3.2.0 RC1: Webserver as run configuration in PhpStorm/IntelliJ [FrameworkBundle][Process] 3.2.0 RC1: Webserver as run configuration in PhpStorm/IntelliJ Nov 18, 2016
@nicolas-grekas
Copy link
Member

This must be related to #19174.
Can you try two different things please?

  1. replace setTty by setPty in src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php => works? if yes, can you see colored output?
  2. apply [Process] Do feat test before enabling TTY mode #20576 => removes the notice?

@derrabus
Copy link
Member Author

Replacing setTty by setPty works first. This is the output I get:

bildschirmfoto 2016-11-21 um 10 17 44

So, no colored output if I use the run configuration. But the output is colored, if I use server:run inside a normal console. But note that after this change, the web server access is not logged to the console anymore.

Additionally, after reloading the page a couple of times, the command exits with the following error:

  [Symfony\Component\Process\Exception\RuntimeException]  
  The process has been signaled with signal "11".

Patch #20576 fixes everything for me:

bildschirmfoto 2016-11-21 um 10 28 13

@nicolas-grekas
Copy link
Member

Then #20576 is the way to go. Thanks!

@nicolas-grekas
Copy link
Member

PR updated to fix tests, can you please check again?

@derrabus
Copy link
Member Author

Yes, the PR still works for me.

I still have that problem with the command exiting suddenly after some reloads, though. But it seems to be independent from how I run it and whether I apply your patch or not, so I'll file a separate bug report about it. Right now, the PR makes things better for me. 👍

@nicolas-grekas
Copy link
Member

The process has been signaled with signal "11".

that's a segfault, we can't do anything about it on Symfony side, this is a php engine issue...

@fabpot
Copy link
Member

fabpot commented Nov 21, 2016

@derrabus If you are using PHP 7.1RCx, the segfaults are indeed a bug in PHP.

@derrabus
Copy link
Member Author

I've opened #20580 for this issue. I can try to reproduce it with php 7.0 later, if that helps.

fabpot added a commit that referenced this issue Nov 22, 2016
…rekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Do feat test before enabling TTY mode

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20565
| License       | MIT
| Doc PR        | -

Commits
-------

69bfbbf [Process] Do feat test before enabling TTY mode
@fabpot fabpot closed this as completed Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants