Skip to content

Commit f17f141

Browse files
update
0 parents  commit f17f141

28 files changed

Lines changed: 1435 additions & 0 deletions

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Supabase Config
2+
3+
# Supabase database URL
4+
SB_URL=https://[your].supabase.co
5+
6+
# Supabase Anon or `service_role` API key.
7+
SB_APIKEY= your anon api key

.gitattributes

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Normalize text files (LF endings for consistency)
2+
*.php text eol=lf
3+
*.js text eol=lf
4+
*.css text eol=lf
5+
*.html text eol=lf
6+
*.md text eol=lf
7+
*.json text eol=lf
8+
*.yml text eol=lf
9+
*.xml text eol=lf
10+
11+
# Treat binary files properly
12+
*.jpg binary
13+
*.png binary
14+
*.gif binary
15+
*.ico binary
16+
*.woff binary
17+
*.woff2 binary
18+
*.ttf binary
19+
*.eot binary
20+
*.mp4 binary
21+
*.pdf binary
22+
23+
# Prevent diffing of lock files and minified files
24+
composer.lock -diff
25+
LICENSE -diff
26+
27+
28+
# Exclude files from `git archive` (useful when packaging a release)
29+
.env export-ignore
30+
/tests/ export-ignore
31+
.github export-ignore
32+
.gitignore export-ignore
33+
.gitattributes export-ignore
34+
/vendor/ export-ignore
35+
/example/ export-ignore
36+
CODE_OF_CONDUCT.md export-ignore
37+
CHANGELOG.md export-ignore
38+
index.php export-ignore
39+
phpunit.xml export-ignore
40+
composer.json export-ignore
41+
composer.lock export-ignore
42+
.editorconfig export-ignore
43+
.env.example export-ignore

