PHP.GT

Latest releases

ProtectedGlobal: October 2025 release

Published on by Greg Bowler

This is a new major version release because of the backwards breaking changes introduced. Even though the changes are simple, they will break existing projects - the main protect and override functions have had their static keyword removed. This change was to increase testability of consuming applications, notably WebEngine.

Full Changelog: https://github.com/phpgt/ProtectedGlobal/compare/v1.1.2...v2.0.0

Config: PHP 8.4 compatibility and better type-safety

Published on by Greg Bowler

What’s Changed

New Contributors

Full Changelog: https://github.com/phpgt/Config/compare/v1.1.0...v1.1.1

Session: September 2025 release

Published on by Greg Bowler

This release addresses a change in how sessions are constructed (more specifically, how unserialize handles errors).

Upgrading to the previous release v1.2.3 could have caused an issue where the contents of the session data was not unserializable, and caused a fatal error to be thrown. If this happens in this release, the session is destroyed and created again on the next request.

What’s Changed

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

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

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