Skip to content

Releases: semsol/arc2

3.0.1

02 Apr 14:04
3e08bc2
Compare
Choose a tag to compare

What's Changed

  • refector: Drop usage of xml_set_object() by @Girgias in #152

Internal

  • Let workflows run for pull requests as well by @k00ni in #153

New Contributors

Full Changelog: 3.0.0...3.1.0

3.0.0 - PHP 8 only; preparations for long term support

13 Sep 07:22
8ac880c
Compare
Choose a tag to compare

What's Changed

  • Added PHP 8 support; dropped Travis and Coveralls; use Github Actions from now on by @k00ni in #145
  • Huge cleanup (PHP 8 only; prep. for long term support) by @k00ni in #151

Details about #151

  1. ❗ Default table engine changed from MyISAM to InnoDB
  2. Fixed a lot of deprecation warnings in PHP 8.2 (mostly dynamic property usage and deprecated utf8_* usage)
  3. Removed the following DB adapters: mysqli, PDO-sqlite:
    • mysqli adapter was kept for compatibility reasons, has known problems with MySQL 8.0.
    • PDO SQLite was removed because it was buggy and it didn't pass our tests.
    • also removed CachedAdapter
  4. Removed methods:
    • ARC2_Class::queryDB(...), because it relied on outdated mysqli usage.
    • AbstractAdapter + PDOAdapter: getServerInfo(); changed getServerVersion() to use SQL select version() to get DB server version
  5. Cleaned require- and require-dev section in composer.json. For instance, removed symfony/cache.
  6. Upgraded Dockerfile to use PHP 8.2
  7. Field db_con in ARC2 configuration was removed. It used to hold the mysqli connection.
  8. Deployed PHP-CS-Fixer to the whole code base to improve readability.
  9. Updated our Github workflows to use newer DB versions (such as MariaDB 10.5+)
  10. Salvaged a fix from @craigdietrich: fixes #133 and fixes #135

Full Changelog: 2.5.1...3.0.0

2.5.1

19 Jun 14:03
65238a4
Compare
Choose a tag to compare

Small maintenance release.

Overview:

  • small fix in store/ARC2_StoreEndpoint.php (#142, thanks @ailintom)
  • documentation refinements (#141, thanks @samuell)
  • refinements in our CI setup (Travis)

2.5.0

02 Mar 08:09
3e0c610
Compare
Choose a tag to compare

Maintenance release.

Thank you @cbinding and @patrickmcsweeney for your contributions!

Highlights:

  • Fixed a bug where if url is http without explicit port and redirects to https without explicit port we try to ssl connect on port 80 (4f2b54e)
  • URI parsing refactored (added getURIPartsFromURIAndPreviousURIParts in ARC2_Reader)
  • fixed all failing tests
    • our test suite tests only supported versions of PHP, MySQL and MariaDB from now on
  • added basic Docker setup to allow easier local development (see new folder docker)
  • bumped required min. PHP version to 7.2 - this change helps lowering maintenance and tests efforts
  • updated vendors: PHPUnit 8, Symfony Cache 4.*
  • supersedes and closes #134
  • fixed ARC2_Store trying to use the cache if db_adapter was set to mysqli (not supported, only for PDO)

Related project: https://github.com/semsol/arc2/projects/4

2.4

25 Jan 14:00
e65a33d
Compare
Choose a tag to compare
2.4

2.4.0

After years, ARC2 got some love recently! With this release we started improving the RDF store by implementing a sufficient test coverage first and added new features afterwards, like PDO support. This way we should kept backward compatibility. If you still get errors using the RDF store, please open a new issue.

RDF Store changes and improvements

Summary:

  • high test coverage of RDF store related code
  • PDO support
  • mysqli is still available and the default (= stable API, therefore no changes required by you!)
  • added joshcam/mysqli-database-class to interact with mysqli. It provides a nice helper class which makes live easier, when working with mysqli.

High test coverage

Tests were added which focus RDF Store related code. Parts about controlling DB processes are not fully covered. Also, direct interaction with the DB backend (e.g. killing DB processes) is not recommended and support will be removed in a future release. SPARQL Endpoint code is also not tested.

There may be a change in behavior...

We had to change some internals, which may lead to a change in known behavior. If you only rely on the highest level of functions, the following changes shall not be of your concern:

  • ARC2_Class->queryDB: It will only return the result, if mysqli is used as adapter. It returns null in all other cases. The reason is, that direct interaction with the DBS is not recommended. Use ARC2_Class::getDBObjectFromARC2Class to get the current DB adapter and use its functions instead (see src/ARC2/Store/Adapter/AbstractAdapter). They provide helper functions to get exactly one row (fetchRow) or a row list (fetchList).
  • ARC2_Store->getResourceLabel: It uses the parameter $unnamed_label somehow, but it was not possible to create a case, when it will be used. We assume it is not required or only in rare cases?!
  • when using PDO as DB adapter:
    • ARC2 will not create the database, if it does not exist. In this case, you have to create the database yourself.
    • ARC2 will throw exceptions, if a query fails

How to use PDO

Add the field db_adapter with pdo to your database configuration, like:

$dbConfig = [
    // ...
    'db_adapter' => 'pdo',
    'db_pdo_protocol' => 'mysql',
];
$store = ARC2::getStore($dbConfig);

// $store uses PDO to access the database

About backward compatibility

We wanted to keep backward compatibility in the 2.x branch for as long as possible. This means, supporting PHP 5.3 and newer. Even if officially PHP 5.6+ is required, version 2.3.1 and below claims to run on PHP 5.3.

Summary:

  • increased support for PHP 5.3 (e.g. by replacing array short syntax by extend syntax) - array short syntax was introduced with PHP 5.4.
  • removed some commented out code
  • improved code readability in classes of the store folder
  • dropped MySQL 4.x support

MySQL 4.x support dropped

Code related to MySQL 4.x was removed and with that the support for MySQL 4.x. This major release is over 10 years old and receives no updates/fixes from Oracle or the community. Based on the MySQL EOL Notice, support for MySQL 4.1 ended in 2009.

Internal changes

The following changes break the internal API, but should not be of your concern, because its very likely that you don't use these classes or functions. If you do and this breaks your stuff, please create new issue here.

  • ARC2_StoreLoadQueryHandler
    • changed parameter list of autoRepairTable from $er, $con, $sql = '' to $er, $sql = ''. Parameter $con was removed due new DBS layer.
  • getting the connection ID or connection itself is only possible when using mysqli as DB adapter. If you use something else, related functions will NOT return expected data and some internal array values maybe unset (e.g. ->a). Attached to the underlying DB makes it impossible to replace the adapter, therefore further decoupling.

v2.2.4

12 Dec 15:08
Compare
Choose a tag to compare
Improve crc32-based getValueHash method to work better on 32 and 64 b…

…it machines.