oss-gate / workshop

OSSの開発に未参加または参加したことはあるけどまだ自信がない人を後押しするワークショップ用のリポジトリー
124 stars 547 forks source link

OSS Gate Workshop: php-kagawa: 2024-05-12: k-sahara: symfony/runtime: Work log #1822

Closed k-sahara closed 6 months ago

k-sahara commented 6 months ago

This is a work log of a "OSS Gate workshop". "OSS Gate workshop" is an activity to increase OSS developers. Here's been discussed in Japanese. Thanks.

作業ログ作成時の説明

以下のテンプレートを埋めてタイトルに設定します。埋め方例はスクロールすると見えてきます。

OSS Gate Workshop: ${LOCATION}: ${YEAR}-${MONTH}-${DAY}: ${ACCOUNT_NAME}: ${OSS_NAME}: Work log

タイトル例↓:

OSS Gate Workshop: Tokyo: 2017-01-16: kou: Rabbit: Work log

OSS Gateワークショップ関連情報

zonuexe commented 6 months ago

よろしくおねがいします!

k-sahara commented 6 months ago

symfony/runtimeのライセンス、コントリビュートについて確認 https://symfony.com/doc/current/contributing/index.html

symfony/runtime固有の開発方法についてのドキュメントは無かった

k-sahara commented 6 months ago

公式ドキュメントを参照しテストを実行したがエラーになった https://symfony.com/doc/6.4/contributing/code/tests.html

[vagrant@localhost runtime]$ php ./phpunit symfony
Could not open input file: ./phpunit
k-sahara commented 6 months ago

公式ドキュメントを参照し、composer updateを実行したが、lock fileに変更はなかった

[vagrant@localhost runtime]$ COMPOSER_ROOT_VERSION=6.4.x-dev composer update
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
32 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
k-sahara commented 6 months ago

Symfonyのほかのコンポーネントを確認したが、各コンポーネントごとにはテストが実行できないように見える。 (テストケースはあるが、phpunitがない)

k-sahara commented 6 months ago

Symfony開発するときには、個別のコンポーネントのレポジトリではなく、Symfony本体をインストールする必要があった https://github.com/symfony/symfony

k-sahara commented 6 months ago

php ./phpunit symfonyを実行したところテストに失敗していた

PHPUnit 9.6.19 by Sebastian Bergmann and contributors.

Testing /home/vagrant/symfony/src/Symfony/Component/Config
F..FFF.........................................................  63 / 474 ( 13%)
............................................................... 126 / 474 ( 26%)
............................................................... 189 / 474 ( 39%)
............................................................... 252 / 474 ( 53%)
............................................................... 315 / 474 ( 66%)
............................................................... 378 / 474 ( 79%)
............................................................... 441 / 474 ( 93%)
.................................                               474 / 474 (100%)

Time: 00:31.585, Memory: 10.00 MB

There were 4 failures:

1) Symfony\Component\Config\Tests\Builder\GeneratedConfigTest::testConfig with data set "ScalarNormalizedTypes" ('ScalarNormalizedTypes', 'scalar_normalized_types')
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 (
-    0 => '/Symfony/Config/ScalarNormalizedTypes/KeyedListObjectConfig.php'
-    1 => '/Symfony/Config/ScalarNormalizedTypes/ListObjectConfig.php'
-    2 => '/Symfony/Config/ScalarNormalizedTypes/Nested/NestedListObjectConfig.php'
-    3 => '/Symfony/Config/ScalarNormalizedTypes/Nested/NestedObjectConfig.php'
+    0 => '/Symfony/Config/ScalarNormalizedTypesConfig.php'
+    1 => '/Symfony/Config/ScalarNormalizedTypes/ObjectConfig.php'
+    2 => '/Symfony/Config/ScalarNormalizedTypes/ListObjectConfig.php'
+    3 => '/Symfony/Config/ScalarNormalizedTypes/KeyedListObjectConfig.php'
     4 => '/Symfony/Config/ScalarNormalizedTypes/NestedConfig.php'
-    5 => '/Symfony/Config/ScalarNormalizedTypes/ObjectConfig.php'
-    6 => '/Symfony/Config/ScalarNormalizedTypesConfig.php'
+    5 => '/Symfony/Config/ScalarNormalizedTypes/Nested/NestedObjectConfig.php'
+    6 => '/Symfony/Config/ScalarNormalizedTypes/Nested/NestedListObjectConfig.php'
 )

