Skip to content

feat: add Model::firstOrInsert() with failure handling #14451

feat: add Model::firstOrInsert() with failure handling

feat: add Model::firstOrInsert() with failure handling #14451

Triggered via pull request February 28, 2026 09:43
Status Success
Total duration 16m 14s
Artifacts 9

test-phpunit.yml

on: pull_request
Setup PHP Version for Code Coverage
3s
Setup PHP Version for Code Coverage
Matrix: Others
Matrix: CacheLive
Matrix: DatabaseLive
Matrix: SeparateProcess
Upload coverage results to Coveralls  /  coveralls
52s
Upload coverage results to Coveralls / coveralls
Fit to window
Zoom out
Zoom in

Annotations

1 error and 25 warnings
DatabaseLive (8.5, OCI8, 8.0) / tests
Process completed with exit code 2.
Others (8.2) / Sanity Tests: /tests/system/API/ResponseTraitTest.php#L761
Took 0.5144s from 0.5000s limit to run CodeIgniter\\API\\ResponseTraitTest::testPaginateWithQueryBuilder
Others (8.2) / Sanity Tests: /tests/system/Images/ImageMagickHandlerTest.php#L298
Took 0.7117s from 0.5000s limit to run CodeIgniter\\Images\\ImageMagickHandlerTest::testText
Others (8.2) / Sanity Tests: /tests/system/API/ResponseTraitTest.php#L158
Took 0.7218s from 0.5000s limit to run CodeIgniter\\API\\ResponseTraitTest::testNoFormatterJSON
Others (8.2) / Sanity Tests: /tests/system/CodeIgniterTest.php#L986
Took 1.0578s from 0.5000s limit to run CodeIgniter\\CodeIgniterTest::testRouteAttributeCacheIntegration
CacheLive (8.2) / Cache Live Tests: /tests/system/Cache/Handlers/AbstractHandlerTestCase.php#L30
Took 0.7213s from 0.5000s limit to run CodeIgniter\\Cache\\Handlers\\ApcuHandlerTest::testGetMetaDataMiss
DatabaseLive (8.2, SQLite3, 8.0) / tests: /tests/system/Commands/Database/MigrateStatusTest.php#L78
Took 0.5332s from 0.5000s limit to run CodeIgniter\\Commands\\Database\\MigrateStatusTest::testMigrateAllWithWithTwoNamespaces
DatabaseLive (8.2, SQLite3, 8.0) / tests: /tests/system/Commands/CreateDatabaseTest.php#L68
Took 1.1248s from 0.5000s limit to run CodeIgniter\\Commands\\CreateDatabaseTest::testCreateDatabase
SeparateProcess (8.2) / tests: /tests/system/Commands/GenerateKeyTest.php#L82
Took 0.9794s from 0.5000s limit to run CodeIgniter\\Commands\\GenerateKeyTest::testGenerateKeyShowsEncodedKey
DatabaseLive (8.2, MySQLi, 8.0) / tests: /tests/system/Commands/CreateDatabaseTest.php#L68
Took 1.3284s from 0.5000s limit to run CodeIgniter\\Commands\\CreateDatabaseTest::testCreateDatabase
DatabaseLive (8.2, Postgre, 8.0) / tests: /tests/system/Commands/CreateDatabaseTest.php#L68
Took 1.4749s from 0.5000s limit to run CodeIgniter\\Commands\\CreateDatabaseTest::testCreateDatabase
DatabaseLive (8.2, MySQLi, 5.7) / tests: /tests/system/Commands/CreateDatabaseTest.php#L68
Took 1.3125s from 0.5000s limit to run CodeIgniter\\Commands\\CreateDatabaseTest::testCreateDatabase
DatabaseLive (8.2, SQLSRV, 8.0) / tests: /tests/system/Commands/DatabaseCommandsTest.php#L83
Took 0.5196s from 0.5000s limit to run CodeIgniter\\Commands\\DatabaseCommandsTest::testMigrateRefresh
DatabaseLive (8.2, SQLSRV, 8.0) / tests: /tests/system/Commands/CreateDatabaseTest.php#L68
Took 1.5177s from 0.5000s limit to run CodeIgniter\\Commands\\CreateDatabaseTest::testCreateDatabase
DatabaseLive (8.2, SQLSRV, 8.0) / tests: /tests/system/Database/Live/ForgeTest.php#L92
Took 3.1496s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testCreateDatabaseIfNotExists
DatabaseLive (8.2, SQLSRV, 8.0) / tests: /tests/system/Database/Live/ForgeTest.php#L63
Took 3.3157s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testCreateDatabaseWithDots
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Database/Live/ForgeTest.php#L1583
Took 0.8424s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testDropKey
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Database/Live/InsertTest.php#L48
Took 0.8986s from 0.5000s limit to run CodeIgniter\\Database\\Live\\InsertTest::testInsertBatch
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Database/Live/FabricatorLiveTest.php#L34
Took 0.9215s from 0.5000s limit to run CodeIgniter\\Database\\Live\\FabricatorLiveTest::testCreateAddsToDatabase
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Models/SaveModelTest.php#L272
Took 0.9488s from 0.5000s limit to run CodeIgniter\\Models\\SaveModelTest::testSaveNewEntityWithDate
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Commands/CreateDatabaseTest.php#L68
Took 0.9955s from 0.5000s limit to run CodeIgniter\\Commands\\CreateDatabaseTest::testCreateDatabase
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Database/Live/ForgeTest.php#L1236
Took 1.0618s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testSetKeyNames
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Database/Live/ConnectTest.php#L98
Took 1.1020s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ConnectTest::testConnectWithFailover
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Database/Live/ForgeTest.php#L1680
Took 1.5296s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testProcessIndexes
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Models/InsertModelTest.php#L242
Took 1.5649s from 0.5000s limit to run CodeIgniter\\Models\\InsertModelTest::testInsertPermitInsertNoData
DatabaseLive (8.2, OCI8, 8.0) / tests: /tests/system/Database/Live/ForgeTest.php#L494
Took 2.8701s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testForeignKey

