File tree Expand file tree Collapse file tree 5 files changed +90
-0
lines changed
Expand file tree Collapse file tree 5 files changed +90
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push : ~
5+ pull_request : ~
6+ workflow_dispatch : ~
7+
8+ jobs :
9+ tests :
10+ runs-on : ubuntu-latest
11+ name : CI - PHP ${{ matrix.php }}, Dependencies ${{ matrix.dependencies }}
12+ env :
13+ ASYNCAPI_VERSION : ${{ matrix.schema }}
14+ strategy :
15+ matrix :
16+ php : [8.4]
17+ dependencies : [lowest, highest]
18+
19+ steps :
20+ - # Copies the repository files to the Action Runner
21+ name : Checkout Repository
22+ uses : actions/checkout@v4
23+
24+ - # Installs PHP and other necessary tools
25+ name : Setup PHP
26+ uses :
shivammathur/[email protected] 27+ with :
28+ php-version : ${{ matrix.php }}
29+
30+ - # Installs and caches PHP dependencies
31+ name : Install Dependencies
32+ 33+ with :
34+ dependency-versions : ${{ matrix.dependencies }}
35+
36+ - # Validates composer.json structure and required fields
37+ name : Validate composer.json
38+ run : composer validate --ansi --strict --no-check-publish
39+
40+ -
41+ name : phpstan
42+ run : vendor/bin/phpstan
Original file line number Diff line number Diff line change 1+ /vendor /
2+ /composer.lock
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " ferror/phpstan-datadog-env" ,
3+ "autoload" : {
4+ "psr-4" : {
5+ "Ferror\\ " : " src/"
6+ }
7+ },
8+ "require" : {
9+ "php" : " >=8.3" ,
10+ "datadog/dd-trace" : " ^1.6"
11+ },
12+ "require-dev" : {
13+ "phpstan/phpstan" : " ^2.1"
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ # phpstan.neon
2+ parameters :
3+ level : max
4+ paths :
5+ - src
6+ bootstrapFiles :
7+ - vendor/autoload.php
8+
9+ # Include stubs for Datadog Trace Stubs
10+ scanFiles :
11+ - vendor/datadog/dd-trace/src/ddtrace_php_api.stubs.php
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Ferror ;
6+
7+ use DDTrace \Contracts \Span ;
8+ use DDTrace \ScopeManager ;
9+
10+ final readonly class ExampleClass
11+ {
12+ public function __construct (private Span $ span )
13+ {
14+ }
15+
16+ public function test (ScopeManager $ scopeManager ): void
17+ {
18+ $ scopeManager ->activate ($ this ->span );
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments