psl
psl copied to clipboard
[meta] version 2.0
new components:
- [Async]
Awaitable
handle + async helpers based onrevolt
( #244 ) - [File] a new high level abstraction for file resources.
- [Network] a high level network abstraction ( #257 )
- [TCP] a TCP implementation of
Network
component ( #257 ) - [Unix] a Unix implementation of
Network
component ( #257 ) - [Runtime] expose information about PHP runtime ( version, extensions, .. etc) ( #258 )
- [System] expose information about the operating system ( name, kernel version .. etc )
- [Intl] - see #63
- [DateTime] - see #27
- [Time]
features:
- [Type] support native PHP 8.1 enums
backward compatibility breaking changes:
- [IO] rework
IO
component to make use ofAsync
component ( non-blocking ) ( #249 ) - [Filesystem] re-implement all I/O functions ( e.g
write_file
) to useFile
component ( non-blocking ) ( #251 ) - [Iter] remove all deprecated functions ( #241 )
- [Arr] remove the component ( #241 )
- remove deprecated psalm plugin ( #242 )
- [Password] replace password algo constants with an enum
- [Str] replace
?string $encoding = null
argument withEncoding $encoding = Encoding::UTF_8
whereEncoding
is an enum with all possible encodings ( #259 ) - [Type] rename
Type\object
toType\instance_of
,Type\object
will be reintroduced in 2.1, where it would behave as a generic type for all objects, with signature offunction object(): TypeInterface<object>
. ( done in #248 )
other:
- drop support for PHP 8.0
@veewee are you aware of any other places where we can make use of enums instead of scalar arguments? 🤔
Scrolled to the source - but havent found much of those. Not sure if possible, but maybe one that covers all hash_algos? https://github.com/azjezz/psl/blob/1.9.x/src/Psl/Hash/algorithms.php
What is the recommended way to install that?
azjezz/psl 2.0.0 requires revolt/event-loop dev-main -> found revolt/event-loop[dev-main, 1.x-dev (alias of dev-main)] but it does not match your minimum-stability.
but I don't really want to allow minimum-stability: dev
oh shout! i completely missed that!
there has been a new release for revolt ( https://github.com/revoltphp/event-loop/releases/tag/v0.2.4 ), so PSL should use that instead of dev-main.
@simPod can you send a PR for this? otherwise, i can do this tomorrow evening.
Here https://github.com/azjezz/psl/pull/348
released 2.0.1 with the fix, thank you :)