Artifacts

Produced during runtime
Name Size Digest
cache-live-tests-php-8.2-db-none Expired
143 KB
sha256:cd24401d51f5afaee48c4e6f497883e8aac85a6c9d2959219ebdb96c2fcac079
database-live-tests-php-8.2-db-MySQLi5.7 Expired
15.1 MB
sha256:36ed89beac9bf234077e7020fcd4982111973ba43024f51384f612b6c69f0942
database-live-tests-php-8.2-db-MySQLi8.0 Expired
15.1 MB
sha256:19c2fb5a30df3993a056323ee917369d5badb5ce0aab406f87b51020e544497a
database-live-tests-php-8.2-db-OCI88.0 Expired
15.2 MB
sha256:8d5a4f73a5a614cd3ee36cafd24daef499314db9dd311b40a96b5abcb2723174
database-live-tests-php-8.2-db-Postgre8.0 Expired
14.2 MB
sha256:a16944988c74ebd2b27b473c0834a6d6514b5daea1433323073b9278a8a936ec
database-live-tests-php-8.2-db-SQLSRV8.0 Expired
14.7 MB
sha256:b455e1ec6cc42dd38f7cc2d84afcee116272e274465c848114eca4c5ed644448
database-live-tests-php-8.2-db-SQLite38.0 Expired
14.7 MB
sha256:5003aa57559cd3288dc0f936840c4934934c68e58785cd179f0b05b058f5b2b7
sanity-tests-php-8.2-db-none Expired
33.8 MB
sha256:fd0464b27cc68048f78405fa2c6b42b8cea1790ba81b9da0f2ff0066af12a4bf
separate-process-tests-php-8.2-db-none Expired
3.42 MB
sha256:85b89129a9b6cd4e4b7240c8f62c180927e8bdb38dfc9be4e8bd4a7cdfb55c09