Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new5.51 KB
kristen pol’s picture

Assigned: Unassigned » kristen pol
kristen pol’s picture

Assigned: kristen pol » Unassigned
Status: Needs review » Needs work

Thanks for the patch.

1) Found inheritEnvironmentVariables referenced in these files:

  • core/tests/Drupal/Tests/Composer/Plugin/Scaffold/ExecTrait.php
  • core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
  • core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
  • vendor/symfony/process/CHANGELOG.md
  • vendor/symfony/process/Process.php

2) Code removes instances of:

$process->inheritEnvironmentVariables();

from:

core/tests/Drupal/Tests/Composer/Plugin/Scaffold/ExecTrait.php

and

core/tests/Drupal/Tests/Core/Command/QuickStartTest.php

and removed deprecation message from:

core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php

Looking at vendor/symfony/process/Process.php shows:

     * @deprecated since Symfony 4.4, env variables are always inherited
     */
    public function inheritEnvironmentVariables($inheritEnv = true)

so removing inheritEnvironmentVariables() fixes the deprecation issue.

3) Code does not apply cleanly to 9.0 dev and needs reroll so moving back to "Needs work"

[mac:kristen:drupal-9.0.x-dev]$ patch -p1 < 3117858.patch
patching file core/tests/Drupal/Tests/Composer/Plugin/Scaffold/ExecTrait.php
patching file core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
Hunk #1 succeeded at 105 (offset 5 lines).
Hunk #2 succeeded at 157 (offset 5 lines).
Hunk #3 succeeded at 193 (offset 8 lines).
Hunk #4 succeeded at 207 (offset 8 lines).
Hunk #5 succeeded at 245 with fuzz 1 (offset 8 lines).
Hunk #6 succeeded at 273 with fuzz 2 (offset 8 lines).
Hunk #7 succeeded at 288 with fuzz 2 (offset 8 lines).
patching file core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
Hunk #1 FAILED at 169.
1 out of 1 hunk FAILED -- saving rejects to file core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php.rej
longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new5.65 KB

Thanks for the review, rerolled.

kristen pol’s picture

Assigned: Unassigned » kristen pol
kristen pol’s picture

Assigned: kristen pol » Unassigned
Status: Needs review » Reviewed & tested by the community

Thanks for the reroll. Patch applies cleanly. Not sure this can be manually tested so marking RTBC.

[mac:kristen:drupal-9.0.x-dev]$ patch -p1 < 3117858-5.patch
patching file core/tests/Drupal/Tests/Composer/Plugin/Scaffold/ExecTrait.php
patching file core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
patching file core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs a reroll.

piyuesh23’s picture

Issue tags: +DIACWApril2020
druprad’s picture

Assigned: Unassigned » druprad
druprad’s picture

StatusFileSize
new3.85 KB

Rerolled, Please review.

druprad’s picture

Status: Needs work » Needs review
govind.maloo’s picture

Status: Needs review » Needs work

@druprad : Patch failed to apply, see the automated test result. Please Fix the same.

druprad’s picture

Status: Needs work » Needs review
StatusFileSize
new5.51 KB

Earlier I had rerolled against 8.9.x. New file for 9.0.x.

druprad’s picture

longwave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs reroll

Thanks for rerolling, this looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 50332db194 to 9.1.x and 5a0caaf8fd to 9.0.x. Thanks!

  • alexpott committed 50332db on 9.1.x
    Issue #3117858 by longwave, druprad, Kristen Pol: [Symfony 5] The "...

  • alexpott committed 5a0caaf on 9.0.x
    Issue #3117858 by longwave, druprad, Kristen Pol: [Symfony 5] The "...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jonathan1055’s picture

Sorry to comment here on this closed issue but this is the only one I could find, none in Contrib land include this deprecation.

Any idea why I should still be seeing these warnings when I run contrib tests in Travis at core 9.0 and 9.1? The jobs use Symfony 4.4
https://travis-ci.org/github/jonathan1055/scheduler/jobs/720409794#L1147

 4x: The "Symfony\Component\Process\Process::inheritEnvironmentVariables()" method is deprecated since Symfony 4.4, env variables are always inherited.
3x in SchedulerDrushTest::testDrushCronMessages from Drupal\Tests\scheduler\Functional
1x in SchedulerDrushTest::testDrushCronPublishing from Drupal\Tests\scheduler\Functional

Any pointers would be appreciated. Thanks.