PHP.GT

Latest releases

FileCache: Array and Generic type improvements

Published on by Greg Bowler

What’s Changed

Full Changelog: https://github.com/phpgt/FileCache/compare/v1.1.1...v1.1.2

Session: June 2025 release

Published on by Greg Bowler

What’s Changed

Full Changelog: https://github.com/phpgt/Session/compare/v1.2.2...v1.2.3

Fetch: Await functions, upgraded Promises, security fix

Published on by Greg Bowler

Since there is no await keyword in PHP (yet), the functionality has been included by introducing new sister functions to the asynchronous Response body functions, such as json and text. Append await to the function name, and the returned value will be the resolved value of the Promise. $response->awaitJson() will return a JsonObject, rather than a Promise that resolves a JsonObject.

There was a vulnerability within the Github Actions workflow where the project’s build artifact accidentally leaked the Action runner’s token, potentially allowing naughty people to interfere with CI runs.

What’s Changed

Full Changelog: https://github.com/phpgt/Fetch/compare/v1.2.0...v1.2.1

Input: May 2025 release

Published on by Greg Bowler

This release is being made to bring compatibility between GT/Input, GT/Http, and GT/Fetch. There are some cyclic dependencies between these repos, and with the release of the improved GT/Promise functionality, everything is getting improved at the same time here.

What’s Changed

Full Changelog: https://github.com/phpgt/Input/compare/v1.3.1...v1.3.2

Promise: Improved chain handling

Published on by Greg Bowler

What’s Changed

  • Fixed handling of finally within promise chains (#75).
  • Improved rejection handling to resolve chains with a static value (#75).
  • Fixed new issues in chain resolution, ensuring expected behavior (#75).
  • Added tests to validate exception handling when catch is not configured.
  • Began tests for unhandled promise rejections.
  • Simplified and refactored complex and duplicated code for maintainability.

Full Changelog: https://github.com/phpgt/Promise/compare/v2.3.0...v2.4.0

Input: New selectPrefix function

Published on by Greg Bowler

Now we’ve deprecated the Input::with* functions in favour of Input::select, there’s a new select function in town: selectPrefix is used to select a trigger when any of the input parameters begin with the provided prefix. The original issue was described in #13

What’s Changed

Full Changelog: https://github.com/phpgt/Input/compare/v1.3.0...v1.3.1

Database: Improved exception handling

Published on by Greg Bowler

Along with a better model for handling exceptions with friendlier messages, this release brings the CI test runners up to speed with PHP 8.4’s changes, while still maintaining compatibility back to PHP 8.1.

What’s Changed

Full Changelog: https://github.com/phpgt/Database/compare/v1.6.1...v1.6.2

Cookie: Multi-build CI runners

Published on by Greg Bowler

What’s Changed

New Contributors

Full Changelog: https://github.com/phpgt/Cookie/compare/v1.0.2...v1.0.3

Json: Schema validation

Published on by Greg Bowler

In this release, we can now automatically validate JSON objects according to a schema. This feature exists so that WebEngine applications can serve JSON API endpoints with the same effort as HTML pages.

Read the wiki for more information!

DataObject: PHP 8.4 compatibility and better type-safe arrays

Published on by Greg Bowler

This library has been upgraded to fully support PHP 8.4, including removal of any deprecations from previous PHP versions, and the implementation of explicit nullable types.

The type-safe array functions have been improved to bring more consistency with other type-safe functions. The main change is how exceptions are raised: if the value within an array can be cast to the specified type, it will automatically cast (just as it does with the existing type-safe functions), but if not, PHP will throw the appropriate error to indicate that a class can’t be cast to a type (or a value can’t be cast to a class).

What’s Changed

Full Changelog: https://github.com/PhpGt/DataObject/compare/v1.0.7...v1.1.0

Input: getBodyJson() and `with*` deprecations

Published on by Greg Bowler

This release deprecates all with* functions, because typically functions beginning with with are reserved for immutable object usage. Input has been using with functions to call callback functions with different input parameters selected - instead, we are now naming these functions select.

There’s a 1:1 mapping between the deprecated functions - see @deprecated notices in code.

What’s Changed

Full Changelog: https://github.com/PhpGt/Input/compare/v1.2.5...v1.3.0

CssXPath: Pseudo-selectors and PHP 8.4 support

Published on by Greg Bowler

What’s Changed

Full Changelog: https://github.com/PhpGt/CssXPath/compare/v1.2.0...v1.2.1

Dom: PHP 8.1 -> 8.4 compatibility

Published on by Greg Bowler

What’s Changed

New Contributors

Full Changelog: https://github.com/PhpGt/Dom/compare/v4.1.6...v4.1.7

What’s Changed

New Contributors

Full Changelog: https://github.com/PhpGt/Dom/compare/v4.1.6...v4.1.7