Releases: PhpGt/Database
Handling of error codes
December 2023 release
What's Changed
- Static analysis: improve typing throughout by @g105b in #241
- test: hard dependencies by @g105b in #309
- Bump phpstan/phpstan from 1.8.0 to 1.8.1 by @dependabot in #310
- maintenance: dependabot by @g105b in #319
- Update ci by @g105b in #342
- CI improvement by @g105b in #349
- ci: consistent workflow for all tests by @g105b in #351
- feature: allow passing initialisation queries in settings by @g105b in #354
- Dynamic sets by @g105b in #356
- Datetime from timestamp by @g105b in #361
- Split queries by semicolon by @g105b in #362
New Contributors
- @dependabot made their first contribution in #310
Full Changelog: v1.4.0...v1.5.1
Dynamic sets, datetimes and split queries
What's Changed
- Static analysis: improve typing throughout by @g105b in #241
- test: hard dependencies by @g105b in #309
- Bump phpstan/phpstan from 1.8.0 to 1.8.1 by @dependabot in #310
- maintenance: dependabot by @g105b in #319
- Update ci by @g105b in #342
- CI improvement by @g105b in #349
- ci: consistent workflow for all tests by @g105b in #351
- feature: allow passing initialisation queries in settings by @g105b in #354
- Dynamic sets by @g105b in #356
- Datetime from timestamp by @g105b in #361
- Split queries by semicolon by @g105b in #362
New Contributors
- @dependabot made their first contribution in #310
Full Changelog: v1.4.0...v1.4.2
Initialisation queries, dynamic sets and other minor improvements
What's Changed
- Static analysis: improve typing throughout by @g105b in #241
- test: hard dependencies by @g105b in #309
- Bump phpstan/phpstan from 1.8.0 to 1.8.1 by @dependabot in #310
- maintenance: dependabot by @g105b in #319
- Update ci by @g105b in #342
- CI improvement by @g105b in #349
- ci: consistent workflow for all tests by @g105b in #351
- feature: allow passing initialisation queries in settings by @g105b in #354
- Dynamic sets by @g105b in #356
- Datetime from timestamp by @g105b in #361
- Split queries by semicolon by @g105b in #362
New Contributors
- @dependabot made their first contribution in #310
Full Changelog: v1.4.0...v1.4.1
CLI and other improvements
The main change in this release is the long-awaited conversion to a PhpGt/Cli application. The migrate
command has now been upgraded to work with the Cli tooling which in turn allows the command to be exposed in the gt
set of commands. So now in your WebEngine applications, it's possible to run gt migrate
to handle the migrations.
Another change to note: any usages of DateTime
objects are now typed to allow any DateTimeInterface
.
Default characterset: utf8mb4_general_ci
Across the whole database, unless otherwise stated within the settings, all tables will now use utf8mb4_general_ci
as the default characterset.
This removes any issues when dealing with multibyte characters such as emoji, and simplifies the use of string functions using user-supplied variables within queries and stored procedures.
Alongside these changes are dependency upgrades and the switch to native Github Dependabot, for keeping dependencies up to date.
Nullable primitives and other type improvements
This minor release holds some improvements to the type-safe getters on the Database Row objects. If a field contains a null value, it will always return null from any of the type-safe getters, rather than a zero or empty string.
PHP 8 compatibilty and Github Actions
Two small tweaks here:
Firstly, requiring phpgt/database will work in PHP 8 projects now thanks to the Composer requirements being changed from ^7.4
to >=7.4
. This was breaking WebEngine being installed in PHP 8.
Secondly, we now have a working Github Actions CI workflow. More improvements will be coming over at https://github.com/php-actions soon to improve build times, too.
Have fun!
Port in connection string
If a non-standard port was used, it would need to be set manually before the connection was made. This release includes it in the connection string by default, so changing the database port can be maintained exclusively within the config.ini of the project.
Null checking for typed fetches
This patch improves a bug when dealing with typed fetches, such as $row->fetchDateTime("fieldName")
. If the field was not set on the row, the typed fetch could return a default value rather than null. This has been fixed and null values are preserved, no matter what type is being returned.