Skip to content

Version 2.9.1

Compare
Choose a tag to compare
@darkain darkain released this 20 Nov 20:09

MASSIVE update in preparation for Version PUDL 3.0

Besides what is listed below, there have been:

  • Countless additions to method comments.
  • File reorganization.
  • Code formatting cleanup.

PUDL:

  • Added specific types of Exceptions that all inherit from pudlException.
  • Timeouts are now supported by most database drivers.
  • Removed all references to global $db variable.
  • pudl::$version (variable) replaced by pudl::version (constant).
  • Added several more ::version_ constants.
  • chunk() method no longer runs if we're not actively inside of a transaction.
  • Removed support for PUDL_INDEX, PUDL_NUMBER, PUDL_BOTH. All methods will now always use PUDL_ARRAY.
  • Added insertInto() and replaceInto() methods.
  • Fixed JSON support in more cases.
  • Added file ownership verification check. This is only used with Altaform for the time being.
  • Removed MariaDB dynamic column support. We now only support JSON, since it is more universal.
  • Added some UTF-8 validation testing.
  • Added support for the newer Microsoft "sqlsrv" SQL Server driver.
  • Legacy drivers (MySQL, MSSQL) must now be specified with "-deprecated"
  • Database instance type names are now fully case insensitive.
  • Added several aliases for database instance type names, such as "mariadb" and "percona"
  • Added better security to session cookies in pudlSession.
  • Removed HTML from error messages.
  • The "prefix" configuration option now takes in an array to handle multiple prefix replacements and automatic prefix adding.
  • Removed all references to $die, instead Exceptions are thrown that can be caught in cases where we don't want execution to end.
  • Persistent connections are now optional everywhere.
  • Changed all references from _clause() to _where() internally.
  • All references to external libraries getvar and afUrl have been removed.
  • Added class type hints in several locations.
  • Removed $pudl->query('SQL QUERY') support, should now only use invoke via $pudl('SQL QUERY').

Query Generator:

  • GENERATED columns are better detected now.
  • Added method addVersioning($table) to add versioning support to a database table.
  • Added experimental new syntax for simplified JOINs.
  • Removed support for "LOCK FOR UPDATE" in normal method calls.
  • Added support for "LOCK FOR UPDATE" to selex method.
  • "UPSERT" now supported in most database engines.
  • Selex now supports "HAVING" and "ON".
  • Added experimental CTE support.

File Importer:

  • Now throws exception instead of silently ignoring errors.
  • Errors now report full JSON data, rather than just row number, to help debug data errors.

Unit Tests:

  • PUDL object is now passed into every single test, so we can use multiple instances.

MySQL:

  • Added check for read-only mode.

Galera:

  • Added support for error code 1927 "CONNECTION WAS KILLED"
  • Added randomization to connection retry, to help ensure we're not hammering a new server with many connections all at once.

Sqlite, PDO, PostgreSQL, SqlSrv:

  • All massively updated to be closer to MySQL variant drivers.

pudlObject:

  • Added several more methods:
    ** exclude()
    ** search()
    ** random()
    ** map()
    ** values()
    ** trim()
    ** ltrim()
    ** rtrim()
    ** sum()
    ** min()
    ** max()
    ** chunk()