Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Hata bildirimi
about: SDK'da bir hata mı buldunuz? Bize bildirin.
title: "[Bug] "
labels: bug
assignees: ''
---

**Özet**
Sorunu 1-2 cümleyle açıklayın.

**Ortam**
- SDK sürümü: (örn. 1.1.0)
- PHP sürümü: (örn. 8.2.12)
- Kullanılan HTTP adapter: (örn. GuzzleHttpClient)

**Yeniden üretim adımları**

> ⚠️ Gerçek `merchant_key` / `merchant_salt` / kart verisi paylaşmayın.

```php
// Minimum yeniden üretim kodu
```

**Beklenen davranış**

Ne olmasını bekliyordunuz?

**Gerçekleşen davranış**

Ne oldu? (hata mesajı, stack trace vb.)

**Ek bağlam**

Varsa ekran görüntüsü veya log ekleyin.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Özellik önerisi
about: Bu SDK için yeni bir fikir mi var?
title: "[Feature] "
labels: enhancement
assignees: ''
---

**Problem / ihtiyaç**

Hangi sorunu çözüyorsunuz? Hangi senaryoda ihtiyaç duyuyorsunuz?

**Önerilen çözüm**

API'nin nasıl görünmesini istersiniz? Örnek kod:

```php
// Hayal ettiğiniz kullanım
```

**Alternatifler**

Düşündüğünüz başka yaklaşımlar var mı?

**PayTR dokümantasyonu**

İlgili PayTR API dokümanı linki (varsa): https://dev.paytr.com/...

**Ek bağlam**

Başka eklemek istediğiniz şeyler.
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Açıklama

Bu PR ne yapıyor? Neden gerekiyor?

## Değişiklik türü

- [ ] Bug düzeltme (geriye dönük uyumlu)
- [ ] Yeni özellik (geriye dönük uyumlu)
- [ ] Kırıcı değişiklik (breaking change)
- [ ] Doküman / örnek
- [ ] Refactor

## Kontrol listesi

- [ ] Testlerim eklendi/güncellendi ve `composer test` geçiyor
- [ ] README / CHANGELOG güncellendi (gerekiyorsa)
- [ ] Gerçek mağaza anahtarı, salt veya kart verisi içermiyor
- [ ] PSR-12 kod stiline uygun

## İlgili issue

Closes #
28 changes: 27 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ on:
jobs:
build:
runs-on: ubuntu-latest
name: PHP ${{ matrix.php }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
experimental: [false]
include:
- php: '8.4'
experimental: true
steps:
- uses: actions/checkout@v4

Expand All @@ -20,7 +27,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: json, mbstring
coverage: none
coverage: ${{ matrix.php == '8.3' && 'pcov' || 'none' }}

- name: Get Composer cache directory
id: composer-cache
Expand All @@ -34,10 +41,29 @@ jobs:
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
if: matrix.php != '8.0'
run: composer install --no-interaction --prefer-dist

# composer.lock PHP >=8.1 ile üretilmiştir; PHP 8.0 için uyumlu set taze çözülür
- name: Install dependencies (resolve fresh for PHP 8.0)
if: matrix.php == '8.0'
run: composer update --no-interaction --prefer-dist --no-progress

- name: Validate Composer
run: composer validate --strict

- name: Run PHPUnit
if: matrix.php != '8.3'
run: composer test

- name: Run PHPUnit (with coverage)
if: matrix.php == '8.3'
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
if: matrix.php == '8.3' && github.event_name == 'push'
uses: codecov/codecov-action@v5
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
31 changes: 31 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Static Analysis

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
phpstan:
runs-on: ubuntu-latest
name: PHPStan
continue-on-error: true
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none

- name: Install dependencies
run: composer install --no-interaction --prefer-dist

- name: Download PHPStan
run: |
curl -fsSL -o phpstan.phar https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar

- name: Run PHPStan
run: php phpstan.phar analyse --level=max --no-progress --memory-limit=1G src
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Tüm önemli değişiklikler bu dosyada listelenir.

## [Unreleased]
## [1.1.0] - 2026-08-25

### Kart Saklama API (CAPI) tamamlama

Expand All @@ -27,4 +27,5 @@ Tüm önemli değişiklikler bu dosyada listelenir.
- Türkçe README, örnek kullanım ve idempotency önerisi.
- CI: `composer validate` + `phpunit` (`.github/workflows/ci.yml`).

[1.0.0]: https://github.com/done6666/paytr-sdk/releases/tag/1.0.0
[1.0.0]: https://github.com/done6666/paytr-sdk/releases/tag/v1.0.0
[1.1.0]: https://github.com/done6666/paytr-sdk/releases/tag/v1.1.0
49 changes: 49 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Katkı Rehberi

PayTR PHP SDK'ya katkılarınız hoş geldiniz! 🎉

## Geliştirme Ortamı

Gereksinimler: **PHP 8.0+** ve **Composer**

```bash
git clone git@github.com:done6666/paytr-sdk.git
cd paytr-sdk
composer install
composer test
```

Gerçek PayTR çağrısı yapılmadan testler çalışır (`FakeHttpClient` kullanılır).

## Kod Standartları

- **PSR-4** otoload, **PSR-12** kod stili
- Yeni özellikler için mutlaka test yazın
- Public API değişikliklerinde README ve CHANGELOG'u güncelleyin
- Geriye dönük uyumluluğu kırıcı değişikliklerden kaçının (gerekliyse major sürüm + CHANGELOG notu)

## Süreç

1. Bu depoyu fork'layın
2. Feature dalı açın: `git checkout -b feature/harika-ozellik`
3. Değişikliklerinizi yapın ve testleri çalıştırın: `composer test`
4. Anlamlı commit mesajlarıyla commit'leyin
5. Fork'unuzdan bu depoya Pull Request açın

## Pull Request Kuralları

- PR şablonunu doldurun
- Tüm CI kontrollerinin (test + statik analiz) geçtiğinden emin olun
- Tek PR = tek amaç; büyük refactorleri ayrı PR'lara bölün

## Hata Bildirimi

[Hata bildirim şablonunu](.github/ISSUE_TEMPLATE/bug_report.md) kullanarak:

- Kullandığınız SDK ve PHP sürümünü,
- Minimum yeniden üretim kodunu (**asla gerçek mağaza anahtarı/salt paylaşmayın**),
- Beklenen ve gerçekleşen davranışı ekleyin.

## Lisans

Katkılarınız [MIT lisansı](LICENSE) altında yayınlanır.
Loading
Loading