/home/vagrant/symfony/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php:202
/home/vagrant/symfony/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php:99

2) Symfony\Component\Config\Tests\Builder\GeneratedConfigTest::testConfig with data set "AddToList" ('AddToList', 'add_to_list')
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 (
-    0 => '/Symfony/Config/AddToList/Messenger/ReceivingConfig.php'
-    1 => '/Symfony/Config/AddToList/Messenger/RoutingConfig.php'
-    2 => '/Symfony/Config/AddToList/MessengerConfig.php'
+    0 => '/Symfony/Config/AddToListConfig.php'
+    1 => '/Symfony/Config/AddToList/TranslatorConfig.php'
+    2 => '/Symfony/Config/AddToList/Translator/BooksConfig.php'
     3 => '/Symfony/Config/AddToList/Translator/Books/PageConfig.php'
-    4 => '/Symfony/Config/AddToList/Translator/BooksConfig.php'
-    5 => '/Symfony/Config/AddToList/TranslatorConfig.php'
-    6 => '/Symfony/Config/AddToListConfig.php'
+    4 => '/Symfony/Config/AddToList/MessengerConfig.php'
+    5 => '/Symfony/Config/AddToList/Messenger/RoutingConfig.php'
+    6 => '/Symfony/Config/AddToList/Messenger/ReceivingConfig.php'
 )

/home/vagrant/symfony/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php:202
/home/vagrant/symfony/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php:99

3) Symfony\Component\Config\Tests\Builder\GeneratedConfigTest::testConfig with data set "NodeInitialValues" ('NodeInitialValues', 'node_initial_values')
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 (
-    0 => '/Symfony/Config/NodeInitialValues/Messenger/TransportsConfig.php'
-    1 => '/Symfony/Config/NodeInitialValues/MessengerConfig.php'
-    2 => '/Symfony/Config/NodeInitialValues/SomeCleverNameConfig.php'
-    3 => '/Symfony/Config/NodeInitialValuesConfig.php'
+    0 => '/Symfony/Config/NodeInitialValuesConfig.php'
+    1 => '/Symfony/Config/NodeInitialValues/SomeCleverNameConfig.php'
+    2 => '/Symfony/Config/NodeInitialValues/MessengerConfig.php'
+    3 => '/Symfony/Config/NodeInitialValues/Messenger/TransportsConfig.php'
 )

/home/vagrant/symfony/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php:202
/home/vagrant/symfony/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php:99

4) Symfony\Component\Config\Tests\Builder\GeneratedConfigTest::testConfig with data set "ArrayExtraKeys" ('ArrayExtraKeys', 'array_extra_keys')
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 (
-    0 => '/Symfony/Config/ArrayExtraKeys/BarConfig.php'
-    1 => '/Symfony/Config/ArrayExtraKeys/BazConfig.php'
-    2 => '/Symfony/Config/ArrayExtraKeys/FooConfig.php'
-    3 => '/Symfony/Config/ArrayExtraKeysConfig.php'
+    0 => '/Symfony/Config/ArrayExtraKeysConfig.php'
+    1 => '/Symfony/Config/ArrayExtraKeys/FooConfig.php'
+    2 => '/Symfony/Config/ArrayExtraKeys/BarConfig.php'
+    3 => '/Symfony/Config/ArrayExtraKeys/BazConfig.php'
 )

/home/vagrant/symfony/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php:202
/home/vagrant/symfony/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php:99

FAILURES!
Tests: 474, Assertions: 747, Failures: 4.
KO src/Symfony/Component/Config
k-sahara commented 6 months ago
PHPUnit 9.6.19 by Sebastian Bergmann and contributors.

Testing /home/vagrant/symfony/src/Symfony/Component/Messenger
....SS.................................................SSSSSSSS  63 / 696 (  9%)
SSSSSSSSSSS.SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS......... 126 / 696 ( 18%)
....................S..................................SSSSSSS. 189 / 696 ( 27%)
.........................................................S..... 252 / 696 ( 36%)
.....SS.S..S.............E..SSSSSSSSSSSSSSSSSS................. 315 / 696 ( 45%)
............................................................... 378 / 696 ( 54%)
............................................................... 441 / 696 ( 63%)
............................................................... 504 / 696 ( 72%)
............................................................... 567 / 696 ( 81%)
............................................................... 630 / 696 ( 90%)
......................................................

