Skip to content
Merged
Show file tree
Hide file tree
Changes from 158 commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
6f16087
Fixed test for expected type of identifier (which is default)
simon-mundy Apr 15, 2025
f98e6b3
Fixed test for expected type of identifier (which is default)
simon-mundy Apr 15, 2025
8666511
Integration of new Argument and ArgumentType classes
simon-mundy Apr 15, 2025
fff303b
Continuing refactor
simon-mundy Apr 15, 2025
d6d2c46
Updating Unit Testing for correct syntax
simon-mundy Apr 15, 2025
4e34b7a
Continuing updates to refactoring
simon-mundy Apr 16, 2025
e04e45a
Continuing updates to refactoring
simon-mundy Apr 16, 2025
ddf1677
Updating Unit Testing for correct syntax
simon-mundy Apr 17, 2025
6e67b58
WIP
simon-mundy Apr 23, 2025
b847d67
Finalise unit testing for SQL
simon-mundy Apr 28, 2025
e2bd4d6
Finalise unit testing for SQL
simon-mundy Apr 28, 2025
7342f9a
Finalise unit testing for SQL
simon-mundy Apr 28, 2025
dd0449b
Finalise unit testing for SQL
simon-mundy Apr 28, 2025
f5f96dd
Finalise unit testing for SQL
simon-mundy Apr 28, 2025
39531d4
Finalise unit testing for SQL
simon-mundy Apr 28, 2025
e0b243b
Merge remote-tracking branch 'origin/3.0.x' into refactor-sql-abstrac…
simon-mundy May 4, 2025
5ad7368
Added strict types to all project files
simon-mundy May 8, 2025
3ec866f
Change namespace and components to PhpDb
simon-mundy Nov 11, 2025
c390c31
Change namespace and components to PhpDb
simon-mundy Nov 11, 2025
b00a4b3
This merge brings in the latest changes from 0.3.x including:
simon-mundy Nov 11, 2025
8c15bbb
Fix merge issues: restore TYPE constants and remove gitignore copy
simon-mundy Nov 11, 2025
0f91a95
Complete ExpressionData migration in AbstractSql and fix namespace re…
simon-mundy Nov 11, 2025
4165fd8
Fix AbstractSourceTest mock to include loadSchemaData method
simon-mundy Nov 11, 2025
1ae5c59
Replace ExpressionInterface::TYPE_* constants with ArgumentType enum …
simon-mundy Nov 11, 2025
dc4e7fc
Update test files to use ArgumentType enum instead of TYPE constants
simon-mundy Nov 11, 2025
d9710b0
Fix SelectTest to use Argument objects in assertions
simon-mundy Nov 11, 2025
da6d56e
Fixes to tests
simon-mundy Nov 11, 2025
b14c5db
Added deprecation notes for constants
simon-mundy Nov 11, 2025
ae823e0
Added PhpDbTest\AdapterTestTrait for convenience
simon-mundy Nov 11, 2025
c0fd1a2
Added PhpDbTest\AdapterTestTrait for convenience
simon-mundy Nov 11, 2025
0d9c7de
Added PhpDbTest\AdapterTestTrait for convenience
simon-mundy Nov 11, 2025
56758c8
In commit b847d674 (April 28, 2025), getter methods were accidentally
simon-mundy Nov 12, 2025
b44cd25
Merge remote-tracking branch 'origin/refactor-sql-abstraction' into r…
simon-mundy Nov 12, 2025
8b2451d
Reverted unncesseary param name refactor
simon-mundy Nov 12, 2025
669d9c0
Update Metadata unit testing
simon-mundy Nov 13, 2025
a4c1049
Further improvements in typing
simon-mundy Nov 13, 2025
7e28fa1
Further improvements in typing
simon-mundy Nov 13, 2025
f0596c3
Improved test coverage for Metadata and Sql components
simon-mundy Nov 13, 2025
0823157
Update Metadata unit testing
simon-mundy Nov 13, 2025
6b1b66f
Fixes for markdownlinter in docs
simon-mundy Nov 14, 2025
f7520e6
Added new Test Assets
simon-mundy Nov 15, 2025
ed19a42
Updated tests
simon-mundy Nov 15, 2025
f7cb1e1
Updated phpunit.xml for both CI and project
simon-mundy Nov 15, 2025
6bdd4aa
Merge remote-tracking branch 'origin/refactor-sql-abstraction' into r…
simon-mundy Nov 15, 2025
426ba03
Updated phpunit.xml for both CI and project
simon-mundy Nov 15, 2025
8acc378
Updated phpunit.xml for both CI and project
simon-mundy Nov 15, 2025
f9c2654
QA fixes
simon-mundy Nov 15, 2025
659be53
QA fixes
simon-mundy Nov 15, 2025
d478879
QA fixes
simon-mundy Nov 15, 2025
ff920ab
QA fixes
simon-mundy Nov 15, 2025
6ca89b5
Strong typing and rector improvements
simon-mundy Nov 16, 2025
2233b02
Strong typing and rector improvements
simon-mundy Nov 16, 2025
b96bd33
Strong typing and rector improvements
simon-mundy Nov 16, 2025
0cf133b
Strong typing and rector improvements
simon-mundy Nov 16, 2025
4807d3c
Strong typing and rector improvements
simon-mundy Nov 16, 2025
30b9794
Strong typing and rector improvements
simon-mundy Nov 16, 2025
b9bdaf1
Undo change for canCreate
simon-mundy Nov 17, 2025
2ebc567
Fixed incorrect typing for parameters
simon-mundy Nov 17, 2025
77554cc
Remove superfluous nullable strings from setters
simon-mundy Nov 17, 2025
fb7e28e
Reverted constructor of Platform.php
simon-mundy Nov 17, 2025
d1d4121
Reverted constructor of Platform.php
simon-mundy Nov 17, 2025
b96fff6
Refactored concrete Sql\Platform\Platform with no default decorators
simon-mundy Nov 17, 2025
3096c01
Comprehensive refactoring of tests
simon-mundy Nov 18, 2025
9739c22
Implement new Argument and ArgumentType
simon-mundy Nov 26, 2025
d9c00de
Migrate SQL classes to new Argument factory pattern
simon-mundy Nov 27, 2025
5a3c3ef
Update ExpressionPart and ExpressionData to use ArgumentInterface
simon-mundy Nov 27, 2025
6faf2cd
Implement new Argument and ArgumentType
simon-mundy Nov 27, 2025
7c692a8
Refactoring to new Argument usage
simon-mundy Nov 27, 2025
f17af37
Refactoring to new Argument usage
simon-mundy Nov 27, 2025
78c842a
This commit removes the adapter manager and rewires dependency mappin…
tyrsson Nov 23, 2025
9b816fa
This name change is solely to provide consistency across all components.
tyrsson Nov 23, 2025
82c0865
Actually this factory should not be provided by phpdb
tyrsson Nov 23, 2025
ea8b11a
Allow laminas service manager v3
tyrsson Nov 26, 2025
d1b4935
Add setObjectPrototype to ResultSetInterface
tyrsson Nov 11, 2025
889f39e
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Nov 11, 2025
247e4ff
Improve ResultSetInterface implementations
tyrsson Nov 11, 2025
2d72183
Change singature for new method
tyrsson Nov 11, 2025
d8b26ef
Merge remote-tracking branch 'origin/0.4.x' into refactor-sql-abstrac…
simon-mundy Nov 27, 2025
6676f4a
Refactoring to new Argument usage
simon-mundy Nov 27, 2025
f4639b7
Code reformatting
simon-mundy Nov 27, 2025
2f0115f
Code reformatting
simon-mundy Nov 27, 2025
1c25d05
Code reformatting
simon-mundy Nov 27, 2025
c16d5e3
Code reformatting
simon-mundy Nov 27, 2025
8f8f4e0
Continued with revision for PR#87
simon-mundy Nov 27, 2025
496e32c
Final fixes for PR#87
simon-mundy Nov 27, 2025
71a8e15
Final fixes for PR#87
simon-mundy Nov 27, 2025
22a08a6
Migrate SQL classes to new Argument factory pattern
simon-mundy Nov 27, 2025
a74f3c6
Update ExpressionPart and ExpressionData to use ArgumentInterface
simon-mundy Nov 27, 2025
6f8bb3e
Implement new Argument and ArgumentType
simon-mundy Nov 27, 2025
ff1a22b
Refactoring to new Argument usage
simon-mundy Nov 27, 2025
9d665cc
Refactoring to new Argument usage
simon-mundy Nov 27, 2025
9725b64
This commit removes the adapter manager and rewires dependency mappin…
tyrsson Nov 23, 2025
2ef2c54
This name change is solely to provide consistency across all components.
tyrsson Nov 23, 2025
a9c3422
Actually this factory should not be provided by phpdb
tyrsson Nov 23, 2025
a35f633
Allow laminas service manager v3
tyrsson Nov 26, 2025
2c42725
Add setObjectPrototype to ResultSetInterface
tyrsson Nov 11, 2025
e328395
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Nov 11, 2025
b0204f3
Improve ResultSetInterface implementations
tyrsson Nov 11, 2025
c306df7
Change singature for new method
tyrsson Nov 11, 2025
8879017
This commit removes the adapter manager and rewires dependency mappin…
tyrsson Nov 23, 2025
aae67d6
Add setObjectPrototype to ResultSetInterface
tyrsson Nov 11, 2025
61c8278
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Nov 11, 2025
3497b82
Improve ResultSetInterface implementations
tyrsson Nov 11, 2025
e8edacc
Change singature for new method
tyrsson Nov 11, 2025
f2afdb7
Missed deprecation
tyrsson Nov 11, 2025
45756fa
fix property name
tyrsson Nov 11, 2025
03172f6
Refactoring to new Argument usage
simon-mundy Nov 27, 2025
9dd97c5
Code reformatting
simon-mundy Nov 27, 2025
d37368f
Code reformatting
simon-mundy Nov 27, 2025
ae051dc
Code reformatting
simon-mundy Nov 27, 2025
79ec355
Code reformatting
simon-mundy Nov 27, 2025
0249297
Continued with revision for PR#87
simon-mundy Nov 27, 2025
c373b07
Final fixes for PR#87
simon-mundy Nov 27, 2025
700341b
Final fixes for PR#87
simon-mundy Nov 27, 2025
5dd50a5
Merge branch 'refactor-sql-abstraction' of github.com:/php-db/phpdb i…
simon-mundy Nov 27, 2025
94a31ce
Fix for PredicateSet not properly allowing Expressions
simon-mundy Nov 28, 2025
c86d799
Added tests for ensuring that ExpressionInterface can be added to any…
simon-mundy Nov 28, 2025
87323cd
Added tests for ensuring that ExpressionInterface can be added to any…
simon-mundy Nov 28, 2025
666ab27
Added test benchmarks for Argument
simon-mundy Nov 28, 2025
3b8948b
Updated lock file
simon-mundy Nov 28, 2025
9ed07da
Re-instated missing method
simon-mundy Nov 28, 2025
20eca80
Refactored to use instances of Argument types
simon-mundy Nov 29, 2025
c11c21e
Made constants final
simon-mundy Nov 29, 2025
6f22920
Made constants final in documentation
simon-mundy Nov 29, 2025
e609b3e
Minor improvement with promoted properties Literal.php
simon-mundy Nov 29, 2025
4c6f1f8
Documentation linting fixes
simon-mundy Nov 29, 2025
58ea514
Minor const fixes
simon-mundy Nov 29, 2025
55c236c
Major refactor removing ExpressionData/Parts
simon-mundy Nov 30, 2025
c196a66
Major refactor removing ExpressionData/Parts
simon-mundy Dec 1, 2025
b092584
Convert factory to instances
simon-mundy Dec 1, 2025
5e61737
Compare instances instead of ENUM types for performance
simon-mundy Dec 1, 2025
b38dc1d
Minor cleanup of string preparation
simon-mundy Dec 1, 2025
b8b2da5
Lazy-instantiation of Predicates for AbstractSql classes
simon-mundy Dec 1, 2025
6121fe7
Ensure flattenExpression is optimised for early return
simon-mundy Dec 1, 2025
4dbd16b
Further speed improvements
simon-mundy Dec 1, 2025
d8649f4
Cleanup loop for speed
simon-mundy Dec 1, 2025
a5ba11c
Reoordered for best case match first->last
simon-mundy Dec 1, 2025
21f4a92
Moved common expression values into processExpression to save overhead
simon-mundy Dec 1, 2025
bf684ec
Ensure all value types match
simon-mundy Dec 1, 2025
2c77779
Refactored buildSqlString to remove redundant assignments and params
simon-mundy Dec 1, 2025
e008741
Removed scratch benchmark file
simon-mundy Dec 1, 2025
188927d
Code improvements and readability
simon-mundy Dec 1, 2025
2cb2f30
Code improvements and readability
simon-mundy Dec 1, 2025
ae22b6a
Code improvements and readability
simon-mundy Dec 1, 2025
6ecb436
Code improvements and readability
simon-mundy Dec 1, 2025
30f84c8
Remove phpbench from CI (mistakenly added)
simon-mundy Dec 1, 2025
fb2e8e9
More code cleaning for speed optimisation
simon-mundy Dec 1, 2025
99a8733
More code cleaning for speed optimisation
simon-mundy Dec 1, 2025
b90a3bc
Fix for CI
simon-mundy Dec 1, 2025
d27a6ab
Fix for CI
simon-mundy Dec 1, 2025
4f5a61b
Minor string optimisation
simon-mundy Dec 1, 2025
5d4e329
Remove testing comments
simon-mundy Dec 2, 2025
c397d29
Re-ordered interface argument typing
simon-mundy Dec 3, 2025
3abda14
Refactored Argument types to provide spec
simon-mundy Dec 3, 2025
5f2a13d
Removed superfluous docblock returns for fluent methods
simon-mundy Dec 4, 2025
a3fbcc2
Fixed unnecessary ternary operation
simon-mundy Dec 4, 2025
5fb721c
Minor formatting fixes
simon-mundy Dec 4, 2025
d97a78f
Added correct return type (void)
simon-mundy Dec 4, 2025
66ff73f
Merge branch '0.4.x' into refactor-sql-abstraction
simon-mundy Dec 4, 2025
2280f9b
Added docblock typing for SMv3 and SMv4 compatibility
simon-mundy Dec 4, 2025
ffcf5e4
Fixed PHPStan baseline
simon-mundy Dec 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/.phpunit.result.cache
/.phpstan-cache
/phpstan.neon
/phpbench.json
/clover.xml
/coveralls-upload.json
/phpunit.xml
Expand Down
9 changes: 0 additions & 9 deletions .gitignore copy

