Problem/Motivation
FILE: examples/file_example/src/Form/FileExampleReadWriteForm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
700 | WARNING | Unused variable $result.
-----------------------------------------------------------------------------------------------------------------
FILE: examples/stream_wrapper_example/tests/src/Unit/SessionHelperTest.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
42 | WARNING | Unused variable $helper.
--------------------------------------------------------------------------------------------------------------------------FILE: examples/stream_wrapper_example/tests/src/Functional/StreamWrapperExampleTest.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------
18 | ERROR | Missing member variable doc comment
---------------------------------------------------------------------------------------------------------------------------------------FILE: examples/stream_wrapper_example/tests/src/Kernel/StreamWrapperTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------
58 | WARNING | Unused variable $store.
66 | WARNING | Unused variable $len.
81 | WARNING | Unused variable $size.
98 | WARNING | Unused variable $dir2.
----------------------------------------------------------------------------------------------------------------------------FILE: examples/stream_wrapper_example/src/SessionHelper.php
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
146 | WARNING | Unused variable $store.
-----------------------------------------------------------------------------------------------------------FILE: examples/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------------
172 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
179 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
637 | WARNING | Unused variable $new_file.
753 | WARNING | Unused variable $key_name.
------------------------------------------------------------------------------------------------------------------------------------------
There were 2 errors:
1) Drupal\Tests\stream_wrapper_example\Kernel\StreamWrapperTest::testReadWrite
ArgumentCountError: Too few arguments to function Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::__construct(), 0 passed and exactly 1 expectedexamples/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php:155
examples/stream_wrapper_example/tests/src/Kernel/StreamWrapperTest.php:622) Drupal\Tests\stream_wrapper_example\Kernel\StreamWrapperTest::testDirectories
ArgumentCountError: Too few arguments to function Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::__construct(), 0 passed and exactly 1 expectedexamples/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php:155
examples/stream_wrapper_example/tests/src/Kernel/StreamWrapperTest.php:101ERRORS!
Tests: 5, Assertions: 22, Errors: 2.Remaining deprecation notices (2)
1x: Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.
1x in StreamWrapperExampleTest::testRoutes from Drupal\Tests\stream_wrapper_example\Functional1x: FileSystem::validScheme() is deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme() instead. See https://www.drupal.org/node/3035273
1x in StreamWrapperTest::testSchemeRegistered from Drupal\Tests\stream_wrapper_example\Kernel
1) Drupal\Tests\file_example\Functional\FileExampleTest::testFileExampleBasic
Exception: ArgumentCountError: Too few arguments to function Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::__construct(), 0 passed and exactly 1 expected
Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper->__construct()() (Line: 155)Tests: 1, Assertions: 51, Errors: 1.
core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:51
vendor/guzzlehttp/promises/src/Promise.php:203
vendor/guzzlehttp/promises/src/Promise.php:156
vendor/guzzlehttp/promises/src/TaskQueue.php:47
vendor/guzzlehttp/promises/src/Promise.php:246
vendor/guzzlehttp/promises/src/Promise.php:223
vendor/guzzlehttp/promises/src/Promise.php:267
vendor/guzzlehttp/promises/src/Promise.php:225
vendor/guzzlehttp/promises/src/Promise.php:62
vendor/guzzlehttp/guzzle/src/Client.php:183
vendor/fabpot/goutte/Goutte/Client.php:180
vendor/symfony/browser-kit/Client.php:318
vendor/symfony/browser-kit/Client.php:259
vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:696
vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:480
vendor/behat/mink/src/Element/NodeElement.php:153
vendor/behat/mink/src/Element/NodeElement.php:161
core/tests/Drupal/Tests/UiHelperTrait.php:100
core/tests/Drupal/Tests/UiHelperTrait.php:209
examples/file_example/tests/src/Functional/FileExampleTest.php:69Remaining deprecation notices (3)
2x: FileSystem::uriScheme() is deprecated in drupal:8.8.0. It will be removed from drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme() instead. See https://www.drupal.org/node/3035273
2x in FileExampleTest::testFileExampleBasic from Drupal\Tests\file_example\Functional1x: Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.
1x in FileExampleTest::testFileExampleBasic from Drupal\Tests\file_example\Functional
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | file-and-stream_wrapper-3103569-6.patch | 14.23 KB | jungle |
| #6 | inter-diff-3103569-2-6.txt | 9.02 KB | jungle |
Comments
Comment #2
jungleComment #3
valthebaldTests fail and there are still deprecation messages left (also, cancelling phpcs for the parts of the file is not really a solution :) )
Comment #4
jungleHi @valthebald,
I was in a hurry to get all tests cases of this project passed in a limited time. So I did disable phpcs at some places for quick.
Yes, tests fail. But it is impossible to get them all passed by fixing this issue.
Is it possible to get #3103586: [Meta] Bring back all tests GREEN merged first, and change this issue's task to refactor code and remove phpcs comments?
Once the upstream is GREEN, tests failure here would be meaningful.
Comment #5
valthebald@jungle #3103586: [Meta] Bring back all tests GREEN is meta and has too many subtasks, but you're right!
The one about ignoring codestyle though can be fixed...
Comment #6
jungleComment #7
jungleNo more phpcs:disable used, besides one to ignore the blow due to one relevant issue blocked it
Comment #8
valthebaldCommitted to 8.x-1.x, thank you!