Skip to content

Releases: rotexsoft/gdao

2.1.0-RC6

22 Dec 17:05
Compare
Choose a tag to compare
2.1.0-RC6 Pre-release
Pre-release
  • \GDAO\Model\RecordInterface changes
    • public function &getInitialData(): array is now public function &getInitialData(): ?array
    • public function &getInitialDataByRef(): array is now public function &getInitialDataByRef(): ?array

Full Changelog: 2.1.0-RC5...2.1.0-RC6

More API Cleanup

05 Dec 17:12
Compare
Choose a tag to compare
More API Cleanup Pre-release
Pre-release
  • The two Model methods updateSpecifiedRecord & updateMatchingDbTableRows now return self

More API Cleanup

04 Dec 03:36
Compare
Choose a tag to compare
More API Cleanup Pre-release
Pre-release

Full Changelog: 2.1.0-RC3...2.1.0-RC4

More API Cleanup

04 Dec 02:11
Compare
Choose a tag to compare
More API Cleanup Pre-release
Pre-release

Full Changelog: 2.1.0-RC2...2.1.0-RC3

API Cleanup

29 Nov 03:39
Compare
Choose a tag to compare
API Cleanup Pre-release
Pre-release
  • Changed all underscore prefixed properties in the Model class to be non-underscore prefixed for example Model->_primary_col is now Model->primary_col
  • Changed the signature of & logic in Model->__construct. The primary column and table names have replaced the $extra_opts array parameter as the last two parameters. You can no longer use the $extra_opts array to inject values for protected or private properties in the Model, getters & setters have been created to do that now
  • The $extra_opts array parameter as been removed from Model->createNewCollection
  • The $extra_opts array parameter as been removed from Model->createNewRecord
  • Added getters and setters for all non-public properties of the Model class
  • The $extra_opts array parameter as been removed from CollectionInterface->__construct
  • The $extra_opts array parameter as been removed from RecordInterface->__construct

The goal is to reduce magic functionality & allow for fully strictly typed code that ides can auto-complete for easily.

API Cleanup

09 Nov 01:51
Compare
Choose a tag to compare
API Cleanup Pre-release
Pre-release
  • Removed the following Exceptions:

    • GDAO\ModelRequiresPdoInstanceException
    • GDAO\Model\CollectionMustImplementMethodException
    • GDAO\Model\RecordMustImplementMethodException
  • Removed the following methods from the abstract Model class as they do not really make sense to be present at the Model level

    • __call($method, $params)
    • __get($property_name)

Refactored new & very improved version

07 Nov 07:00
Compare
Choose a tag to compare
Pre-release
  • PHP 7.4+ Required

  • Incorporated modern quality assurance tools like GitHub actions with PHPUnit 9, rector & psalm. Stopped using Travis for builds

  • Got rid of the RecordsList helper data-structure for loading records into a collection

    • This has affected the signature of the following methods:
      • \GDAO\Model::createNewCollection(\GDAO\Model\RecordsList $list_of_records, array $extra_opts=[]) is now

        • \GDAO\Model::createNewCollection(array $extra_opts=[], \GDAO\Model\RecordInterface ...$list_of_records): \GDAO\Model\CollectionInterface
      • \GDAO\Model\CollectionInterface::__construct(RecordsList $data, \GDAO\Model $model, array $extra_opts=[]) is now

        • \GDAO\Model\CollectionInterface::__construct(\GDAO\Model $model, array $extra_opts=[], \GDAO\Model\RecordInterface ...$data)
      • \GDAO\Model\CollectionInterface::loadData(RecordsList $data_2_load): void is now

        • \GDAO\Model\CollectionInterface::loadData(\GDAO\Model\RecordInterface ...$data_2_load): self
  • More strict type hinting where possible

  • Changed the foreign_table_sql_params key in \GDAO\Model->_relations to a new key now named sql_query_modifier whose value is expected to be an anonymous function that accepts an object|null & returns an object|null.

    • In this case, the object parameter is the query object used under the hood to fetch related data. Users can use the anonymous function to manipulate the query for fetching the related data & return the manipulated query object right before the query to fetch the related data is executed.
    • This is to accommodate the use of query building libraries like https://github.com/auraphp/Aura.SqlQuery for building queries for fetching data in packages that implement this API.
    • The old system of using php arrays to describe sql query parts in the 1.X version of this package has been removed in this latest version. Leanorm now uses https://github.com/auraphp/Aura.SqlQuery for query building & allows users to inject query building select objects into fetch* methods or just leave it null to allow the fetch* methods to generate generic queries for each fetch operation.
  • The signatures of the fetch* methods have changed from accepting an array of query building parameters to accepting a query building object or null as the first argument & an optional array of the names of relational data to return along with the fetch. For example:

    • \GDAO\Model::fetchRecordsIntoCollection(array $params = []) is now
    • \GDAO\Model::fetchRecordsIntoCollection(?object $query=null, array $relations_to_include=[])
  • Some methods that previously returned void are now returning self to allow for a better fluent method chaining experience

  • This is a release with a lot of backward incompatible changes. It will not work with code based on version 1.x of this package.

  • A full list of the changes can be viewed here 1.1.1-RC1...2.0.0-RC1

Maintenance Release

15 Mar 04:17
Compare
Choose a tag to compare
  • PHP 7.X compatibility
  • Added 'is-empty-string' & 'not-empty-string' operators

Min version of PHP is now 5.6

11 Jul 07:12
Compare
Choose a tag to compare
  • Min version of PHP is now 5.6
  • This 1.X series has no future. Will be working on a new and improved PHP 7.2+ version 2.X in the nearest future.

Getting ready to sunset version 1.X

21 Feb 22:16
Compare
Choose a tag to compare
  • Last 1.X release (though it never got to stable status). Moving on to a revamped 2.X release that will targets PHP 7.2+