.github/CODE_OF_CONDUCT.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
### Code of Conduct
2+
3+
This Code of Conduct outlines the principles and guidelines for contributing to the Supabase PHP client. By participating in this project, you agree to abide by these rules.
4+
5+
**Respect and Inclusivity:**
6+
7+
- Treat everyone with respect and avoid discriminatory language, harassment, or bullying.
8+
- Foster inclusivity by welcoming contributions from all backgrounds and perspectives.
9+
- Be mindful of cultural differences and respect diverse customs and beliefs.
10+
11+
**Collaboration and Community:**
12+
13+
- Contribute positively by sharing your knowledge, ideas, and code in a constructive manner.
14+
- Be open to feedback and welcome constructive criticism and suggestions.
15+
- Respect intellectual property and acknowledge and attribute the work of others.
16+
17+
**Ethical Conduct:**
18+
19+
- Use technology responsibly and avoid malicious or harmful activities.
20+
- Protect privacy and handle user data with care and respect.
21+
- Comply with laws and regulations related to open-source software and data privacy.
22+
23+
**MIT License:**
24+
25+
- The Supabase PHP client is licensed under the `MIT License`, allowing for modification and distribution.
26+
- Contributors must be acknowledged in the code or documentation.
27+
- The code is provided "as is" without any warranties.
28+
29+
**Specific Guidelines:**
30+
31+
- Write clean, well-documented, and maintainable code.
32+
- Ensure code quality through thorough testing.
33+
- Prioritize security best practices to protect against vulnerabilities.
34+
- Participate in discussions, answer questions, and provide support to other users.
35+
36+
By contributing to this project, you agree to adhere to this Code of Conduct.

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: [Ashishkumbhar01, CodeWithSushil]
4+
patreon: Code_With_Sushil
5+
open_collective: codewithsushil
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: codewithsushil
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/SECURITY.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Security Policy
2+
3+
Thank you for helping keep `Supabase-php/Supabase-client` secure!
4+
5+
## Reporting a Vulnerability
6+
7+
If you discover a security vulnerability within this project, we strongly encourage you to report it responsibly.
8+
9+
Please **do not open a public issue**. Instead, contact us privately at:
10+
11+
- **Email:** sushilkumbhar77@gmail.com
12+
13+
We aim to respond within **48 hours** and will work with you to verify and address the vulnerability promptly.
14+
15+
## Disclosure Policy
16+
17+
- We will acknowledge receipt of your report within 1–2 business days.
18+
- We will confirm the validity of the issue and plan a timeline for the fix.
19+
- A fix will be released and a public disclosure will be made only after the patch is available.
20+
21+
## Supported Versions
22+
23+
| Version | Supported |
24+
| ------------------ | ------------------ |
25+
| `1.1.2` (latest) | ✅ Supported |
26+
| `< 1.0.0` (legacy) | ❌ Not maintained |
27+
28+
## Scope
29+
30+
This policy applies to the core `Supabase-php/Supabase-client` repository only. Issues related to external dependencies should be reported to their respective maintainers.
31+
32+
## Preferred Languages
33+
34+
Please submit vulnerability reports in **English** if possible.
35+
36+
---
37+
38+
We appreciate responsible disclosures and your effort to make the open-source ecosystem safer.

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Rule
2+
version: 2
3+
updates:
4+
# This section defines updates for Composer dependencies
5+
- package-ecosystem: "composer"
6+
# Directory where the Composer file is located
7+
directory: "/"
8+
# Frequency of the updates (daily, weekly, monthly)
9+
schedule:
10+
interval: "weekly"
11+
labels:
12+
- "dependencies"
13+
# Optionally, you can set a time for the updates
14+
# time: "08:00"
15+
# Optionally, set a day for weekly updates (monday, tuesday, etc.)
16+
# day: "monday"
17+
# Optionally, ignore certain dependencies or versions
18+
# ignore:
19+
# - dependency-name: "vendor/package"
20+
# versions: ["1.x", "2.0.0"]
21+
# Optionally, configure the behavior of pull requests
22+
pull-request-branch-name:
23+
separator: "_"
24+
commit-message:
25+
prefix: "dependabot:"
26+
include: "scope"
27+
target-branch: "master"
28+
versioning-strategy: "increase"
29+
rebase-strategy: "auto"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
6+
# packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
10+
name: 'Dependency review'
11+
on:
12+
pull_request:
13+
branches: [ "master" ]
14+
15+
# If using a dependency submission action in this workflow this permission will need to be set to:
16+
#
17+
# permissions:
18+
# contents: write
19+
#
20+
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
21+
permissions:
22+
contents: read
23+
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
24+
pull-requests: write
25+
26+
jobs:
27+
dependency-review:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: 'Checkout repository'
31+
uses: actions/checkout@v4
32+
- name: 'Dependency Review'
33+
uses: actions/dependency-review-action@v4
34+
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
35+
with:
36+
comment-summary-in-pr: always
37+
# fail-on-severity: moderate
38+
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
39+
# retry-on-snapshot-warnings: true

.github/workflows/stale.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2+
#
3+
# You can adjust the behavior by modifying this file.
4+
# For more information, see:
5+
# https://github.com/actions/stale
6+
name: Mark stale issues and pull requests
7+
8+
on:
9+
schedule:
10+
- cron: '42 18 * * *'
11+
12+
jobs:
13+
stale:
14+
15+
runs-on: ubuntu-latest
16+
permissions:
17+
issues: write
18+
pull-requests: write
19+
20+
steps:
21+
- uses: actions/stale@v5
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
stale-issue-message: 'Stale issue message'
25+
stale-pr-message: 'Stale pull request message'
26+
stale-issue-label: 'no-issue-activity'
27+
stale-pr-label: 'no-pr-activity'

.github/workflows/tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
tests:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Setup PHP with PECL extension
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: '8.4'
24+
25+
- name: Validate composer.json and composer.lock
26+
run: composer validate --strict
27+
28+
- name: Cache Composer packages
29+
id: composer-cache
30+
uses: actions/cache@v5
31+
with:
32+
path: vendor
33+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-php-
36+
37+
- name: Install dependencies
38+
run: composer install --prefer-dist --no-progress
39+
40+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
41+
# Docs: https://getcomposer.org/doc/articles/scripts.md
42+
43+
- name: Run test suite
44+
run: composer run-script test:unit

0 commit comments

Comments
 (0)