This file was deleted.

5 changes: 2 additions & 3 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extensions": [
"pdo-sqlite",
"sqlite3",
"sqlsrv"
"sqlite3"
],
"additional_checks": [
{
Expand All @@ -14,4 +13,4 @@
}
}
]
}
}
33 changes: 19 additions & 14 deletions .laminas-ci/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,33 @@
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<file>./src/Sql/Ddl/Column/Float.php</file>
</exclude>
</coverage>

<extensions>
<bootstrap class="PhpDbIntegrationTest\Extension\ListenerExtension" />
</extensions>

<testsuites>
<testsuite name="unit test">
<directory>./test/unit</directory>
<exclude>./test/unit/Adapter/AdapterAbstractServiceFactoryTest.php</exclude>
<exclude>./test/unit/Adapter/AdapterServiceFactoryTest.php</exclude>
<exclude>./test/unit/Adapter/AdapterServiceDelegatorTest.php</exclude>
<exclude>./test/unit/Adapter/Driver/Pdo/PdoTest.php</exclude>
<exclude>./test/unit/Adapter/Driver/Pdo/ConnectionTest.php</exclude>
<exclude>./test/unit/Adapter/Driver/Pdo/ConnectionIntegrationTest.php</exclude>
<exclude>./test/unit/Adapter/Driver/Pdo/StatementTest.php</exclude>
<exclude>./test/unit/Adapter/Driver/Pdo/StatementIntegrationTest.php</exclude>
<exclude>./test/unit/Adapter/AdapterTest.php</exclude>
<exclude>./test/unit/Adapter/AdapterAwareTraitTest.php</exclude>
<exclude>./test/unit/TableGateway</exclude>
<exclude>./test/unit/RowGateway</exclude>
<exclude>./test/unit/ConfigProviderTest.php</exclude>
</testsuite>
<testsuite name="integration test">
<directory>./test/integration</directory>
</testsuite>
</testsuites>

