Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vifer committed Jan 11, 2024
0 parents commit b52e315
Show file tree
Hide file tree
Showing 468 changed files with 28,830 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# A list of files and folders those will be excluded from archives and the Composer package.
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.php-cs-fixer.php export-ignore
/.vscode export-ignore
/examples export-ignore
/Makefile export-ignore
/phpdoc.dist.xml export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml export-ignore
/tests export-ignore
/dockerfile export-ignore
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @PaddleHQ/dx
71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Bug report
description: Create a bug report to help us improve
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: description
attributes:
label: Describe the bug
description: Brief description of the bug and its impact.
placeholder: A clear and concise description of what is happening.
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Explain the steps to recreate the issue.
placeholder: |
1. Create entity ...
2. Get entity ...
3. See error ...
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: code-snippets
attributes:
label: Code snippets
description: If applicable, add code snippets to help explain your problem.
render: PHP
validations:
required: false
- type: input
id: language-version
attributes:
label: PHP version
placeholder: PHP 8.1
validations:
required: true
- type: input
id: sdk-version
attributes:
label: SDK version
placeholder: paddle-php-sdk 1.20.1
validations:
required: true
- type: input
id: api-version
attributes:
label: API version
description: See [Versioning](https://developer.paddle.com/api-reference/about/versioning) in the API Reference to find which version you're using
placeholder: "Paddle Version 1"
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Paddle support
url: https://www.paddle.com/help
about: |
Please only open issues here that you believe represent actual bugs or feature requests for the Paddle PHP SDK.
For help with the Paddle API or building your integration, contact our support team at [email protected].
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Feature request
description: Suggest a new feature or idea for this SDK
labels: ["feature-request"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
- type: textarea
id: description
attributes:
label: Please describe your feature request.
description: A clear and concise description of what the problem is.
placeholder: A clear and concise description of what the problem is.
- type: textarea
id: solution
attributes:
label: Describe your solution.
description: A clear and concise description of what you want to happen.
placeholder: A clear and concise description of what you want to happen.
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you have considered.
description: A clear and concise description of any other options or features you have considered.
placeholder: A clear and concise description of any other options or features you have considered.
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context about the feature request.
placeholder: Add any other context about the feature request.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: /
schedule:
interval: "weekly"
day: "wednesday"
time: "08:00"
open-pull-requests-limit: 2
reviewers:
- "@PaddleHQ/dx"
labels:
- "release:patch"
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
schedule:
- cron: '0 10 * * *'

jobs:
build:
name: "Package stability ${{ matrix.stability }}"
runs-on: ubuntu-latest

strategy:
matrix:
stability: [ 'stable', 'lowest' ]

steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Build Container
run: make build

- name: Install Dependencies
run: COMPOSER_STABILITY=${{ matrix.stability }} make install

- name: Run Linter
run: make lint

- name: Run Static Analysis
run: make stan

- name: Run Tests
run: make test
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/vendor
/.phpunit.result.cache
/.phpunit.cache
/.php-cs-fixer.cache
/build
/composer.lock
.DS_Store
phpstan.neon
42 changes: 42 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = Finder::create()
->exclude('vendor')
->in([getcwd()]);

$config = new Config();

return $config->setRules([
'@PSR12' => true,
'@Symfony' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
'elements' => ['arguments', 'arrays', 'match', 'parameters'],
],
'array_syntax' => ['syntax' => 'short'],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
'declare_strict_types' => true,
'visibility_required' => [
'elements' => ['property', 'method'],
],
'no_superfluous_phpdoc_tags' => true,
'php_unit_method_casing' => [
'case' => 'snake_case',
],
'not_operator_with_successor_space' => true,
'concat_space' => [
'spacing' => 'one',
],
'self_accessor' => true,
])
->setRiskyAllowed(true)
->setFinder($finder);
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

> **Important:** While in early access we may introduce breaking changes. Where we can, we'll tag breaking changes in this changelog and communicate ahead of time.
Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-php-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools.

## dev - 2024-01-10

### Added

- Added `available_payment_methods` to [transaction preview and pricing preview](https://developer.paddle.com/changelog/2023/available-payment-methods?utm_source=dx&utm_medium=paddle-node-sdk)
- Added non-catalog items to [subscriptions](https://developer.paddle.com/changelog/2023/bill-custom-items-one-time-subscription-charge?utm_source=dx&utm_medium=paddle-node-sdk)
- Added non catalog items to [transactions](https://developer.paddle.com/changelog/2023/add-custom-items-transaction?utm_source=dx&utm_medium=paddle-node-sdk)
- Added `on_payment_failure` to [subscriptions](https://developer.paddle.com/changelog/2023/payment-failure-behavior-update-subscription?utm_source=dx&utm_medium=paddle-node-sdk)

### Fixed

- Correctly handle optional `ends_at` for discount under Subscriptions entity.
- Correctly handle optional `resume_at` for scheduled change under Subscriptions entity.

## dev - 2024-01-05

### Added

- Added `reports->list()` to [list reports](https://developer.paddle.com/api-reference/reports/list-reports?utm_source=dx&utm_medium=paddle-php-sdk)
- Added `reports->create()` to [create a new report](https://developer.paddle.com/api-reference/reports/create-report?utm_source=dx&utm_medium=paddle-php-sdk)
- Added `reports->get()` to [get a report](https://developer.paddle.com/api-reference/reports/get-report?utm_source=dx&utm_medium=paddle-php-sdk)
- Added `reports->getReportCsv()` to [get a CSV file for a report](https://developer.paddle.com/api-reference/reports/get-report-csv?utm_source=dx&utm_medium=paddle-php-sdk)

## dev - 2023-12-14

### Added

- Initial early access release. Added support for the most frequently used Paddle Billing entities and API operations. Check the [README](README.md) for more information.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Contributing

If you've spotted a problem with this package or have a new feature request please open an issue.

For help with the Paddle API or building your integration, contact our support team at [[email protected]](mailto:[email protected]).
Loading

0 comments on commit b52e315

Please sign in to comment.