-
Notifications
You must be signed in to change notification settings - Fork 6
Refactor sql abstraction #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tion # Conflicts: # test/integration/Platform/MysqlFixtureLoader.php # test/unit/Sql/Predicate/NotBetweenTest.php # test/unit/Sql/SelectTest.php # test/unit/TableGateway/Feature/MasterSlaveFeatureTest.php
- Removed obsolete driver implementations (IbmDb2, Mysqli, Oci8, Pgsql, Sqlsrv) - Consolidated to abstract PDO driver architecture - Added new SQL abstraction classes: Argument, ArgumentType, ExpressionData, ExpressionPart - Added Container namespace with new service factories and managers - Replaced Psalm with PHPStan for static analysis - Added strict_types declarations across all files - PHP 8.2 and 8.5 support - Removed platform-specific implementations (Mysql, PostgreSQL, Oracle, etc.) - Added service manager stubs and interfaces - Updated dependencies (added laminas-servicemanager)
- Added TYPE constants back to ExpressionInterface (required by existing code) - Removed '.gitignore copy' file (merge artifact)
…ferences - Refactored processExpression() to work with ExpressionData/ExpressionPart objects - Split logic into processExpressionValue(), processExpressionOrSelect(), and processExpressionParameterName() - Used modern PHP match expressions for type handling - Fixed all Laminas\Db namespace references to PhpDb - Removed AbstractExpression implementation (now empty abstract class)
- Added 'loadSchemaData' to onlyMethods() to properly mock the abstract method - This fixes the fatal error when running PHPUnit tests
…in tests - Updated all test files to use ArgumentType::Identifier/Value/Literal - Added ArgumentType use statements to affected test files - This aligns tests with the new ArgumentType enum-based system
- Updated testWhereArgument1IsAssociativeArrayNotContainingReplacementCharacter to create Argument objects for comparison - Operator::getLeft() and getRight() return Argument objects in PhpDb - This matches the Laminas test pattern for the refactored code
Added documentation for new Argument and ArgumentType
Fixed testing errors QA fixes
Fixed testing errors QA fixes
Made Parameter Container lazy for performance
Made Parameter Container lazy for performance
Made instances lazy for performance
Updated tests for new defaults Allow spec to be overridden (as per 2.21)
tyrsson
reviewed
Dec 4, 2025
tyrsson
approved these changes
Dec 4, 2025
Signed-off-by: Simon Mundy <46739456+simon-mundy@users.noreply.github.com>
Removed unnecessary tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
Lang Feature Refactor
Refactoring to new language features
qa
Improvements in quality assurance of the project
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #64
Closes #41
Major refactoring of Sql/* classes to better handle Argument and ArgumentType
Added ExpressionPart and ExpressionData for more reliable SQL string creation
Refactored all unit testing
QA updates
Updated documentation with corrections and new features
NOTE: This is a large but necessary commit to handle the entire SQL subcomponent.