Skip to content

Commit cb37c3d

Browse files
committed
docs: remove fibers from known issues
1 parent f288c36 commit cb37c3d

File tree

4 files changed

+0
-120
lines changed

4 files changed

+0
-120
lines changed

docs/cn/known-issues.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
# 已知问题
22

3-
## Fibers
4-
5-
[Fibers](https://www.php.net/manual/en/language.fibers.php) 中调用 PHP 的函数和代码等语言结构,这些结构内部再调用 [cgo](https://go.dev/blog/cgo) 会导致崩溃。
6-
7-
这个问题 [正在由 Go 项目处理](https://github.com/golang/go/issues/62130)
8-
9-
一种解决方案是不要使用从 Fibers 内部委托给 Go 的构造(如 `echo`)和函数(如 `header()`)。
10-
11-
下面的代码可能会崩溃,因为它在 Fiber 中使用了 `echo`
12-
13-
```php
14-
$fiber = new Fiber(function() {
15-
echo 'In the Fiber'.PHP_EOL;
16-
echo 'Still inside'.PHP_EOL;
17-
});
18-
$fiber->start();
19-
```
20-
21-
相反,请从 Fiber 返回值并在外部使用它:
22-
23-
```php
24-
$fiber = new Fiber(function() {
25-
Fiber::suspend('In the Fiber'.PHP_EOL));
26-
Fiber::suspend('Still inside'.PHP_EOL));
27-
});
28-
echo $fiber->start();
29-
echo $fiber->resume();
30-
$fiber->resume();
31-
```
32-
333
## 不支持的 PHP 扩展
344

355
已知以下扩展与 FrankenPHP 不兼容:

docs/fr/known-issues.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
# Problèmes Connus
22

3-
## Fibres
4-
5-
Appeller de fonctions et mots clefs PHP qui eux-mêmes appellent [cgo](https://go.dev/blog/cgo) dans des [Fibres](https://www.php.net/manual/fr/language.fibers.php) est connu pour provoquer des plantages.
6-
7-
Ce problème est [en cours de correction par le projet Go](https://github.com/golang/go/issues/62130).
8-
9-
En attendant, une solution consiste à ne pas utiliser de mots clefs (comme `echo`) et de fonctions (comme `header()`) qui délèguent à Go depuis l'intérieur de fibres.
10-
11-
Ce code risque de planter car il utilise `echo` dans une fibre :
12-
13-
```php
14-
$fiber = new Fiber(function() {
15-
echo 'Dans la fibre'.PHP_EOL;
16-
echo 'Toujours dedans'.PHP_EOL;
17-
});
18-
$fiber->start();
19-
```
20-
21-
A la place, retournez la valeur de la Fibre et utilisez-la à l'extérieur :
22-
23-
```php
24-
$fiber = new Fiber(function() {
25-
Fiber::suspend('Dans la fibre'.PHP_EOL));
26-
Fiber::suspend('Toujours dedans'.PHP_EOL));
27-
});
28-
echo $fiber->start();
29-
echo $fiber->resume();
30-
$fiber->resume();
31-
```
32-
333
## Extensions PHP non prises en charge
344

355
Les extensions suivantes sont connues pour ne pas être compatibles avec FrankenPHP :

docs/known-issues.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
# Known Issues
22

3-
## Fibers
4-
5-
Calling PHP functions and language constructs that themselves call [cgo](https://go.dev/blog/cgo) in [Fibers](https://www.php.net/manual/en/language.fibers.php) is known to cause crashes.
6-
7-
This issue [is being worked on by the Go project](https://github.com/golang/go/issues/62130).
8-
9-
In the meantime, one solution is not to use constructs (like `echo`) and functions (like `header()`) that delegate to Go from inside Fibers.
10-
11-
This code will likely crash because it uses `echo` in the Fiber:
12-
13-
```php
14-
$fiber = new Fiber(function() {
15-
echo 'In the Fiber'.PHP_EOL;
16-
echo 'Still inside'.PHP_EOL;
17-
});
18-
$fiber->start();
19-
```
20-
21-
Instead, return the value from the Fiber and use it outside:
22-
23-
```php
24-
$fiber = new Fiber(function() {
25-
Fiber::suspend('In the Fiber'.PHP_EOL));
26-
Fiber::suspend('Still inside'.PHP_EOL));
27-
});
28-
echo $fiber->start();
29-
echo $fiber->resume();
30-
$fiber->resume();
31-
```
32-
333
## Unsupported PHP Extensions
344

355
The following extensions are known not to be compatible with FrankenPHP:

docs/tr/known-issues.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
# Bilinen Sorunlar
22

3-
## Fibers
4-
5-
[Fibers](https://www.php.net/manual/en/language.fibers.php) içinde [cgo](https://go.dev/blog/cgo) çağrısı yapan PHP fonksiyonlarının ve dil yapılarının çağrılmasının çökmelere neden olduğu bilinmektedir.
6-
7-
Bu sorun [Go projesi tarafından üzerinde çalışılmaktadır](https://github.com/golang/go/issues/62130).
8-
9-
Bu arada, bir çözüm Fibers içinden Go'ya temsilci atayan yapıları (`echo` gibi) ve fonksiyonları (`header()` gibi) kullanmamaktır.
10-
11-
Bu kod, Fiber içinde `echo` kullandığı için büyük olasılıkla çökecektir:
12-
13-
```php
14-
$fiber = new Fiber(function() {
15-
echo 'In the Fiber'.PHP_EOL;
16-
echo 'Still inside'.PHP_EOL;
17-
});
18-
$fiber->start();
19-
```
20-
21-
Bunun yerine, değeri Fiber'den döndürün ve dışarıda kullanın:
22-
23-
```php
24-
$fiber = new Fiber(function() {
25-
Fiber::suspend('In the Fiber'.PHP_EOL));
26-
Fiber::suspend('Still inside'.PHP_EOL));
27-
});
28-
echo $fiber->start();
29-
echo $fiber->resume();
30-
$fiber->resume();
31-
```
32-
333
## Desteklenmeyen PHP Eklentileri
344

355
Aşağıdaki eklentilerin FrankenPHP ile uyumlu olmadığı bilinmektedir:

0 commit comments

Comments
 (0)