<listeners>
<listener class="PhpDbIntegrationTest\IntegrationTestListener" file="./test/integration/IntegrationTestListener.php"/>
</listeners>

<php>
<!-- Integration Test Variables -->
<env name="TESTS_PHPDB_ADAPTER_DRIVER_MYSQL" value="true" />
Expand All @@ -34,7 +39,7 @@
<env name="TESTS_PHPDB_ADAPTER_DRIVER_MYSQL_PASSWORD" value="password" />
<env name="TESTS_PHPDB_ADAPTER_DRIVER_MYSQL_DATABASE" value="laminasdb_test" />

<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_SQLSRV" value="true" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_SQLSRV" value="false" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_SQLSRV_HOSTNAME" value="mssql" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_SQLSRV_USERNAME" value="sa" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_SQLSRV_PASSWORD" value="Password123" />
Expand All @@ -52,7 +57,7 @@
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_IBMDB2_PASSWORD" value="" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_IBMDB2_DATABASE" value="" />

<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_PGSQL" value="true" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_PGSQL" value="false" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_PGSQL_HOSTNAME" value="postgres" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_PGSQL_USERNAME" value="gha" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_PGSQL_PASSWORD" value="password" />
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ The `phpunit.xml.dist` file defines two test suites, "unit test" and "integratio
You can run one or the other using the `--testsuite` option to `phpunit`:

