Page MenuHomeDevCentral

Propagate database events
ClosedPublic

Authored by dereckson on Sun, Oct 19, 10:06.

Details

Summary

Obsidian offered the current refined code used in Keruald\Databases,
with an unported feature, connection and SQL error events.

This change migrates Obsidian Events static class in Keruald\OmniTools.
When that library is present, DatabaseEngine classes will fire events.

PSR-14: Event Dispatcher isn't currently implemented,
as we don't see any use case to justify a dependency
against Psr\EventDispatcher interfaces.

Fixes T1709.
Fixes Espace Win Bugzilla #21.

Test Plan

As part of T2145, switch to Keruald implementation in Obsdian Workspaces.

Diff Detail

Repository
rKERUALD Keruald libraries development repository
Lint
Lint Errors
SeverityLocationCodeMessage
Errordatabase/src/DatabaseEngine.php:162PHPCS.E.Generic.Files.LineLength.MaxExceededGeneric.Files.LineLength.MaxExceeded
Errordatabase/src/Engines/MySQLiEngine.php:51PHPCS.E.Generic.Files.LineLength.MaxExceededGeneric.Files.LineLength.MaxExceeded
Erroromnitools/src/Events/Propagation.php:30PHPCS.E.Generic.Files.LineLength.MaxExceededGeneric.Files.LineLength.MaxExceeded
Erroromnitools/src/Events/Propagation.php:49PHPCS.E.Generic.Files.LineLength.MaxExceededGeneric.Files.LineLength.MaxExceeded
Warningdatabase/src/DatabaseEngine.php:159PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Warningdatabase/src/DatabaseEngine.php:171PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Warningomnitools/src/Events/Propagation.php:24PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Warningomnitools/src/Events/Propagation.php:26PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Warningomnitools/src/Events/Propagation.php:41PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Warningomnitools/src/Events/Propagation.php:42PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Warningomnitools/src/Events/Propagation.php:44PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Warningomnitools/tests/Events/PropagationTest.php:23PHPCS.W.Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsedGeneric.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
Warningomnitools/tests/Events/PropagationTest.php:23PHPCS.W.Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsedGeneric.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
Warningomnitools/tests/Events/PropagationTest.php:27PHPCS.W.Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsedGeneric.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
Warningomnitools/tests/Events/PropagationTest.php:27PHPCS.W.Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsedGeneric.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
Unit
Test Failures
Branch
database-events
Build Status
Buildable 6041
Build 6325: arc lint + arc unit

Unit TestsBroken

TimeTest
0 msKeruald.Database.Tests.Engines.MySQLiEngineTest.testArrayShapeForFetchRow
Keruald\Database\Tests\Engines\MySQLiEngineTest::testArrayShapeForFetchRow mysqli_sql_exception: No such file or directory
0 msKeruald.Database.Tests.Engines.MySQLiEngineTest.testArrayShapeForFetchRowWithFetchModeBoth
Keruald\Database\Tests\Engines\MySQLiEngineTest::testArrayShapeForFetchRowWithFetchModeBoth mysqli_sql_exception: No such file or directory
0 msKeruald.Database.Tests.Engines.MySQLiEngineTest.testArrayShapeForFetchRowWithFetchModeEnum
Keruald\Database\Tests\Engines\MySQLiEngineTest::testArrayShapeForFetchRowWithFetchModeEnum mysqli_sql_exception: No such file or directory
0 msKeruald.Database.Tests.Engines.MySQLiEngineTest.testError
Keruald\Database\Tests\Engines\MySQLiEngineTest::testError mysqli_sql_exception: No such file or directory
0 msKeruald.Database.Tests.Engines.MySQLiEngineTest.testEscape
Keruald\Database\Tests\Engines\MySQLiEngineTest::testEscape mysqli_sql_exception: No such file or directory
View Full Test Results (27 Broken · 15 Passed)

Event Timeline

dereckson created this revision.
dereckson retitled this revision from Obsidian offered the current refined code used in Keruald\Databases, with an unported feature, connection and SQL error events. to Propagate database events.Sun, Oct 19, 10:08
dereckson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sun, Oct 19, 12:09
This revision was landed with ongoing or failed builds.Sun, Oct 19, 12:09
This revision was automatically updated to reflect the committed changes.