PHP.GT

Latest releases

DomTemplate: Improvements to Bindable

Published on by Greg Bowler

  • Optional bind keys with question mark parameter
  • Allow binding of named templates without specifying name
  • Allow templates to be referenced outside of the tree path
  • Unit test coverage improved
  • CodeSniffer warnings resolved

DomTemplate: Feature complete

Published on by Greg Bowler

All originally scoped features are now implemented, but some real world use-cases must be tested before we get close to a production release.

  • Invalid bind properties are caught
  • Bind attributes are tidied
  • Template attributes are tidied
  • Templates are removed from document

DomTemplate: Full code coverage

Published on by Greg Bowler

Now that this repository has been prototyped, it has reached full test coverage. Let’s keep it at 100% as new features are introduced.

Dom: Many minor improvements

Published on by Greg Bowler

  • Tests improved
  • Standardisation of scope resolution
  • Methods wrapped with extended types
  • Methods return types standardised
  • Dropped templates from documentation - use DomTemplate instead
  • Updated code to match StyleGuide
  • Introduced CircleCI 2.0
  • Upgraded PHPUnit to v6

Build: Basics working

Published on by Greg Bowler

  • Versions of required build software checked
  • Build runner runs in the background forever
  • Matching file changes detected
  • Build software executed when needed

Build: Basics scoped out

Published on by Greg Bowler

  • The BuildRunner class is run from the WebEngine’s bin directory
  • JSON file parsed and expanded into TaskList
  • TaskList contains multiple Task objects
  • Each Task has a number of Requirement objects
  • Globs expanded in Task to match all files
  • Files are md5 hashed for whatever watch system is decided upon

Input: API changes

Published on by Greg Bowler

As unit test coverage increases, APIs change.

The Input class itself shares its data access methods with the InputData class for ease of use and quick on-the-fly data access.

Accessing data is done using ArrayAccess now, rather than property access, due to the StyleGuide specifying “Only properties should be used when a predefined set of data attributes can be determined”.

Input: Input class fully tested

Published on by Greg Bowler

The basics are working. The Input class can be constructed from the $_GET, $_POST and $_FILES arrays. with(), without(), withAll() have been tested when calling them on the Input class themselves, and the correct callbacks are called.

Http: Bare bones

Published on by Greg Bowler

This first pre-release marks just enough functionality to implement the rest of the WebEngine.

Database: Variable argument bugfixes

Published on by Greg Bowler

Allowing named or ordered bindings utilised the new PHP feature of variable arguments, using the ... operator. This new feature, coupled with the shorthand helper methods caused a situation where bindings could be doubly nested.

Database: Shorter more expressive syntax

Published on by Greg Bowler

The introduction of the concept of a QueryCollection meant that longhand API usage was too wordy and had too many steps to perform simple operations.

This release includes a new shorter syntax and due to this syntax being preferred, dropping accessing QueryCollection via ArrayAccess (backwards breaking).

New syntax:

$db = new Client();

$customer = $db->fetch("customer/getById", ["id" => 123]);
$customerList = $db->fetchAll("customer/getInTown", ["town" => "London"]);
$newCustomerId = $db->insert("customer/create", $details);
$updatedCount = $db->update("customer/setDetails", $details);
$deletedCount = $db->delete("customer/deleteOlderThan", ["createdAt" =>new DateTime("-30 days")]);

Database: Pure PDO dependency

Published on by Greg Bowler

As in v1 we are not supporting any QueryBuilder or SchemaBuilder, we’re dropping the requirement of Illuminate’s database layer. There was no benefit from the heavy reliance on Reflection, so now it’s been removed and there is only a dependency on PDO itself.

Dom: Full DOM compatibility

Published on by Greg Bowler

  • All DOM class implementations’ methods/properties tested
  • UTF-8 compatible
  • Level 4 methods (matches, remove, etc.)
  • TokenList
  • Fully type-hinted to PHP 7.0 capabilities, docblocks used where needed