Time: 00:24.773, Memory: 18.00 MB

There was 1 error:

1) Symfony\Component\Messenger\Bridge\Redis\Tests\Transport\RedisTransportFactoryTest::testCreateTransport with data set "redis_sentinel" ('redis:?host[]', array(false))
Symfony\Component\Messenger\Exception\InvalidArgumentException: Failed to retrieve master information from sentinel "".

/home/vagrant/symfony/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php:156
/home/vagrant/symfony/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php:704
/home/vagrant/symfony/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php:165
/home/vagrant/symfony/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php:308
/home/vagrant/symfony/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisTransportFactoryTest.php:49

ERRORS!
Tests: 696, Assertions: 1461, Errors: 1, Skipped: 94.
KO src/Symfony/Component/Messenger
k-sahara commented 6 months ago

There was 1 error:

1) Symfony\Component\Form\Tests\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformerTest::testReverseTransformFromDifferentLocale
Symfony\Component\Form\Exception\TransformationFailedException: Date parsing failed: U_PARSE_ERROR

/home/vagrant/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php:124
/home/vagrant/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php:235

ERRORS!
Tests: 4671, Assertions: 9778, Errors: 1, Skipped: 2, Incomplete: 8.
KO src/Symfony/Component/Form

PHPUnit 9.6.19 by Sebastian Bergmann and contributors.
k-sahara commented 6 months ago
Testing /home/vagrant/symfony/src/Symfony/Component/Console
.............................................................   61 / 1280 (  4%)
..............................................E.EEEE.EEEE....  122 / 1280 (  9%)
.............................................................  183 / 1280 ( 14%)
.............................................................  244 / 1280 ( 19%)
............................F................................  305 / 1280 ( 23%)
.............................................................  366 / 1280 ( 28%)
.............................................................  427 / 1280 ( 33%)
............................S................................  488 / 1280 ( 38%)
.............................................................  549 / 1280 ( 42%)
.............................................................  610 / 1280 ( 47%)
.............................................................  671 / 1280 ( 52%)
.............................................................  732 / 1280 ( 57%)
.............................................................  793 / 1280 ( 61%)
.............................................................  854 / 1280 ( 66%)
.............................................................  915 / 1280 ( 71%)
.............................................................  976 / 1280 ( 76%)
............................................................. 1037 / 1280 ( 81%)
............................................................. 1098 / 1280 ( 85%)
............................................................. 1159 / 1280 ( 90%)
.......................................EEEEE................. 1220 / 1280 ( 95%)
..................S..................................F......  1280 / 1280 (100%)

Time: 01:14.580, Memory: 14.00 MB

There were 14 errors:

1) Symfony\Component\Console\Tests\ApplicationTest::testSignalListener
Error: Call to undefined function Symfony\Component\Console\Tests\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2311
/home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php:279
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:1047
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:316
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:167
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:1991

2) Symfony\Component\Console\Tests\ApplicationTest::testSignalSubscriber
Error: Call to undefined function Symfony\Component\Console\Tests\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2311
/home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php:279
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:1047
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:316
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:167
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2029

3) Symfony\Component\Console\Tests\ApplicationTest::testSignalDispatchWithoutEventToDispatch
Error: Call to undefined function Symfony\Component\Console\Tests\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2311
/home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php:279
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:1029
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:316
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:167
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2044

4) Symfony\Component\Console\Tests\ApplicationTest::testSignalDispatchWithoutEventDispatcher
Error: Call to undefined function Symfony\Component\Console\Tests\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2311
/home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php:279
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:1029
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:316
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:167
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2058

5) Symfony\Component\Console\Tests\ApplicationTest::testSetSignalsToDispatchEvent
Error: Call to undefined function Symfony\Component\Console\Tests\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2311
/home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php:279
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:1047
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:316
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:167
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2088

6) Symfony\Component\Console\Tests\ApplicationTest::testSignalableCommandHandlerCalledAfterEventListener
Error: Call to undefined function Symfony\Component\Console\Tests\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2311
/home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php:279
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:1047
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:316
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:167
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2143

