Skip to content

Commit f0fea11

Browse files
committed
Initial release of Checkend PHP SDK v1.0.0
A PHP SDK for error monitoring and reporting to Checkend. Features: - Core error reporting with Checkend::notify() - Async and sync notification modes - Context, user, and request data capture - Sensitive data filtering (passwords, tokens, etc.) - Exception ignore patterns - Proxy and SSL configuration support - Data control flags (sendRequestData, sendUserData, etc.) Integrations: - Generic PHP error/exception handlers - PSR-15 Middleware - Laravel Service Provider - Laravel Exception Handler - Laravel Queue job failure reporting Development tooling: - GitHub Actions CI (PHP 8.1-8.4) - PHPStan static analysis (level 6) - PHP-CS-Fixer linting (PSR-12) - Pre-commit hooks for secret scanning
0 parents  commit f0fea11

28 files changed

+3876
-0
lines changed

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php-version:
16+
- '8.1'
17+
- '8.2'
18+
- '8.3'
19+
- '8.4'
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up PHP ${{ matrix.php-version }}
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php-version }}
28+
extensions: json
29+
coverage: none
30+
31+
- name: Validate composer.json
32+
run: composer validate --strict
33+
34+
- name: Install dependencies
35+
run: composer install --prefer-dist --no-progress
36+
37+
- name: Run tests
38+
run: composer test
39+
40+
lint:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Set up PHP
46+
uses: shivammathur/setup-php@v2
47+
with:
48+
php-version: '8.3'
49+
extensions: json
50+
coverage: none
51+
52+
- name: Install dependencies
53+
run: composer install --prefer-dist --no-progress
54+
55+
- name: Run PHP-CS-Fixer
56+
run: composer lint
57+
58+
analyze:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
63+
- name: Set up PHP
64+
uses: shivammathur/setup-php@v2
65+
with:
66+
php-version: '8.3'
67+
extensions: json
68+
coverage: none
69+
70+
- name: Install dependencies
71+
run: composer install --prefer-dist --no-progress
72+
73+
- name: Run PHPStan
74+
run: composer analyze

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Composer
2+
/vendor/
3+
composer.lock
4+
5+
# PHPUnit
6+
.phpunit.cache/
7+
.phpunit.result.cache
8+
coverage/
9+
10+
# PHP-CS-Fixer
11+
.php-cs-fixer.cache
12+
13+
# IDE
14+
.idea/
15+
.vscode/
16+
*.swp
17+
*.swo
18+
*~
19+
20+
# OS
21+
.DS_Store
22+
Thumbs.db
23+
24+
# Environment
25+
.env
26+
.env.local
27+
.env.*.local

.php-cs-fixer.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$finder = PhpCsFixer\Finder::create()
6+
->in(__DIR__ . '/src')
7+
->in(__DIR__ . '/tests')
8+
->name('*.php');
9+
10+
return (new PhpCsFixer\Config())
11+
->setRiskyAllowed(true)
12+
->setRules([
13+
'@PSR12' => true,
14+
'array_syntax' => ['syntax' => 'short'],
15+
'blank_line_after_opening_tag' => true,
16+
'concat_space' => ['spacing' => 'one'],
17+
'declare_strict_types' => true,
18+
'global_namespace_import' => [
19+
'import_classes' => true,
20+
'import_constants' => false,
21+
'import_functions' => false,
22+
],
23+
'no_unused_imports' => true,
24+
'ordered_imports' => [
25+
'imports_order' => ['class', 'function', 'const'],
26+
'sort_algorithm' => 'alpha',
27+
],
28+
'single_quote' => true,
29+
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
30+
'yoda_style' => false,
31+
])
32+
->setFinder($finder);

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Furvur
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)