Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 21 commits into from
Sep 13, 2023
Merged

Conversation

k00ni
Copy link
Collaborator

@k00ni k00ni commented Aug 29, 2023

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. ❗ 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 Any reason SELECTing on a predicate wouldn't be working? #133 and fixes fetchRow() returns false, not null, resulting in false positive for hasHashColumn() #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 ❗

@k00ni k00ni added enhancement waiting for feedback Waiting for essential feedback of one of the parties in the conversation. labels Aug 29, 2023
@k00ni k00ni requested review from semsol and bnowack August 29, 2023 10:12
@k00ni k00ni self-assigned this Aug 29, 2023
@bnowack
Copy link
Collaborator

bnowack commented Aug 29, 2023

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

@k00ni k00ni removed the waiting for feedback Waiting for essential feedback of one of the parties in the conversation. label Aug 29, 2023
@k00ni k00ni marked this pull request as ready for review August 29, 2023 12:47
@k00ni k00ni merged commit 8ac880c into master Sep 13, 2023
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants