Skip to content

Commit d4c136a

Browse files
authored
Merge pull request #3 from logtide-dev/feat/restructure
feat: update project configuration and enhance logging capabilities
2 parents 221696b + 871cc06 commit d4c136a

File tree

9 files changed

+700
-12
lines changed

9 files changed

+700
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/vendor/
33
/coverage/
44
/.phpunit.cache/
5+
/.phpstan-cache/
56
.phpunit.result.cache
67
composer.lock
78
.DS_Store

.phpcs.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="LogTide">
3+
<description>LogTide PHP SDK coding standard</description>
4+
5+
<rule ref="PSR12"/>
6+
7+
<file>packages/logtide/src</file>
8+
<file>packages/logtide-laravel/src</file>
9+
<file>packages/logtide-symfony/src</file>
10+
<file>packages/logtide-slim/src</file>
11+
<file>packages/logtide-wordpress/src</file>
12+
13+
<!-- Allow lines up to 140 characters -->
14+
<rule ref="Generic.Files.LineLength">
15+
<properties>
16+
<property name="lineLimit" value="140"/>
17+
<property name="absoluteLineLimit" value="160"/>
18+
</properties>
19+
</rule>
20+
</ruleset>

composer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
"symfony/event-dispatcher": "^6.4 || ^7.0",
2828
"symfony/console": "^6.4 || ^7.0",
2929
"slim/slim": "^4.0",
30-
"slim/psr7": "^1.6"
30+
"slim/psr7": "^1.6",
31+
"php-stubs/wordpress-stubs": "^6.9",
32+
"illuminate/support": "^10.0 || ^11.0 || ^12.0",
33+
"illuminate/http": "^10.0 || ^11.0 || ^12.0",
34+
"illuminate/contracts": "^10.0 || ^11.0 || ^12.0"
3135
},
3236
"repositories": [
3337
{
@@ -75,9 +79,9 @@
7579
"scripts": {
7680
"test": "phpunit",
7781
"test:coverage": "phpunit --coverage-html coverage",
78-
"phpstan": "phpstan analyse packages/*/src --level=8",
79-
"cs": "phpcs --standard=PSR12 packages/*/src",
80-
"cs:fix": "phpcbf --standard=PSR12 packages/*/src"
82+
"phpstan": "phpstan analyse --memory-limit=512M",
83+
"cs": "phpcs",
84+
"cs:fix": "phpcbf"
8185
},
8286
"minimum-stability": "stable",
8387
"prefer-stable": true

packages/logtide-laravel/tests/Unit/.gitkeep

Whitespace-only changes.

packages/logtide-wordpress/tests/Unit/.gitkeep

Whitespace-only changes.

packages/logtide/src/ClientInterface.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ public function captureEvent(Event $event, ?Scope $scope = null, ?EventHint $hin
1414

1515
public function captureException(\Throwable $exception, ?Scope $scope = null): ?string;
1616

17-
public function captureLog(LogLevel $level, string $message, array $metadata = [], ?Scope $scope = null, ?string $service = null): ?string;
17+
public function captureLog(
18+
LogLevel $level,
19+
string $message,
20+
array $metadata = [],
21+
?Scope $scope = null,
22+
?string $service = null
23+
): ?string;
1824

1925
public function startSpan(string $operation, array $options = []): Span;
2026

0 commit comments

Comments
 (0)