7) Symfony\Component\Console\Tests\ApplicationTest::testSignalableCommandDoesNotInterruptedOnTermSignals
Error: Call to undefined function Symfony\Component\Console\Tests\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2311
/home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php:279
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:1047
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:316
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:167
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2162

8) Symfony\Component\Console\Tests\ApplicationTest::testSignalableWithEventCommandDoesNotInterruptedOnTermSignals
Error: Call to undefined function Symfony\Component\Console\Tests\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2371
/home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php:279
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:1047
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:316
/home/vagrant/symfony/src/Symfony/Component/Console/Application.php:167
/home/vagrant/symfony/src/Symfony/Component/Console/Tester/ApplicationTester.php:64
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2184

9) Symfony\Component\Console\Tests\ApplicationTest::testSignalableRestoresStty
Symfony\Component\Process\Exception\RuntimeException: TTY mode requires /dev/tty to be read/writable.

/home/vagrant/symfony/src/Symfony/Component/Process/Process.php:1043
/home/vagrant/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php:2212

10) Symfony\Component\Console\Tests\SignalRegistry\SignalRegistryTest::testOneCallbackForASignalSignalIsHandled
Error: Call to undefined function Symfony\Component\Console\Tests\SignalRegistry\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php:43

11) Symfony\Component\Console\Tests\SignalRegistry\SignalRegistryTest::testTwoCallbacksForASignalBothCallbacksAreCalled
Error: Call to undefined function Symfony\Component\Console\Tests\SignalRegistry\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php:62

12) Symfony\Component\Console\Tests\SignalRegistry\SignalRegistryTest::testTwoSignalsSignalsAreHandled
Error: Call to undefined function Symfony\Component\Console\Tests\SignalRegistry\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php:79

13) Symfony\Component\Console\Tests\SignalRegistry\SignalRegistryTest::testTwoCallbacksForASignalPreviousAndRegisteredCallbacksWereCalled
Error: Call to undefined function Symfony\Component\Console\Tests\SignalRegistry\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php:107

14) Symfony\Component\Console\Tests\SignalRegistry\SignalRegistryTest::testTwoCallbacksForASignalPreviousCallbackFromAnotherRegistry
Error: Call to undefined function Symfony\Component\Console\Tests\SignalRegistry\posix_kill()

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php:129

--

There were 2 failures:

1) Symfony\Component\Console\Tests\CursorTest::testGetCurrentPosition
Failed asserting that false matches expected true.

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/CursorTest.php:187

2) /home/vagrant/symfony/src/Symfony/Component/Console/Tests/phpt/signal/command_exit.phpt
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Received signal!'
+'Fatal error: Uncaught Error: Call to undefined function posix_kill() in Standard input code:21\n
+Stack trace:\n
+#0 /home/vagrant/symfony/src/Symfony/Component/Console/Command/Command.php(279): MyCommand->execute()\n
+#1 /home/vagrant/symfony/src/Symfony/Component/Console/Application.php(1047): Symfony\Component\Console\Command\Command->run()\n
+#2 /home/vagrant/symfony/src/Symfony/Component/Console/Application.php(316): Symfony\Component\Console\Application->doRunCommand()\n
+#3 /home/vagrant/symfony/src/Symfony/Component/Console/Application.php(167): Symfony\Component\Console\Application->doRun()\n
+#4 Standard input code(48): Symfony\Component\Console\Application->run()\n
+#5 {main}\n
+  thrown in Standard input code on line 21'

/home/vagrant/symfony/src/Symfony/Component/Console/Tests/phpt/signal/command_exit.phpt:56

ERRORS!
Tests: 1280, Assertions: 2180, Errors: 14, Failures: 2, Skipped: 2.
KO src/Symfony/Component/Console

PHPUnit 9.6.19 by Sebastian Bergmann and contributors.
k-sahara commented 6 months ago
There was 1 failure:

1) Symfony\Component\HttpFoundation\Tests\ResponseFunctionalTest::testInformationalResponse
Failed asserting that 0 is identical to 3.

/home/vagrant/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php:80

FAILURES!
Tests: 1561, Assertions: 3058, Failures: 1, Skipped: 41.
KO src/Symfony/Component/HttpFoundation

PHPUnit 9.6.19 by Sebastian Bergmann and contributors.
k-sahara commented 6 months ago
There was 1 failure:

