Skip to content

Conversation

@simon-mundy
Copy link
Collaborator

@simon-mundy simon-mundy commented Nov 11, 2025

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.

…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
@tyrsson tyrsson self-requested a review December 4, 2025 22:05
simon-mundy and others added 3 commits December 5, 2025 09:13
Signed-off-by: Simon Mundy <46739456+simon-mundy@users.noreply.github.com>
Removed unnecessary tests
@simon-mundy simon-mundy merged commit 3cb7531 into 0.4.x Dec 5, 2025
30 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in @phpdb Dec 5, 2025
@simon-mundy simon-mundy deleted the refactor-sql-abstraction branch December 5, 2025 01:52
@simon-mundy simon-mundy restored the refactor-sql-abstraction branch December 5, 2025 01:52
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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[RFC]: Refactor Typing in \Sql Possible issue with Join

4 participants