8000 [Process] Add deprecated logs on Process::setInput() and ProcessBuilder::setInput(). by tmartin · Pull Request #12725 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Process] Add deprecated logs on Process::setInput() and ProcessBuilder::setInput(). #12725

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
wants to merge 1 commit into from

Conversation

tmartin
Copy link
@tmartin tmartin commented Nov 29, 2014
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #12703
License MIT
Doc PR

8000
@@ -1092,6 +1092,7 @@ public function setStdin($stdin)
* Sets the input.
*
* This content will be passed to the underlying process standard input.
* Deprecation: As of Symfony 2.5, this method only accepts scalar values.
Copy link
Member

Choose a reason for hiding this comment

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

Can you use a @deprecated annotation instead?

Copy link
Author

Choose a reason for hiding this comment

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

@fabpot Are you sure? Adding a @deprecated would mean that the entire method is deprecated, at least the IDE will understand it this way. If so I'll have to change it in ProcessBuilder::setInput() too.

Copy link
Member

Choose a reason for hiding this comment

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

nevermind

…er::setInput() which does not accept non-scalar types.
@tmartin tmartin force-pushed the hackday-deprecated-12703 branch from 1c6901b to 8c5b1de Compare November 29, 2014 13:21
@@ -1101,6 +1102,13 @@ public function setStdin($stdin)
*/
public function setInput($input)
{
if (!is_scalar($input)) {
trigger_error(
'Passing a non-scalar input is deprecated since version 2.5 and will be removed in 3.0.',

Choose a reason for hiding this comment

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

please format it this way:

trigger_error('PropertyAccess::getPropertyAccessor() is deprecated since version 2.3 and will be removed in 3.0. Use PropertyAccess::createPropertyAccessor() instead.', E_USER_DEPRECATED);

Copy link
Author

Choose a reason for hiding this comment

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

@timglabish I thought we have to break lines at 120 char. Are you sure?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, everything on one line.

@stof
Copy link
Member
stof commented Dec 4, 2014

The deprecation warning should actually be triggered in ProcessUtils::validateInput

@fabpot fabpot added the Process label Dec 7, 2014
@stof
Copy link
Member
stof commented Jan 3, 2015

@tmartin Can you update this PR ?

@fabpot
Copy link
Member
fabpot commented Feb 5, 2015

Closing in favor of #13600

@fabpot fabpot closed this Feb 5, 2015
fabpot added a commit that referenced this pull request Feb 11, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] added a deprecation notice

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #12703, #12725
| License       | MIT
| Doc PR        | n/a

Commits
-------

a901ca2 [Process] added a deprecation notice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet 4841
Development

Successfully merging this pull request may close these issues.

5 participants
0