Download the PHP package zestic/weaviate-php-client without Composer
On this page you can find all versions of the php package zestic/weaviate-php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zestic/weaviate-php-client
More information about zestic/weaviate-php-client
Files in zestic/weaviate-php-client
Package weaviate-php-client
Short Description A modern PHP client for Weaviate vector database with multi-tenancy support
License Apache-2.0
Informations about the package weaviate-php-client
Weaviate PHP Client
A modern PHP client for Weaviate vector database with multi-tenancy support.
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Requirements
- PHP 8.3 or higher
- Composer
- Docker and Docker Compose (for integration tests)
Installation
Basic Usage
Quick Start with connectToLocal
Schema Management
The PHP client provides comprehensive schema management capabilities:
Advanced Usage with Manual Connection
Multi-Tenancy
Weaviate supports multi-tenancy, allowing you to isolate data for different tenants within the same collection. This PHP client provides comprehensive tenant management capabilities.
Creating Multi-Tenant Collections
Managing Tenants
Tenant Activity Status Management
Tenants can have different activity statuses that control how their data is stored and accessed:
- ACTIVE: Tenant is fully active, data immediately accessible
- INACTIVE: Tenant is inactive, data stored locally but not accessible
- OFFLOADED: Tenant is inactive, data stored in cloud storage
- OFFLOADING: (Read-only) Tenant is being moved to cloud storage
- ONLOADING: (Read-only) Tenant is being activated from cloud storage
Working with Tenant Data
Once tenants are created, you can work with tenant-specific data:
Tenant Management Best Practices
- Tenant Naming: Use consistent, meaningful tenant names (e.g., customer IDs, organization slugs)
- Status Management: Use INACTIVE for temporary suspension, OFFLOADED for long-term storage
- Batch Operations: Create/update multiple tenants at once for better performance
- Error Handling: Always check tenant existence before performing operations
- Data Isolation: Remember that tenant data is completely isolated
Development
Running Tests
Unit Tests (No External Dependencies)
Integration Tests (Requires Weaviate)
Option 1: Using Docker (Recommended)
Option 2: Using External Weaviate Instance
Test Coverage
Code Quality
Features
Phase 1 (Current)
- ✅ Core client with multi-tenancy support
- ✅ Connection layer with authentication
- ✅ Collections API for basic CRUD operations
- ✅ Data operations with tenant support
Planned Features
- Batch operations
- Query builder with filters
- GraphQL support
- Vector operations
- Advanced schema management
Architecture
The client follows a modular architecture:
- WeaviateClient: Main entry point
- Connection: HTTP communication layer
- Auth: Authentication mechanisms
- Collections: Collection management
- Data: Object CRUD operations
- Schema: Schema management
Contributing
- Fork the repository
- Create a feature branch
- Write tests for your changes
- Ensure all tests pass
- Submit a pull request
Testing Philosophy
This project follows Test-Driven Development (TDD):
- Tests drive the implementation
- High test coverage is maintained
- Both unit and integration tests are included
Documentation
API Reference
- Complete API Documentation - Detailed API reference with examples
- Error Handling Guide - Comprehensive error handling and retry strategies
- Python Client Migration Guide - For developers familiar with the Python client
Key Features
- Three Connection Methods:
connectToLocal()
,connectToWeaviateCloud()
,connectToCustom()
- Full Python Client Parity: Same functionality and patterns as the Python client
- Multi-Tenancy Support: Built-in support for tenant-specific operations
- Type Safety: Full PHPStan level 8 compliance with comprehensive type annotations
- Comprehensive Testing: Unit, integration, and mock tests with 200+ assertions
- Advanced Error Handling: Complete exception hierarchy with retry mechanisms
- Automatic Retries: Exponential backoff for transient failures
Support
For issues and questions, please use the GitHub issue tracker.
All versions of weaviate-php-client with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0 || ^2.0
ramsey/uuid Version ^4.7