Skip to content

Commit 8629bbe

Browse files
committed
Enhance homepage content and features for clarity and impact
1 parent a016d79 commit 8629bbe

1 file changed

Lines changed: 17 additions & 18 deletions

File tree

‎docs/index.md‎

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,33 @@ layout: home
44
hero:
55
name: "TypePHP"
66
text: "Transparent Runtime Type Enforcement"
7-
tagline: "No transpilation. No build steps. No C-extensions. Just 100% pure PHP that makes your existing DocBlocks scream the moment types fail."
7+
tagline: "The first pure userland PHP library to transparently enforce DocBlock types at runtime. Bringing reified generics, typed arrays, and static analysis type refinements to life with zero new syntax, zero build steps, and zero C-extensions."
88
actions:
99
- theme: brand
1010
text: "Get Started →"
1111
link: /getting-started/installation
1212
- theme: alt
1313
text: "View on GitHub"
14-
link: https://github.com/typephp-php/docs
14+
link: https://github.com/typephp-php/typephp
1515

1616
features:
17-
- title: "Zero Production Overhead"
18-
details: "Install as a development dependency to enforce strict types during local testing and CI/CD pipelines, guaranteeing absolute zero performance cost in live production environments."
19-
- title: "No Transpilation or C-Extensions"
20-
details: "Operates 100% in pure PHP user-land using native stream wrappers and AST transformations. No build scripts, Node.js tools, or C-extensions required."
21-
- title: "True Runtime Generics"
22-
details: "Binds generic template types to specific object instances dynamically using native WeakMap memory tracking."
23-
- title: "Arrays, Shapes & Extractions"
24-
details: "Deeply validates sequential lists, typed arrays, array shapes, and key-of / value-of constant extractions out of the box."
17+
- title: "First-of-its-Kind in Userland"
18+
details: "Operates 100% in pure PHP userland via native stream wrappers and AST transformations. No custom PHP binaries, C-extensions, FFI, or build steps required."
19+
- title: "True Reified Generics"
20+
details: "The only PHP engine that statefully reifies generic templates per object instance in memory using native WeakMap tracking, with full support for variance, nested generics, upper bounds, and clone preservation."
21+
- title: "Advanced Type Enhancements"
22+
details: "Enforces typed arrays, sequential lists, array shapes, DNF, scalar refinements , and key-of / value-of extractions live at runtime."
23+
- title: "Zero Line-Drift & Total Compatibility"
24+
details: "100% drop-in compatible with any existing PHP 8.1+ codebase (Laravel, Symfony, Shopware). Error traces in Ignition, Symfony, and Pest highlight the exact source line without drift."
2525
---
2626

27-
::: tip Pure PHP • Zero Transpilation • Zero Build Steps
28-
**You don't have to change a single line of code, and you don't need a compilation build toolchain.** TypePHP operates entirely in native PHP user-land and no custom PHP binaries, C-extensions, or Node.js transpilers needed. Drop TypePHP into your existing project, run your code, and your DocBlocks will instantly start screaming at runtime when dynamic data violates a type contract.
27+
::: tip The First Pure Userland Runtime Contract Engine for PHP
28+
**You don't have to refactor a single line of code, learn new syntax, or compile C-extensions.** TypePHP bridges the gap between static analysis and runtime execution. Drop TypePHP into your existing project, and your PHPStan and Psalm DocBlocks will immediately start enforcing reified generics, typed arrays, and shape contracts the moment your code runs.
2929
:::
3030

3131
## See It In Action
3232

33-
TypePHP operates entirely in user-land using native stream wrappers and AST transformations. Because it requires no C-extensions or FFI, you can drop it into any PHP 8.1+ project or web framework effortlessly. It reads your existing PHPDoc annotations and enforces them the moment your code runs.
33+
TypePHP operates entirely in userland using native stream wrappers and AST transformations. Because it requires no C-extensions or FFI, you can drop it into any PHP 8.1+ project or web framework effortlessly. It reads your existing PHPDoc annotations and enforces them the moment your code runs.
3434

3535
### Real-World Framework Guard Rails (Laravel / Symfony)
3636
Prevent dynamic data bugs from leaking into database queries or API responses:
@@ -63,8 +63,8 @@ class User extends Model
6363

6464
---
6565

66-
### True Runtime Generics
67-
Define generic templates and TypePHP will track their state in memory per object instance:
66+
### True Runtime Generics with Reified Memory State
67+
Define generic templates and TypePHP tracks their state per object instance in memory using native `\WeakMap`:
6868

6969
```php
7070
/**
@@ -76,7 +76,7 @@ class Collection
7676
public function add(mixed $item): void { /* ... */ }
7777
}
7878

79-
// Prebind T = User to this specific object instance
79+
// Prebind T = User to this specific object instance in memory
8080
/** @var Collection<User> $users */
8181
$users = new Collection();
8282

@@ -123,7 +123,7 @@ $service->connect(['driver' => 'pdo_invalid']);
123123

124124
---
125125

126-
## Precise Call-Site Trace Attribution
126+
## Precise Call-Site Trace Attribution (Zero Line-Drift)
127127

128128
A common problem with AST code injection is that adding new statements pushes subsequent code down, causing line numbers in stack traces to drift out of sync.
129129

@@ -139,4 +139,3 @@ When a type contract fails, web exception handlers (**Laravel Ignition, Whoops,
139139

140140
### CLI Test Runner Trace (Pest PHP)
141141
![Pest CLI Exception Trace](/pest-error-screen.png)
142-
```

0 commit comments

Comments
 (0)