Skip to content

Commit ee0ccb1

Browse files
authored
Merge pull request #71 from clue-labs/legacy-clients
Redirect legacy HttpClient and SocketClient pages to HTTP and Socket
2 parents e099105 + a5da721 commit ee0ccb1

9 files changed

Lines changed: 73 additions & 0 deletions

File tree

‎config/berti.config.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,12 @@
225225
});
226226

227227
$container['document.finder'] = $container->protect(function ($path) {
228+
// Legacy components redirect via static-files/ instead of rendering their docs
228229
return (new Symfony\Component\Finder\Finder())
229230
->name('/\.md$/')
230231
->name('LICENSE')
231232
->files()
233+
->exclude(['http-client', 'socket-client'])
232234
->in($path . '/tmp/components')
233235
->in($path . '/pages');
234236
});

‎data/components.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
'repository' => 'reactphp/promise-stream',
6262
'category' => 'Utility Components'
6363
],
64+
// Legacy components are only kept to list their releases in the changelog
6465
[
6566
'title' => 'HttpClient',
6667
'repository' => 'reactphp/http-client',

‎src/data.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ function components_by_category(array $components): array
9797
$byCategory = [];
9898

9999
foreach ($components as $component) {
100+
if ('Legacy Components' === $component['category']) {
101+
continue;
102+
}
103+
100104
if (!isset($byCategory[$component['category']])) {
101105
$byCategory[$component['category']] = [];
102106
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>HttpClient: Changelog - ReactPHP</title>
6+
<meta http-equiv="refresh" content="0; url=../changelog.html#http-100-2020-07-11">
7+
</head>
8+
<body>
9+
<p>HttpClient has been migrated over to the HTTP component, see the <a href="../changelog.html#http-100-2020-07-11">combined changelog</a>.</p>
10+
</body>
11+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>HttpClient - ReactPHP</title>
6+
<meta http-equiv="refresh" content="0; url=../http/#client-usage">
7+
</head>
8+
<body>
9+
<p>HttpClient has been migrated over to the <a href="../http/#client-usage">HTTP component</a>.</p>
10+
</body>
11+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>HttpClient: License - ReactPHP</title>
6+
<meta http-equiv="refresh" content="0; url=../http/license.html">
7+
</head>
8+
<body>
9+
<p>HttpClient has been migrated over to the HTTP component, see its <a href="../http/license.html">license</a>.</p>
10+
</body>
11+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>SocketClient: Changelog - ReactPHP</title>
6+
<meta http-equiv="refresh" content="0; url=../changelog.html#socket-070-2017-04-10">
7+
</head>
8+
<body>
9+
<p>SocketClient has been merged into the Socket component, see the <a href="../changelog.html#socket-070-2017-04-10">combined changelog</a>.</p>
10+
</body>
11+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>SocketClient - ReactPHP</title>
6+
<meta http-equiv="refresh" content="0; url=../socket/#client-usage">
7+
</head>
8+
<body>
9+
<p>SocketClient has been merged into the <a href="../socket/#client-usage">Socket component</a>.</p>
10+
</body>
11+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>SocketClient: License - ReactPHP</title>
6+
<meta http-equiv="refresh" content="0; url=../socket/license.html">
7+
</head>
8+
<body>
9+
<p>SocketClient has been merged into the Socket component, see its <a href="../socket/license.html">license</a>.</p>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)