Releases: semsol/arc2
3.1.0
What's Changed
- ❗ Removed remaining cache-related code parts: this should be no problem because the functionality was removed in 3.0.0 anyway.
- Fix : PDO::exec returns a false equivalent by @dev-quentin in #157
Internal changes
- fixed Docker setup (missing docker-compose file)
New Contributors
- @dev-quentin made their first contribution in #157
Full Changelog: 3.0.1...3.1.0
3.0.1
3.0.0 - PHP 8 only; preparations for long term support
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
- ❗ Default table engine changed from MyISAM to InnoDB
- Fixed a lot of deprecation warnings in PHP 8.2 (mostly dynamic property usage and deprecated utf8_* usage)
- 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
- Removed methods:
ARC2_Class::queryDB(...)
, because it relied on outdated mysqli usage.- AbstractAdapter + PDOAdapter:
getServerInfo()
; changedgetServerVersion()
to use SQLselect version()
to get DB server version
- Cleaned require- and require-dev section in
composer.json
. For instance, removedsymfony/cache
. - Upgraded Dockerfile to use PHP 8.2
- Field
db_con
in ARC2 configuration was removed. It used to hold the mysqli connection. - Deployed PHP-CS-Fixer to the whole code base to improve readability.
- Updated our Github workflows to use newer DB versions (such as MariaDB 10.5+)
- Salvaged a fix from @craigdietrich: fixes #133 and fixes #135
Full Changelog: 2.5.1...3.0.0
2.5.1
2.5.0
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
inARC2_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
- another reason is, that all PHP versions prior to 7.2 are out of maintenance https://www.php.net/supported-versions.php
- updated vendors: PHPUnit 8, Symfony Cache 4.*
- Symfony 4.4 is the latest version with long term support
- PHPUnit 8 is the oldest version, which is still under maintenance: https://phpunit.de/supported-versions.html
- supersedes and closes #134
- fixed ARC2_Store trying to use the cache if
db_adapter
was set tomysqli
(not supported, only for PDO)
Related project: https://github.com/semsol/arc2/projects/4
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 withmysqli
. 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.
- changed parameter list of autoRepairTable from
- 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.