Skip to content

Commit 2797933

Browse files
committed
Release v1.0.1
0 parents  commit 2797933

23 files changed

Lines changed: 1578 additions & 0 deletions

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test
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+
13+
strategy:
14+
matrix:
15+
php-version: ["8.1", "8.2", "8.3"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up PHP ${{ matrix.php-version }}
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-version }}
24+
extensions: curl, json
25+
coverage: none
26+
27+
- name: Install dependencies
28+
run: composer install --prefer-dist --no-progress
29+
30+
- name: Run tests
31+
run: vendor/bin/phpunit --testdox
32+

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/vendor/
2+
/composer.lock
3+
/.phpunit.cache/
4+
/.phpunit.result.cache
5+

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.1] - 2025-12-10
9+
10+
- Implement PHP SDK with core functionality for Klime API integration
11+

CONTRIBUTING.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Contributing to Klime PHP SDK
2+
3+
Thank you for your interest in contributing to the Klime PHP SDK!
4+
5+
## Important: Repository Structure
6+
7+
This repository is a **read-only mirror** of our internal monorepo. We develop and maintain the SDK internally, then mirror releases to this public repository.
8+
9+
### What This Means for Contributors
10+
11+
- **Pull requests are welcome** and will be reviewed by our team
12+
- If accepted, we'll **manually port your changes** to our internal monorepo
13+
- Your changes will appear in this repository with the **next release**
14+
- You'll be credited as a co-author in the commit
15+
16+
## How to Contribute
17+
18+
### Reporting Bugs
19+
20+
1. Check if the bug has already been reported in [Issues](../../issues)
21+
2. If not, create a new issue with:
22+
- A clear, descriptive title
23+
- Steps to reproduce the bug
24+
- Expected vs actual behavior
25+
- Your environment (PHP version, OS, etc.)
26+
- Any relevant code snippets or error messages
27+
28+
### Suggesting Features
29+
30+
1. Check if the feature has already been suggested in [Issues](../../issues)
31+
2. Create a new issue describing:
32+
- The problem you're trying to solve
33+
- Your proposed solution
34+
- Any alternatives you've considered
35+
36+
### Submitting Code Changes
37+
38+
1. Fork this repository
39+
2. Create a feature branch (`git checkout -b feat/amazing-feature`)
40+
3. Make your changes
41+
4. Write or update tests as needed
42+
5. Ensure all tests pass (`composer test`)
43+
6. Commit using [Conventional Commits](https://www.conventionalcommits.org/):
44+
```
45+
feat: add new tracking method
46+
fix: handle edge case in batch processing
47+
docs: update README examples
48+
```
49+
7. Push to your fork and open a Pull Request
50+
51+
### Pull Request Guidelines
52+
53+
- Provide a clear description of what the PR does
54+
- Reference any related issues
55+
- Include tests for new functionality
56+
- Update documentation if needed
57+
- Keep PRs focused - one feature or fix per PR
58+
59+
## Development Setup
60+
61+
```bash
62+
# Clone your fork
63+
git clone https://github.com/YOUR_USERNAME/klime-php.git
64+
cd klime-php
65+
66+
# Install dependencies
67+
composer install
68+
69+
# Run tests
70+
composer test
71+
72+
# Or run PHPUnit directly
73+
vendor/bin/phpunit --testdox
74+
```
75+
76+
## Project Structure
77+
78+
```
79+
klime-php/
80+
├── src/
81+
│ ├── Client.php # Main client implementation
82+
│ ├── Event.php # Event class
83+
│ ├── EventType.php # Event type constants
84+
│ ├── EventContext.php # Event context
85+
│ ├── LibraryInfo.php # Library info
86+
│ ├── BatchResponse.php # API response
87+
│ ├── ValidationError.php # Validation error
88+
│ └── ConfigurationException.php
89+
├── tests/
90+
│ ├── ClientTest.php
91+
│ ├── EventTest.php
92+
│ └── ...
93+
├── composer.json
94+
├── phpunit.xml
95+
└── README.md
96+
```
97+
98+
## Code Style
99+
100+
- Follow [PSR-12](https://www.php-fig.org/psr/psr-12/) coding standard
101+
- Use strict types (`declare(strict_types=1)`)
102+
- Add PHPDoc comments for public methods
103+
- Use type hints for all parameters and return types
104+
- Keep methods small and focused
105+
106+
## Running Tests
107+
108+
```bash
109+
# Run all tests
110+
composer test
111+
112+
# Run with verbose output
113+
vendor/bin/phpunit --testdox
114+
115+
# Run specific test file
116+
vendor/bin/phpunit tests/EventTest.php
117+
118+
# Run specific test method
119+
vendor/bin/phpunit --filter testGeneratesUuid
120+
```
121+
122+
## Questions?
123+
124+
If you have questions about contributing, feel free to open an issue and we'll be happy to help!
125+
126+
## License
127+
128+
By contributing, you agree that your contributions will be licensed under the MIT License.
129+

LICENSE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# MIT License
2+
3+
Copyright (c) 2025 Klime
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.
22+

0 commit comments

Comments
 (0)