Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a2d5d46
feat: add technical analysis and architecture design for swagghp
tolawho Jun 5, 2026
d7844eb
Setup SAFe transformation artifacts including backlog, WSJF, and stra…
tolawho Jun 5, 2026
0589636
feat: implement Core Engine for PHP Swagger Generator (#3)
tolawho Jun 5, 2026
0850326
feat: implement SchemaRegistry and TypeResolver for advanced type sup…
tolawho Jun 5, 2026
4d1de34
feat: implement SchemaRegistry, TypeResolver and comprehensive docume…
tolawho Jun 5, 2026
170f216
feat: advanced types and openapi 3.1 (#7)
tolawho Jun 6, 2026
cee0d69
fix: OpenAPI compliance and add parameter discovery & schema filtering
tolawho Jun 6, 2026
86fbe1f
feat: implement CLI command interface
tolawho Jun 6, 2026
53fd67a
feat: implement advanced route parameter handling and auto-inference
tolawho Jun 6, 2026
4045515
docs: add Epic 4 for professional API documentation features
tolawho Jun 6, 2026
747e30c
feat: global API metadata discovery
tolawho Jun 6, 2026
4f81f7a
feat: implement security & authentication support
tolawho Jun 7, 2026
e5c18c7
feat: implement comprehensive schema validation support
tolawho Jun 7, 2026
7826f6a
fix: PHPStan type errors and line length lint warnings
tolawho Jun 7, 2026
7d1977e
Feat/caching and advanced metadata (#17)
tolawho Jun 7, 2026
c4a983b
feat: implement Petstore example (OAS 3.0 v3) and improve core library
tolawho Jun 7, 2026
47050a7
fix: serialize http status code
tolawho Jun 7, 2026
d014ec5
docs: corresponding features
tolawho Jun 7, 2026
950ceb2
feat: implement developer experience
tolawho Jun 7, 2026
6c2ecef
refactor: cli command phpswag and serialize empty object/mapping fiel…
tolawho Jun 7, 2026
53bc683
feat: add support for securityDefinitions.basic (HTTP Basic Auth)
tolawho Jun 7, 2026
ab40916
refactor: decouple Core class and modularize tag parsing & metadata d…
tolawho Jun 8, 2026
94977e3
feat: improve dx
tolawho Jun 8, 2026
f650a94
feat: Add PHP 8+ Attributes support, Laravel/Symfony bridges, and Ope…
tolawho Jun 9, 2026
70a50ed
ci: github workflow ci (#28)
tolawho Jun 9, 2026
b3e6460
feat: support nikic/php-parser v5
tolawho Jun 9, 2026
fa3d711
Merge pull request #30 from tolawho/main
tolawho Jun 9, 2026
dc237aa
Merge pull request #32 from tolawho/fix/support-php-parser-v5
tolawho Jun 9, 2026
50979ca
ci: update github workflow ci
tolawho Jun 9, 2026
029085a
Merge pull request #33 from tolawho/fix/support-php-parser-v5
tolawho Jun 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4']
php-version: ['8.1', '8.3']

steps:
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
}
},
"require": {
"php": ">=8.0",
"nikic/php-parser": "^4.15",
"php": ">=8.1",
"nikic/php-parser": "^4.15 || ^5.0",
"phpstan/phpdoc-parser": "^1.24",
"symfony/console": "^6.0",
"symfony/finder": "^6.0",
Expand Down
1 change: 1 addition & 0 deletions src/Attributes/AttributeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ private function evaluateExpression(Expr $expr, NameResolver $nameResolver): mix
if ($expr instanceof Array_) {
$result = [];
foreach ($expr->items as $item) {
// @phpstan-ignore-next-line
if ($item === null) {
continue;
}
Expand Down
9 changes: 8 additions & 1 deletion src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ class Parser

public function __construct()
{
$this->parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
$factory = new ParserFactory();
// @phpstan-ignore-next-line
if (method_exists($factory, 'createForNewestSupportedVersion')) {
$this->parser = $factory->createForNewestSupportedVersion();
} else {
// @phpstan-ignore-next-line
$this->parser = $factory->create(ParserFactory::PREFER_PHP7);
}
}

/**
Expand Down
7 changes: 6 additions & 1 deletion tests/NameResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ public function testResolveClassName()
class UserController {}
';

$parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
$factory = new ParserFactory();
if (method_exists($factory, 'createForNewestSupportedVersion')) {
$parser = $factory->createForNewestSupportedVersion();
} else {
$parser = $factory->create(ParserFactory::PREFER_PHP7);
}
$stmts = $parser->parse($code);

$resolver = new NameResolver();
Expand Down
Loading