8000 [Console] Register terminal env variables by ogizanagi · Pull Request #19724 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Register terminal env variables #19724

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

Merged
merged 1 commit into from
Aug 30, 2016
Merged

[Console] Register terminal env variables #19724

merged 1 commit into from
Aug 30, 2016

Conversation

ogizanagi
Copy link
Contributor
@ogizanagi ogizanagi commented Aug 24, 2016
Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #19719
License MIT
Doc PR -

Solves #19719 by setting COLUMNS & LINES env vars when running an Application.
Those env vars are then meant to be reused when using the Process component.

It creates a new Terminal::registerEnv() method allowing to register terminal related informations into environment variables. It allows getting "consistent terminal informations" across processes.

Unless the env vars handling is backported from the 3.2 Terminal class to older branches in the Application class, the mentioned issue can't be solved this way.

/**
* Register terminal related environment variables.
*/
public function registerEnv()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we want that method. You should putenv() above directly IMHO.

Copy link
Contributor Author
@ogizanagi ogizanagi Aug 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you're right. This would make this PR a bugfix only (despite the fact it can only target 3.2 right now), but I hesitated. I thought this method would be convenient to easily register all terminal related env vars at once in a script before calling a process, even if that's not much.

But fair enough, I'll remove it for now. (Feature label can be removed)

@nicolas-grekas
Copy link
Member

👍

1 similar comment
@javiereguiluz
Copy link
Member

👍

@fabpot
Copy link
Member
fabpot commented Aug 30, 2016

Thank you @ogizanagi.

@fabpot fabpot merged commit 926bc51 into symfony:master Aug 30, 2016
fabpot added a commit that referenced this pull request Aug 30, 2016
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Register terminal env variables

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

Solves #19719 by setting `COLUMNS` & `LINES` env vars when running an Application.
Those env vars are then meant to be reused when using the Process component.

~~It creates a new `Terminal::registerEnv()` method allowing to register terminal related informations into environment variables. ~~It allows getting "consistent terminal informations" across processes.~~

Unless the env vars handling is backported from the 3.2 `Terminal` class to older branches in the `Application` class, the mentioned issue can't be solved this way.

Commits
-------

926bc51 [Console] Register terminal env variables
@ogizanagi ogizanagi deleted the 3.2/terminal_register_env branch August 30, 2016 22:06
@fabpot fabpot mentioned this pull request Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0