```bash
$ ./vendor/bin/phpunit --testsuite "unit test" # unit tests only
$ ./vendor/bin/phpunit --testsuite "integration test" # integration tests only
./vendor/bin/phpunit --testsuite "unit test" # unit tests only
./vendor/bin/phpunit --testsuite "integration test" # integration tests only
```

Unit tests do not require additional functionality beyond having the appropriate database extensions present and loaded in your PHP binary.
Expand All @@ -36,13 +36,13 @@ So, the repository includes a [Docker Compose][docker-compose] configuration whi
To start up the configuration, run the following command:

```bash
$ docker compose up -d
docker compose up -d
```

To test that the environment is up and running, run the following command:

```bash
$ docker compose ps
docker compose ps
```

You should see output similar to the following:
Expand All @@ -65,16 +65,16 @@ So, copy `phpunit.xml.dist` to `phpunit.xml`, and change the following environme
From there, you can run the integration tests by running the following command:

```bash
$ docker compose exec php composer test-integration
docker compose exec php composer test-integration
```

> [!TIP]
> If you want to grow your Docker Compose knowledge, grab a (free) copy of [Deploy with Docker Compose][deploy-with-docker-compose].

-----

- File issues at https://github.com/php-db/phpdb/issues
- Documentation is at https://docs.php-db.dev
- File issues at <https://github.com/php-db/phpdb/issues>
- Documentation is at <https://docs.php-db.dev>

[docker-compose]: https://docs.docker.com/compose/intro/features-uses/
[deploy-with-docker-compose]: https://deploywithdockercompose.com
[deploy-with-docker-compose]: https://deploywithdockercompose.com
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"laminas/laminas-coding-standard": "^3.0.1",
"laminas/laminas-eventmanager": "^3.14.0",
"laminas/laminas-hydrator": "^4.6.0",
"phpbench/phpbench": "^1.4",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^11.5.15",
Expand All @@ -55,7 +56,8 @@
"autoload-dev": {
"psr-4": {
"PhpDbTest\\": "test/unit/",
"PhpDbIntegrationTest\\": "test/integration/"
"PhpDbIntegrationTest\\": "test/integration/",
"PhpDbBenchmark\\": "test/benchmark/"
}
},
"scripts": {
Expand Down
Loading