PHP.GT

Latest releases

Cron: Cli improvements

Published on by Greg Bowler

In this patch release, the Cli command has been improved to follow a standard namespace pattern (Gt\RepoName\Cli) and to use the Cli Command’s inbuilt stream.

Build: CI, CLI and type safety improvements

Published on by Greg Bowler

No new functionality in this release, but plenty of minor improvements. Mainly:

  • CI has moved to Github Actions now.
  • CLI is now working with the latest PhpGt/Cli release.
  • Type safety has been improved by introducing phpstan (more improvements planned)

Database: CLI and other improvements

Published on by Greg Bowler

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.

Cli: Minor general improvements

Published on by Greg Bowler

  • Types are tidied up throughout.
  • An argument list is always nullable by default.
  • Composer is used to handle semantic version numbering.
  • An empty string is returned when no user input is detected (rather than null).
  • Dependencies bumped.

Server: Debugger, CI and type safety

Published on by Greg Bowler

It’s now possible to enable XDebug straight from a command line argument --debug.

Now as standard all PHP.Gt repositories follow phpstan level 6 analysis, all type safety has been addressed.

Upgrades to the CI runners.

Logger: v1.0.0 release

Published on by Greg Bowler

This v1 release is made to allow WebEngine v4 applications to drop the “minimum-stability: dev” requirement, but there has been no new functionality added since the initial pre-release.

Have fun logging!

DomTemplate: DOM Facade release (v2)

Published on by Greg Bowler

This release introduces no extra functionality, but changes the model in which the DOM is used, and how data is bound.

The major upgrade is that DOM v3 is now used, meaning that the DOM API is now more consistent with the W3C specification. With that, there are no longer any templating methods added to the DOM - instead there are specific classes that are used to bind data in different ways to different types of element. This is not only more readable, but enhances maintainability in your code by utilising the concept of dependency injection.

Have fun, and stay productive!

Dom: Facade release (v3)

Published on by Greg Bowler

This new version has been a long time in development, but now is the time to make a formal v3 release.

The RC version releases were already fully unit tested, but have been used heavily in real world projects over the last few months, where many improvements have been found.

This stable release is being made after the last static analysis improvements have been made.

As always, have fun and stay productive!

Dom: Facade release candidate 2

Published on by Greg Bowler

This second release candidate is made ready for full release within the month. Included within this RC are minor tweaks, including typehint improvements and the implementation of RadioNodeList. Any future functionality will be made as subsequent v3 releases, the only updates this month will be minor tweaks or bugfixes.

Http: Global state factory

Published on by Greg Bowler

Ready for the v4 release of WebEngine, there needed to be a way to produce a PSR-7 ServerRequest from the global state rather than by supplying a pre-populated RequestInterface. This release contains this the new functionality, along with many minor improvements.

Logger: Initial feature pre-release

Published on by Greg Bowler

Bundled with this pre-release is the functionality to log to any file or stream. There isn’t much more planned than this, but as with all PHP.Gt repositories, a major release cannot be made until it has been used in a few real-world projects.

Have fun!

DomValidation: May 2021 update

Published on by Greg Bowler

In this release, we introduce/test the following validation features:

  • The pattern attribute, and how it displays the title attribute on error.
  • Minimum length and maximum length.
  • Adding a hint to the validation message from within the HTML.
  • PHP 8 compatibility.

Promise: Deferred processes & chaining nested promises

Published on by Greg Bowler

This release comes with some real-world tests, added to mimic the functionality of real-world usage of this library.

In the unit tests you’ll see some lazy-searching over data structures that involve multiple nested promises. There are no backwards breaking changes in this release, but to achieve this functionality, the Deferred class can now be assigned processes to execute as part of its task.

As always, have fun and stay productive!

Dom: Facade release candidate

Published on by Greg Bowler

In this release we take advantage of the facade design pattern to provide a set of classes that iron out any creases with the W3C DOM Specification. In previous versions, we were using libxml-provided classess (DOMDocument, DOMNode, etc.) and extending with our own functionality, but this meant that it was impossible to deviate from the inheritance model supplied by libxml.

The footprint of this version should be identical, but with added classes to represent the different types of Node extension.

Creating objects within the DOM is typically done through Factory classes, as most constructors are private to allow for more controlled/abstracted object creation.

Please test this release candidate and submit feedback through the issues list.

Have fun!

Database: Default characterset: utf8mb4_general_ci

Published on by Greg Bowler

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.

SqlBuilder: New features ready for v1

Published on by Greg Bowler

This release is intended to be feature complete, ready for v1, but as it hasn’t been actively used in any real-world project, the v1 release is going to wait.

New features:

  • Indexed & named parameter helpers - if you are referencing a field that has the same name as an injected parameter, or the injected parameter is done by index, you can use the :fieldName and ?fieldName helper syntax to remove duplication.
  • OOP improved greatly, abstract classes are more meaningful for example, delete from tablename - a delete query can’t not have a from table, so now neither can the abstract delete class.
  • insert...select and replace...select queries are now fully implemented.

Curl: CI and type safety improvements

Published on by Greg Bowler

We’re one step closer to a CI environment fully hosted within Github Actions now, with PHPUnit and PHPStan tests being run within Actions. Codesniffer is planned soon too.

PHP 8 compatibility is made possible thanks to an updated dependency tree.

DataObject: v1 release

Published on by Greg Bowler

The first public stable release of the most boring PHP library has just landed! DataObject adds such simple functionality to projects, but it is an important staple to how repositories within PHP.Gt and beyond will interoperate.

Have fun and stay productive!

WebEngine: Upgraded webpack default compilation

Published on by Greg Bowler

This minor patch release updates the way Webpack compilation is performed for ES6 scripts, so that it defaults to a more sensible production mode and specifies the entry script to script/main.es6.

DomTemplate: Github Actions

Published on by Greg Bowler

This patch release includes two improvements:

  1. CI is handled by Github Actions now - you can check out the build history at https://github.com/PhpGt/Cli/actions

  2. PHPStan level 6 has been applied to the code, meaning certain type hints have been improved for greater readability and future maintainability.

WebEngine: Modularise components

Published on by Greg Bowler

This major release has modularised the components that make up WebEngine. All components are hosted within their own separate PHP.Gt repositories and included using Composer.

This is the first major change to architecture, making the transition to a dependency injected WebEngine in V4 much easier.

Sync: PHP.Gt/Cli compatibility (second change)

Published on by Greg Bowler

For backwards compatibility, this patch release was split into two. Now, exceptions are caught when trying to get an argument value from a parameter that has not been set.

This does not change the functionality of the repository, just the way the integration happens between Sync and Cli.

Sync: PHP.Gt/Cli compatibility

Published on by Greg Bowler

This patch release makes the repository compatible with an upcoming change to PHP.Gt/Cli, which uses PHP’s native type checking instead of a null-checked parameter. Without this fix in place, PHP would throw an exception if the second parameter of ArgumentValueList::get() was passed a null value.

Cron: CI and type safety improvements

Published on by Greg Bowler

This patch release includes three improvements:

  1. CI is handled by Github Actions now - you can check out the build history at https://github.com/PhpGt/Cli/actions
  2. PHPStan level 6 has been applied to the code, meaning certain type hints have been improved for greater readability and future maintainability.
  3. A minor bug was fixed thanks to the stricter types: crontab files that contained only comments would throw an exception prior to this release.

Have fun!