Problem/Motivation

Getting the following deprecation error when running PHPUnit tests on Windows:

The Symfony\Component\ClassLoader\WinCacheClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.

Proposed resolution

Add the message to the list of silenced deprecatation messages in drupal/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Title: Update Symfony components to 3.4.* » The Symfony\Component\ClassLoader\WinCacheClassLoader class is deprecated
ioana apetri’s picture

Assigned: Unassigned » ioana apetri
ioana apetri’s picture

Assigned: ioana apetri » Unassigned
Status: Active » Needs review
StatusFileSize
new1.4 KB

Please review, Thanks:)

mohit1604’s picture

Patch seems good , thanks @yo30 :)

alexpott’s picture

Status: Needs review » Needs work
+++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
@@ -101,6 +101,7 @@ public static function getSkippedDeprecations() {
+      'The Symfony\Component\ClassLoader\WinCacheClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.',

Can this line go next to the related 'The Symfony\Component\ClassLoader\ApcClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.', line to make life a bit simpler.

mohit1604’s picture

Assigned: Unassigned » mohit1604
mohit1604’s picture

Assigned: mohit1604 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.57 KB

Worked as per comment #6. Please review , Thanks :)

alexpott’s picture

Status: Needs review » Needs work
+++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
@@ -101,6 +101,8 @@ public static function getSkippedDeprecations() {
+      'The Symfony\Component\ClassLoader\ApcClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.',

This is already present. The WinCacheClassLoader deprecation needs to be moved to be alongside.

mohit1604’s picture

StatusFileSize
new1.71 KB

@alexpott , did changes as per comment #9, please review it, Thank You :)

mohit1604’s picture

Status: Needs work » Needs review
mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Thank you all!

Tested this patch, in combination with the patch in #2932715: PHPUnit testing fails on Windows since #2928249, in an Windows Appveyor build of the Imagemagick module.

Without the patch: https://ci.appveyor.com/project/mondrake/imagemagick/build/1.0.307

With the patch: https://ci.appveyor.com/project/mondrake/imagemagick/build/1.0.314

RTBC

alexpott’s picture

Credited myself and @mondrakefor reviewing and testing the patch.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 044194047b to 8.6.x and 18ef80802a to 8.5.x. Thanks!

  • alexpott committed 0441940 on 8.6.x
    Issue #2938369 by Mohit Malik, yo30, mondrake, alexpott: The Symfony\...

  • alexpott committed 18ef808 on 8.5.x
    Issue #2938369 by Mohit Malik, yo30, mondrake, alexpott: The Symfony\...

Status: Fixed » Closed (fixed)

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