semsol / arc2

ARC RDF Classes for PHP
Other
332 stars 89 forks source link

Huge cleanup (PHP 8 only; prep. for long term support) #151

Closed k00ni closed 1 year ago

k00ni commented 1 year ago

Huge (with big H) cleanup of the code base to prepare it for long term support. In the following a summary of all major changes:

  1. :exclamation: 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

CC @semsol @bnowack What do you think? The library is barely used and didn't receive any updates since 2021. Because it is a dependency of my EasyRdf fork (https://github.com/sweetrdf/easyrdf), I want it to remain stable and somewhat working on newer PHP versions.

Merging this pull request will result in version 3 to be released :exclamation:

bnowack commented 1 year ago

Absolutely fine with me. Thanks for still putting work into the library :-)