Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit 99c499b

Browse files
committed
Add deprecation message
1 parent da4755c commit 99c499b

File tree

1 file changed

+139
-10
lines changed

1 file changed

+139
-10
lines changed

src/Storage/FilesystemStorage.php

Lines changed: 139 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,148 @@ public function write(iterable $versions, iterable $releases): void
3333
$this->writeReleaseVersions($releases);
3434

3535
$this->writeContent('index.html', <<<HTML
36-
<html>
36+
<!DOCTYPE html>
37+
<html lang="en">
3738
<head>
38-
<title>phpversions</title>
39+
<meta charset="UTF-8">
40+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
41+
<title>PHP Versions API</title>
42+
<style>
43+
* {
44+
box-sizing: border-box;
45+
margin: 0;
46+
padding: 0;
47+
}
48+
body {
49+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
50+
line-height: 1.6;
51+
color: #333;
52+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
53+
min-height: 100vh;
54+
padding: 20px;
55+
}
56+
.container {
57+
max-width: 800px;
58+
margin: 0 auto;
59+
background: white;
60+
border-radius: 15px;
61+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
62+
overflow: hidden;
63+
}
64+
.header {
65+
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
66+
color: white;
67+
padding: 40px 30px;
68+
text-align: center;
69+
}
70+
.header h1 {
71+
font-size: 2.5rem;
72+
font-weight: 700;
73+
margin-bottom: 10px;
74+
}
75+
.header p {
76+
font-size: 1.1rem;
77+
opacity: 0.9;
78+
}
79+
.content {
80+
padding: 30px;
81+
}
82+
.deprecated-banner {
83+
background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
84+
color: #92400e;
85+
padding: 20px;
86+
margin-bottom: 30px;
87+
border-radius: 10px;
88+
border-left: 5px solid #d97706;
89+
font-weight: 600;
90+
}
91+
.deprecated-banner a {
92+
color: #92400e;
93+
text-decoration: underline;
94+
}
95+
.api-list {
96+
display: grid;
97+
gap: 15px;
98+
margin-bottom: 30px;
99+
}
100+
.api-item {
101+
background: #f8fafc;
102+
border: 2px solid #e2e8f0;
103+
border-radius: 10px;
104+
padding: 20px;
105+
transition: all 0.3s ease;
106+
text-decoration: none;
107+
color: #334155;
108+
display: block;
109+
}
110+
.api-item:hover {
111+
border-color: #4f46e5;
112+
background: #f1f5f9;
113+
transform: translateY(-2px);
114+
box-shadow: 0 10px 25px rgba(79, 70, 229, 0.1);
115+
}
116+
.api-item h3 {
117+
font-size: 1.2rem;
118+
font-weight: 600;
119+
margin-bottom: 5px;
120+
color: #1e293b;
121+
}
122+
.api-item p {
123+
color: #64748b;
124+
font-size: 0.9rem;
125+
}
126+
.footer {
127+
text-align: center;
128+
padding: 20px 30px;
129+
background: #f8fafc;
130+
border-top: 1px solid #e2e8f0;
131+
color: #64748b;
132+
font-size: 0.9rem;
133+
}
134+
.php-logo {
135+
display: inline-block;
136+
font-size: 3rem;
137+
margin-bottom: 10px;
138+
}
139+
</style>
39140
</head>
40141
<body>
41-
<p>An API that expose all PHP versions:</p>
42-
<ul>
43-
<li><a href="/all.json">All main PHP versions</a></li>
44-
<li><a href="/releases.json">All PHP releases versions</a></li>
45-
<li><a href="/maintened.json">Maintened versions</a></li>
46-
<li><a href="/unmaintened.json">Unmainted versions</a></li>
47-
</ul>
48-
<p>Last update: {$this->clock->now()->format('Y-m-d H:i:s')}</p>
142+
<div class="container">
143+
<div class="header">
144+
<div class="php-logo">🐘</div>
145+
<h1>PHP Versions API</h1>
146+
<p>Access comprehensive PHP version information</p>
147+
</div>
148+
149+
<div class="content">
150+
<div class="deprecated-banner">
151+
<strong>⚠️ DEPRECATED:</strong> This API is deprecated in favour of the official JSON available at <a href="https://www.php.net/releases/states.php" target="_blank">https://www.php.net/releases/states.php</a>
152+
</div>
153+
154+
<div class="api-list">
155+
<a href="/all.json" class="api-item">
156+
<h3>📋 All PHP Versions</h3>
157+
<p>Complete list of all main PHP versions with details</p>
158+
</a>
159+
<a href="/releases.json" class="api-item">
160+
<h3>🚀 All Releases</h3>
161+
<p>Comprehensive list of all PHP release versions</p>
162+
</a>
163+
<a href="/maintened.json" class="api-item">
164+
<h3>✅ Maintained Versions</h3>
165+
<p>Currently supported and maintained PHP versions</p>
166+
</a>
167+
<a href="/unmaintened.json" class="api-item">
168+
<h3>❌ Unmaintained Versions</h3>
169+
<p>End-of-life PHP versions no longer supported</p>
170+
</a>
171+
</div>
172+
</div>
173+
174+
<div class="footer">
175+
<p>Last update: {$this->clock->now()->format('Y-m-d H:i:s')}</p>
176+
</div>
177+
</div>
49178
</body>
50179
</html>
51180
HTML);

0 commit comments

Comments
 (0)