PHP.GT

Latest releases

Dom: July 2023 patch release

Published on by Greg Bowler

What’s Changed

Full Changelog: https://github.com/PhpGt/Dom/compare/v4.1.2...v4.1.3

DomTemplate: Introduce data-element

Published on by Greg Bowler

This release introduces a helper attribute, data-element, which can be used to remove unbound elements from the document. Documentation here: https://github.com/PhpGt/DomTemplate/wiki/automatically-remove-unbound-elements

What’s Changed

Full Changelog: https://github.com/PhpGt/DomTemplate/compare/v3.2.0...v3.2.1

Fetch: Refactor web APIs to phpgt/http

Published on by Greg Bowler

This release refactors the web API classes used in this repository into the upstream phpgt/http library.

What’s Changed

New Contributors

Full Changelog: https://github.com/PhpGt/Fetch/compare/v1.1.0...v1.1.1

Sync: Sync as symlinks

Published on by Greg Bowler

In this minor release, a new feature is added: sync a directory/file by symlinking it in place. This is built specifically to address a common web development pattern: serving content from outside of the web root, without having to synchronise all files/directories every time there’s a change.

What’s Changed

Full Changelog: https://github.com/PhpGt/Sync/compare/v1.2.9...v1.2.10

Http: Asynchronous response body functions

Published on by Greg Bowler

When you have a Response object, you can now call the standard text(), json(), etc. functions, which return a Promise that will resolve with the appropriate type. When set up with an async loop, this can achieve multiple concurrent response streaming.

This was implemented for usage within https://www.php.gt/fetch

What’s Changed

Full Changelog: https://github.com/PhpGt/Http/compare/v1.1.10...v1.2.0

Promise: Simplify exception handling

Published on by Greg Bowler

In this minor patch release, exceptions that are handled in the chain already are stored. This is to prevent an rejection being handled more than once per call.

Promise: Uncaught exceptions are thrown on main thread

Published on by Greg Bowler

In this minor patch release, to match the expectations of working with code that throws exceptions, when there is no catch() method in the promise chain, any exceptions that are raised will be thrown to the main thread, causing a fatal error.

What’s Changed

Full Changelog: https://github.com/PhpGt/Promise/compare/v2.2.1...v2.2.2

Session: Same-site cookie option

Published on by Greg Bowler

After enhancing the default security options in v1.1.5, this has added difficulty to some users when developing locally (as a strict same-site cookie option causes lots of issues on localhost or 127.* IPs). The default option is now changed to Same-site: Lax, which introduces the cookie option but doesn’t enforce the strict policy on localhost.

Curl: Loosening of types for test frameworks

Published on by Greg Bowler

The only change in this minor patch release is a loosening of types on the CurlInterface, which allows for test frameworks to inject their own CurlInterface implementation - the purpose of this library is to help test endpoints without requiring an internet connection, so this is a vital feature.

What’s Changed

Full Changelog: https://github.com/PhpGt/Curl/compare/v3.1.0...v3.1.1

Promise: Simplification of chain handling

Published on by Greg Bowler

This release introduces much more QA tooling and matrix builds in Github Actions.

There has been significant effort put into the refactoring of handleChain() function, so that it is easier to understand and debug. This was done because of an outstanding bug with the Fetch library.

Every effort has been put in place to retain the same footprint, as the unit tests show.

What’s Changed

Full Changelog: https://github.com/PhpGt/Promise/compare/v2.2.0...v2.2.1

Session: CI and QA improvements

Published on by Greg Bowler

Matrix builds are now standard for every push, building on all supported PHP versions concurrently.

During the CI process, three QA tools are introduced: Mess Detector, Code Sniffer and PHPStan.

Have fun!

DataObject: CI and QA improvements

Published on by Greg Bowler

Matrix builds are now standard for every push, building on all supported PHP versions concurrently.

During the CI process, three QA tools are introduced: Mess Detector, Code Sniffer and PHPStan.

Have fun!

Curl: March 2023 minor release

Published on by Greg Bowler

This minor release was made following on from the documentation being finalised, after everything has been tested with real usage.

The only functionality introduced/changed is in regards to the header/write function callback usage - now, if there is an existing write function, a new one will not be added when adding a Curl to a CurlMulti.

Read about concurrent curl requests here: https://github.com/PhpGt/Curl/wiki/Concurrent-Curl-requests