Changelog - Version 7.0
Status: in development. This document tracks changes landing on the
7.0branch. Nothing here is released yet, and the contents may still change.
Breaking Changes
Enum cases renamed to PascalCase
Enum cases follow the ByJG standard and are written in PascalCase. The backed values did not
change, so ->value, from(), tryFrom() and stored data are not affected; only code that
names a case (or reads ->name) has to be updated.
The Relation enum from byjg/anydataset 7.0 was renamed the same way (Relation::EQUAL is now
Relation::Equal, etc.); update the filters you pass to MongoDbDriver.
| Enum | Before (6.x) | After (7.0) |
|---|---|---|
DynamoDbAttributeType | NUMBER, STRING, BINARY, BOOLEAN, NULL, MAP, LIST, STRING_SET, NUMBER_SET, BINARY_SET | Number, String, Binary, Boolean, Null, Map, List, StringSet, NumberSet, BinarySet |
KeyValueCacheEngine removed
ByJG\AnyDataset\NoSql\Cache\KeyValueCacheEngine (the PSR-16 cache on top of a Key/Value store)
was removed, together with its documentation page (cache.md). It only worked with the S3 driver:
Cloudflare KV does not implement has(), and DynamoDB needs key options the cache never passed.
It was also the only reason this package required byjg/cache-engine, which is no longer a
dependency.
Use a cache from byjg/cache-engine instead (Redis, Memcached, FileSystem, ...). The Key/Value drivers (S3, DynamoDB, Cloudflare KV) are unchanged.
AWS drivers: no credentials in the URI means the SDK default provider chain
AwsS3Driver and AwsDynamoDbDriver without a user in the URI (s3://us-east-1/bucket,
dynamodb://us-east-1/table) now leave the credentials to the AWS SDK default provider chain:
environment variables (AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY), the ~/.aws files, then the
ECS/EC2 instance role. Before, they passed an empty static key and secret, so every request was
signed with empty credentials and an IAM role was never used. With byjg/uri 7.0 (absent parts are
null) the old code threw InvalidArgumentException: Credentials must be ... in the constructor.
key@region (a key without a secret) still uses the static key with an empty secret.
key:secret@region is unchanged.
Bug Fixes
MongoDbDriver: theuri.anddriver.connection string options now reach the MongoDBManager. Before, every option was rejected with "Invalid option" (parse_str()turns the.into_); and even past that,uri.options were dropped anddriver.options were passed with the prefix still on the key.uri.options are now added to the MongoDB connection string (so typed values such asuri.wtimeoutMS=500work), anddriver.options are passed as driver options without the prefix.MongoDbDriver: a connection string with a host list (mongodb://server1,server2/db) now throws anInvalidArgumentException. Before, only the first host was used and the database name was wrong (,server2/db). Use a single seed host withuri.replicaSet=<name>instead.MongoDbDriver: the username and password are now percent-encoded in the MongoDB connection string. Before, they were passed decoded, so a credential with@,:,/,%,?or#broke the connection string or authenticated with the wrong credentials. Pass them percent-encoded in the URI (e.g.p%40ssforp@ss). Requires byjg/uri 7.0, which returns the username decoded like the password.MongoDbDriver: a username or password of"0"was treated as missing (!empty()), so the connection was opened without credentials. Both are now used; authentication is only skipped when the username or the password is absent or empty.
Requirements
- PHP 8.3, 8.4, 8.5 and 8.6 are now supported:
"php": ">=8.3 <8.7". The previous<8.6upper bound excluded PHP 8.6, since<8.6is exclusive.
ByJG dependencies
byjg/anydatasetis now^7.0.byjg/cache-engineis no longer required (seeKeyValueCacheEngineremoved above).byjg/serializeris now^7.0.byjg/webrequestis now^7.0.
While 7.0 is unreleased these resolve to 7.0.x-dev from each component's
7.0 branch, via minimum-stability: dev with prefer-stable: true.
Toolchain
-
PHPUnit updated to
^12.5. -
Psalm is installed as
psalm/pharinstead ofvimeo/psalm.vimeo/psalmlists the PHP versions it supports and no published release includes 8.6, so as a dev dependency it madecomposer installfail on the 8.6 build job before any test ran.psalm/pharrequires onlyphp ^8.2and bundles its own dependencies, so it installs on every PHP version in the matrix and cannot conflict with the project's. Psalm itself still refuses to run on 8.6, which is why the Psalm job uses 8.5.composer psalmruns it. -
PHPUnit 13 is deliberately not used. It requires PHP
>=8.4.1, breaking the 8.3 floor.
Continuous Integration
- The build matrix now includes PHP 8.6.
- The Psalm job runs on PHP 8.5.
Housekeeping
phpunit.xml.distrenamed tophpunit.xml.- The documentation pages were renamed to kebab-case (
aws-dynamodb-key-value.md,aws-s3-key-value.md,cloudflare-kv.md,mongodb.md), so their addresses on the documentation site change as well. phpunit.xmlsetsignoreIndirectDeprecations="true". PHP 8.6 deprecatesisas a class name, andguzzlehttp/promises(required by the AWS SDK) has a class calledIs. Deprecations raised inside this package's ownsrc/still fail the suite.