Skip to content

Commit 934e199

Browse files
committed
Updated Changelog for v6-7.
Updated ImportConnector in UML class diagram. Updated Readme (minor).
1 parent 4a572ec commit 934e199

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Porter change log
22

3+
## 7.0.0 – Unified API
4+
5+
Unifies the synchronous and asynchronous APIs, so they are one and the same.
6+
7+
### Breaking changes
8+
9+
* Removed all async-specific code paths, including `Porter::fetchAsync()` and `Porter::fetchOneAsync()`.
10+
* Renamed `ImportSpecification` -> `Import`.
11+
* Renamed `StaticDataSpecification` -> `StaticImport`.
12+
* Changed `Porter`, `MemoryCache` and all outstanding exceptions' inheritance accessibility to `final`.
13+
14+
## 6.0.0 – Fibers
15+
16+
Replaces coroutines with fibers as the new async technology.
17+
18+
### Breaking changes
19+
20+
* Removed support for PHP less than 8.1.
21+
* Removed support for Amp v2 in lieu of Amp v3 (beta).
22+
* All methods returning `Amp\Promise` were changed to their underlying type.
23+
* Added union types and `mixed` where appropriate, e.g. `Connector|AsyncConnector`.
24+
* Changed `PorterRecords` semantics to always run generators to the first suspension point.
25+
326
## 5.0.0 – Async
427

528
Porter v5 introduces asynchronous imports and complete strict type safety (excluding union types and generics).

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Asynchronous
172172

173173
Porter has had asynchronous support since version 5 (2019) thanks to [Amp][] integration. In v5, async was implemented with coroutines, but from version 6 onwards, Porter uses the simpler [fibers][] model. Fiber support is included in PHP 8.1 and can be added to PHP 8.0 using [ext-fiber][]. PHP 7 does not support fibers, so if you are stuck with that version of PHP, coroutines are the only option. It is strongly recommended to upgrade to PHP 8.1 to use async, to avoid unnecessary bugs leading to segfaults and to avoid getting trapped in the coroutine architecture that is cumbersome to upgrade, difficult to debug and harder to reason about.
174174

175-
In version 5, Porter offered a dual API to support the asynchronous code path. That is, `Porter::import` had the async analogue: `Porter::importAsync` and `Porter::importOne` had the async analogue: `Porter::importOneAsync`. In version 6 we switched to fibers but kept the dual API to making migrating from coroutines to fibers slightly easier. Since version 7, we unified the dual API because async with fibers can be almost entirely transparent: the synchronous and asynchronous code paths are identical, so we don't even have to think about async unless and until we want to start leveraging its benefits in our application.
175+
In version 5, Porter offered a dual API to support the asynchronous code path. That is, `Porter::import` had the async analogue: `Porter::importAsync` and `Porter::importOne` had `Porter::importOneAsync`. In version 6 we switched to fibers but kept the dual API to making migrating from coroutines to fibers slightly easier. Since version 7, we unified the dual API because async with fibers can be almost entirely transparent: the synchronous and asynchronous code paths are identical, so we don't even have to think about async unless and until we want to start leveraging its benefits in our application.
176176

177177
To use async in Porter v7 onwards, simply wrap an `import()` or `importOne()` call in an `async()` call using one of the following two methods.
178178

Loading

0 commit comments

Comments
 (0)