Promise: Initial pre-release
Published on by Greg Bowler
The Promise library is being extracted from the PHP.Gt/Fetch repository, and in the process being simplified and code quality is being improved thanks to PHPStan.
Published on by Greg Bowler
The Promise library is being extracted from the PHP.Gt/Fetch repository, and in the process being simplified and code quality is being improved thanks to PHPStan.
Published on by Greg Bowler
In this patch release, you’ll see a newly improved CI pipeline, now fully utilising Github Actions.
The only changed functionality seen in this release is to silently fail on a session_destroy call, which occurs if the tmp file is removed/damaged at session start. The failure is now silent, which means that there will be no risk in accidentally sending the headers early if the error reporting is set to all.
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.
Published on by Greg Bowler
Type-safe functions have been added to the Json object, along with enhanced iterator functions. This release is being made ready for the work starting on v2, where PhpGt’s Async functions are integrated as opposed to React’s.
Published on by Greg Bowler
A few minor updates to the CI process have been made, along with a new test and functionality fix to innerHTML thanks to @speich.
Published on by Greg Bowler
Two small tweaks here:
Firstly, requiring phpgt/database will work in PHP 8 projects now thanks to the Composer requirements being changed from ^7.4 to >=7.4. This was breaking WebEngine being installed in PHP 8.
Secondly, we now have a working Github Actions CI workflow. More improvements will be coming over at https://github.com/php-actions soon to improve build times, too.
Have fun!
Published on by Greg Bowler
The SqlBuilder repository gets a major step closer to being production-ready with this pre-release.
Implemented now are the InsertQuery, SelectQuery, UpdateQuery, DeleteQuery and ReplaceQuery classes, with all the functions ready for representing tables, conditions, limits, orders, etc.
Still to come before v1 is a refactoring to improve the query classes inheritance (some functionality is shared between different query types), compatibility testing with other database engines, and improvements to the return types of functions.
Published on by Greg Bowler
The following improvements have been made in this release:
$document->getElementById("test")->parentNode->nextElementSibling should still be Gt\DomTemplate\Element, but was sometimes indicating Gt\Dom\Element.bindNames implemented, allowing form elements to have their values bound by their names.Published on by Greg Bowler
value attribute, getting and setting on the same request would not persist data.disabled, checked, etc. all correspond to their correct HTML attributes.Published on by Greg Bowler
If a non-standard port was used, it would need to be set manually before the connection was made. This release includes it in the connection string by default, so changing the database port can be maintained exclusively within the config.ini of the project.
Published on by Greg Bowler
This patch improves a bug when dealing with typed fetches, such as $row->fetchDateTime("fieldName"). If the field was not set on the row, the typed fetch could return a default value rather than null. This has been fixed and null values are preserved, no matter what type is being returned.
Published on by Greg Bowler
This minor release simply adds an extra layer of organisation to the various HTTP exceptions relating to HTTP response statuses. The different exception types are now organised into Redirect (3XX), Client (4XX) and Server (5XX) namespaces.
Published on by Greg Bowler
Published on by Greg Bowler
Along with a dependency bump, this release brings the ability to bind the key of a key-value-pair data structure (such as an associative array) to a template element, with unnamed bind parameters.
Using the _key bind parameter will bind whatever the key is in a key-value-pair iterator. Nice for passing around associative arrays.
An example:
<ul>
<li data-template>
Name: <span data-bind:text="_key">Person Name</span>,
Age: <span data-bind:text>0</span>
</li>
</ul>
Published on by Greg Bowler
This release includes many exception classes: one for every HTTP status code. This will allow applications that utilise this repository as a dependency to throw and catch individual status codes by name, improving the execution model.
Published on by Greg Bowler
The serve command has always had the ability to bind to a custom port and hostname with the -p|--port and -b|--bind arguments, and with this minor release, these two arguments have now been exposed on the run command.
To run your project on port 8765:
gt run -p 8765
Have fun!
Published on by Greg Bowler
This library doesn’t get many releases because of it’s simplicity, but today we’re releasing a simple change as an improvement that WebEngine will take advantage of straight away.
The protectAndInject function of the HTMLDocumentProtector now returns the token it generates, which will be used to send the token as a response header in the WebEngine’s dispatcher.
The purpose of this change is simply to make client-side development slightly easier when dealing with CSRF tokens, specifically when making POST requests, such as when uploading a file using the browser’s fetch API.
Published on by Greg Bowler
In the improbable (but possible) event that a session is corrupted (think load balanced app after being upgraded to new release), this release destroys the session and silently starts a new one.
With this release comes some improvements to the unit tests, see the commit history for more information.
Published on by Greg Bowler
The $_SERVER["REQUEST_URI"] value is now mapped with greater compatibility to Server::getRequestUri() by breaking down each parsed part of the URI, meaning you can now get access to the scheme, host, port, path and query string parts individually.
Published on by Greg Bowler
One new class and an interface is provided in this release.
The SessionContainer interface defines extremely simple functionality: get, set, contains and remove functions. This interface is applied to the Session class and the contained SessionStore class.
Why introduce such a simple interface? This is so that other PHP.Gt applications built using WebEngine will be able to be build in a way that their components become inter-operable with other projects that do not use the PHP.Gt/Session functionality.
This is why the SessionArrayWrapper class has been introduced, which too also implements the SessionContainer interface. This class takes an array in the constructor and stores it internally by reference, which means projects that use the $_SESSION superglobal can now make use of PHP.Gt features, and vice-versa.
Published on by Greg Bowler
Nothing exciting here, just an update to the dependencies and some tests for switching CI to Github Actions.
Published on by Greg Bowler
This minor release ensures that all MySQL connections are made in the same collation as the migrations are made in. This was only ever causing errors when working with variables in queries, and could be overcome in code, but has been fixed for convenience at the point that the connection is made.
Published on by Greg Bowler
PHP 7.4 brings extra functionality implemented in phpgt/daemon - improvements to the way sub processes are executed.
Published on by Greg Bowler
There are two improvements to how empty datasets are treated in this release:
:empty is more reliable for using in CSS to display a message such as “This list has no entries yet”.bindNestedList as with bindList.Have fun!
Published on by Greg Bowler
Since PHP 7.4, processes are no longer executed in a new subshell, which improves the mechanism of dealing with long-running processes. This release adopts this new change, through the use of PhpGt/Daemon.