oss-gate / workshop

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

OSS Gate Workshop: php-kagawa: 2024-05-12: tfujita: cakephp: Work log #1825

Closed tttfujita closed 5 months ago

tttfujita 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ワークショップ関連情報

tttfujita commented 6 months ago

コードの場所探す https://github.com/cakephp/cakephp?tab=readme-ov-file#contributing

tttfujita commented 6 months ago

ライセンスは、「MIT license」OK! MIT license

tttfujita commented 6 months ago

環境作る git clone https://github.com/cakephp/cakephp.git

tttfujita commented 6 months ago

パッケージ入れる composer install

tttfujita commented 6 months ago

動作確認する https://github.com/cakephp/cakephp/blob/5.x/.github/CONTRIBUTING.md#test-cases-codesniffer-and-static-analysis

composer test

tttfujita commented 6 months ago

エラー出た いいのか??

% composer test
> phpunit
PHPUnit 10.5.3 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.7
Configuration: /cakephp/phpunit.xml.dist

WPHP Warning:  /private/var/folders/vc/n70fwzx54f52rd49yn9lghn40000gn/T/cache/tmp_4bKIeq/ is not writable in /cakephp/src/Cache/Engine/FileEngine.php on line 424

Warning: /private/var/folders/vc/n70fwzx54f52rd49yn9lghn40000gn/T/cache/tmp_4bKIeq/ is not writable in /cakephp/src/Cache/Engine/FileEngine.php on line 424

There were 3 errors:

1) Cake\Test\TestCase\Database\Schema\MysqlSchemaTest::testDescribeTableFunctionalIndex
Cake\Database\Exception\DatabaseException: Columns used in index `child_ids_idx` in table `functional_index` must be added to the Table schema first. The column `` was not found.

/cakephp/src/Database/Schema/TableSchema.php:492
/cakephp/src/Database/Schema/SqliteSchemaDialect.php:389
/cakephp/src/Database/Schema/Collection.php:161
/cakephp/src/Database/Schema/Collection.php:121
/cakephp/tests/TestCase/Database/Schema/MysqlSchemaTest.php:557
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:1116
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:655
/cakephp/vendor/phpunit/phpunit/src/Framework/TestRunner.php:103
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:489
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:63
/cakephp/vendor/phpunit/phpunit/src/TextUI/Application.php:189

2) Cake\Test\TestCase\Database\SchemaCacheTest::testBuildEnablesMetadataCache
Cake\Database\Exception\DatabaseException: Columns used in index `child_ids_idx` in table `functional_index` must be added to the Table schema first. The column `` was not found.

/cakephp/src/Database/Schema/TableSchema.php:492
/cakephp/src/Database/Schema/SqliteSchemaDialect.php:389
/cakephp/src/Database/Schema/Collection.php:161
/cakephp/src/Database/Schema/Collection.php:121
/cakephp/src/Database/Schema/CachedCollection.php:92
/cakephp/src/Database/SchemaCache.php:65
/cakephp/tests/TestCase/Database/SchemaCacheTest.php:96
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:1116
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:655
/cakephp/vendor/phpunit/phpunit/src/Framework/TestRunner.php:103
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:489
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:63
/cakephp/vendor/phpunit/phpunit/src/TextUI/Application.php:189

3) Cake\Test\TestCase\Database\SchemaCacheTest::testBuildNoArgs
Cake\Database\Exception\DatabaseException: Columns used in index `child_ids_idx` in table `functional_index` must be added to the Table schema first. The column `` was not found.

/cakephp/src/Database/Schema/TableSchema.php:492
/cakephp/src/Database/Schema/SqliteSchemaDialect.php:389
/cakephp/src/Database/Schema/Collection.php:161
/cakephp/src/Database/Schema/Collection.php:121
/cakephp/src/Database/Schema/CachedCollection.php:92
/cakephp/src/Database/SchemaCache.php:65
/cakephp/tests/TestCase/Database/SchemaCacheTest.php:107
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:1116
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:655
/cakephp/vendor/phpunit/phpunit/src/Framework/TestRunner.php:103
/cakephp/vendor/phpunit/phpunit/src/Framework/TestCase.php:489
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/Framework/TestSuite.php:340
/cakephp/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:63
/cakephp/vendor/phpunit/phpunit/src/TextUI/Application.php:189

ERRORS!
Tests: 7776, Assertions: 23125, Errors: 3, Warnings: 79, Deprecations: 1, Skipped: 324, Incomplete: 3.
Script phpunit handling the test event returned with error code 2
tttfujita commented 6 months ago

テストを実行したらエラーが出たというissueを出していいらしい。学び。 warningなので重要ししていなかったり、そういうものですという返事があるらしい。

tttfujita commented 6 months ago

Issue書いてみた Run the test, get three errors. #17684

github-actions[bot] commented 5 months ago

おつかれさまでした!

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

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

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

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