📖 back to readme
Cumulus follows semantic versioning.
Any issues should be reported.
Supports PHP 8.1 and drops PHP 7 support.
This version is mostly compatible with the previous one, except for some edge cases regarding Dsn
. Most users won't be affected.
Changes to Dsn
:
Dsn
class is nowfinal
. Use composition to extend functionality.Dsn::getUrl
method removedDsn::get
now only acceptsstring
type as the first argument:- signature changed to
Dsn::get(string $key, mixed $default = null): mixed
- signature changed to
- if the URI provider returns something that is not a string, error is thrown
- "seriously malformed" URIs will throw
LogicException
upon resolution
💡
These changes prevent incorrect or unintended use of the package.
Dsn: PDO now contains port number, if present in the URL.
$dsn = new Dsn('mysql://localhost:3306/my_db');
$dsn->pdo; // mysql:host=localhost;port=3306;dbname=my_db
Added Pipeline
class for easy building of middleware and pipelines.
Dropped PHP 7.1 support.
⚖
License changed to simpler and even more permissive Unlicense.
This change implies no change to usage of the package, commercial and non-commercial alike.
Added trim
to prevent adding _
char instead of unintentional white space chars by
parse_url
.
This potentially changes behaviour (albeit incorrect one) in an edge case,
thus a new minor release and not a patch.
Dropped PHP 7.0 support.
Backward compatibility fix:
Any type of value is now accepted by Dsn
as a URL, but will be ignored, instead of throwing a runtime exception.
Introduced Dsn
class.
Changes:
- the
UrlConfig
class has been replaced byDsn
class and is now deprecated- you can keep using
UrlConfig
, it extendsDsn
now
- you can keep using
- added support for query parameters and fragment
- added option to pass custom mappings as argument to
Dsn
constructor - added possibility to access configuration using array access and magic props
- added value mapping helper
Warning
Even though the public API has not changed, the internal structure has changed in this release.
In case you extend UrlConfig
class, you need to update your implementation.
Added LazyIterator
.
Fixed bug in PDO string returned by UrlConfig::getPdoDsn
.
The initial release. Contains UrlConfig
class.