supabase/storage-php

There is no license information available for the latest version (v0.0.3) of this package.

Supabase Storage for PHP

v0.0.3 2023-04-28 00:18 UTC

This package is auto-updated.

Last update: 2024-10-28 03:30:50 UTC


README

PHP Client library to interact with Supabase Storage.

Note: This repository is in Alpha and is not ready for production usage. API's will change as it progresses to initial release.

TODO

  • Support for PHP 7.4
  • Adjust response interface to be closer to postgrest-php so manual parsing of response payloads is not needed
  • Running unit and integration tests together results in test failures

Quick Start Guide

Installing the module

composer require supabase/storage-php

Connecting to the storage backend

use Supabase\Storage;

include __DIR__.'/vendor/autoload.php';

use Supabase\Storage;

$client = new StorageClient('API_KEY', 'REFERENCE_ID');

Examples

@TODO - point to the examples directory

Testing

Setup the testing Env

cp .env.example tests/.env

For the REFERENCE_ID

Once signed on to the dashboard, navigate to, Project >> Project Settings >> General settings. Copy the Reference ID for use in the .env.

For the API_KEY

Once signed on to the dashboard, navigate to, Project >> Project Settings >> API >> Project API keys. Choose either the anon public or the service_role key.

Populate the tests/.env to include REFERENCE_ID and API_KEY.

Running all tests

vendor/bin/phpunit