1) Symfony\Component\Cache\Tests\Adapter\PredisAdapterTest::testGetMetadata
Failed asserting that 1278 matches expected 999.

/home/vagrant/symfony/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php:155

FAILURES!
Tests: 5491, Assertions: 6230, Failures: 1, Skipped: 3178.
KO src/Symfony/Component/Cache
k-sahara commented 6 months ago

posix_kill実行時にエラーが発生していることに、注目 src/Symfony/Component/Console/Tests/ApplicationTest.phpを確認し、 BaseSignableCommand実行前に下記のスキップ処理を追加

        if (!function_exists('posix_kill')) {
            $this->markTestSkipped('posix_kill not available');
        }

php ./phpunit src/Symfony/Component/Console/Tests/ApplicationTest.php テストコマンドを実行し、エラーからスキップへ変わったことを確認した

k-sahara commented 6 months ago

テストケース修正前後の実行結果のスクリーンショット スクリーンショット 2024-05-12 132942 スクリーンショット 2024-05-12 132827

k-sahara commented 6 months ago

タイトル posixモジュールが有効かされていない環境で、ユニットテストを実行すると src/Symfony/Component/Console/Tests/ApplicationTest.phpでエラーが発生する。

環境

phpinfo()
PHP Version => 8.2.18

System => Linux localhost.localdomain 5.14.0-427.13.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 30 18:22:29 EDT 2024 x86_64
Build Date => Apr  9 2024 18:46:23
Build System => Red Hat Enterprise Linux release 9.3 (Plow)
Build Provider => Remi's RPM repository <https://rpms.remirepo.net/> #StandWithUkraine
Compiler => gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2)
Architecture => x86_64
Server API => Command Line Interface
Virtual Directory Support => disabled

Symfony v7.0.7

再現方法 posixモジュールが有効かされていない環境で php ./phpunit src/Symfony/Component/Console/Tests/ApplicationTest.phpを実行

原因 posix_killが無い環境でposix_killを実行したため 下記のように、スキップする必要があった

        if (!function_exists('posix_kill')) {
            $this->markTestSkipped('posix_kill not available');
        }
k-sahara commented 6 months ago

OS

[vagrant@localhost symfony]$ cat /etc/os-release
NAME="AlmaLinux"
VERSION="9.4 (Seafoam Ocelot)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="AlmaLinux 9.4 (Seafoam Ocelot)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:9::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-9"
ALMALINUX_MANTISBT_PROJECT_VERSION="9.4"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
SUPPORT_END=2032-06-01

PHPインストール手順

sudo dnf upgrade -y --refresh 

sudo dnf install -y yum-utils
sudo dnf config-manager --set-enabled crb
sudo dnf install -y epel-release
sudo dnf install -y epel-next-release
# remi
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm

# phpをインストールします
dnf -y install php-cli php-fpm php-devel php-pear php-curl php-gd php-opcache \
 php-zip php-common php-bcmath php-imagick php-xmlrpc php-json php-readline php-memcached \
 php-redis php-mbstring php-apcu php-xml php-dom php-redis php-memcached php-memcache php-process

# PHP モジュール
sudo dnf -y install php-pecl-igbinary php-intl php-pecl-msgpack \
 php-pgsql php-pecl-yaml php-pecl-zip php-pecl-redis5 php-phpiredis
systemctl restart php-fpm
k-sahara commented 6 months ago

Console test fails if posix module is not enabled. 7.0.7

I am installing php on AlmaLinux with remi. (except for php-posix) Execute the following commands

php ./phpunit  src/Symfony/Component/Console/Tests/ApplicationTest.php

before

Add checks with function_exists.

        if (!function_exists('posix_kill')) {
            $this->markTestSkipped('posix_kill not available');
        }
k-sahara commented 6 months ago

バグ報告を行いました。 https://github.com/symfony/symfony/issues/54892

k-sahara commented 6 months ago

修正のプルリクエストを行いました。 https://github.com/symfony/symfony/pull/54893

github-actions[bot] commented 6 months ago

おつかれさまでした!

ワークショップの終了にともないissueを閉じますが、このまま作業メモとして使っても構いません :ok_hand:

ワークショップの感想を集めています!

ブログなどに書かれた際は、このページへリンクの追加をお願いします :pray:

またの参加をお待ちしています!