Download the PHP package blashbrook/papiclient without Composer

On this page you can find all versions of the php package blashbrook/papiclient. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package papiclient

PAPIClient

Latest Version on Packagist Total Downloads PHP Composer Node.js CI Dependency Review Semantic-Release StyleCI

A Laravel package for integrating with Polaris API (PAPI) services. Provides API client functionality and pre-built Livewire components for common library operations.

Key Features:

Take a look at contributing.md to see a to do list.

Table of Contents

Installation

Via Composer

Add the following variables to the project .env file

Usage

Components

DeliveryOptionSelectFlux

A Livewire component that provides a filtered, customizable select dropdown for delivery options using the Flux UI framework.

Features

Quick Start

To use the delivery options component with session integration:

  1. In your Livewire component:

  2. In your Blade template:

That's it! The component will show: Mail, Email, Phone, Text Messaging with session persistence.

Important: The component includes an updatedDeliveryOptionIDChanged() listener that automatically:

Configuration

1. Available Delivery Options

The component filters delivery options using an internal array. To modify which options are shown and their display names, edit the $availableDeliveryOptions array in /src/Livewire/DeliveryOptionSelectFlux.php:

Key Points:

2. Usage in Blade Templates

Basic Usage:

With Initial Value:

3. Parent Component Integration

In your parent Livewire component:

4. Database Requirements

Ensure your delivery_options table has the structure:

Sample Data:

5. Customization Examples

Adding New Options:

  1. Add the option to your database
  2. Add it to the $availableDeliveryOptions array:

Changing Display Names:

Removing Options: Simply remove the line from the $availableDeliveryOptions array. The option will be filtered out even if it exists in the database.

6. Session Integration

The component automatically integrates with Laravel sessions:

7. Testing

The component includes comprehensive tests. Run them with:

8. Troubleshooting

Component not showing options:

Trim error:

Session not persisting:

PatronUDFSelectFlux

A dynamic Livewire component that creates select dropdowns from Patron User Defined Fields (UDFs) stored in your database. Perfect for forms that need library-specific custom fields like School, Department, Grade Level, etc.

Features

Quick Start

To use the PatronUDF component for a "School" selection:

  1. In your Livewire component:

  2. In your Blade template:

Important: The component includes an updatedSelectedPatronUDFChanged() listener that automatically:

PostalCodeSelectFlux

A comprehensive Livewire component for postal code selection with city, state, and county information. Ideal for address forms, service area selection, and location-based features.

Features

Quick Start

To use the postal code component for address selection:

  1. In your Livewire component:

  2. In your Blade template:

Important: The component includes an updatedSelectedPostalCodeChanged() listener that automatically:

Listener Implementation Details

All Flux components include automatic listeners that:

Example of listener in action:

For complete configuration and usage examples, see the comprehensive testing documentation below.

Change log

PAPIClient has been refactored to use fluency! Now you can chain commands together, making the client more flexible and easier to use.

Please see the changelog for more information on what has changed recently.

@TODO Add Error catching

Testing

PAPIClient includes a comprehensive test suite covering unit tests, integration tests, and performance tests. The package uses PHPUnit 10 with organized test suites and convenient make commands.

Quick Start

Test Suites

Unit Tests

Fast, isolated tests that don't make real API calls:

Unit tests cover:

Integration Tests

Tests that make real API calls to your PAPI server:

Integration tests cover:

Prerequisites for Integration Tests: Set these environment variables before running integration tests:

Or use the setup helper:

Feature Tests

High-level tests for Laravel integration:

Performance Tests

Benchmark tests for response times and memory usage:

Coverage Reports

Generate detailed code coverage reports:

Make Commands Reference

All available testing commands via Makefile:

Direct PHPUnit Usage

If you prefer using PHPUnit directly:

Continuous Integration

For CI/CD pipelines, use:

Testing Configuration

The test suite uses phpunit.xml with separate configurations for:

Test Safety

Important: Integration tests are disabled by default to prevent accidental API calls. They only run when explicitly enabled via environment variables.

Component Testing

The package includes comprehensive tests for all Livewire components (DeliveryOptionSelectFlux, PatronUDFSelectFlux, PostalCodeSelectFlux).

Component Test Structure

Running Component Tests

All component tests:

Individual component tests:

Test specific component features:

Component Test Coverage

PatronUDFSelectFlux Tests Cover:

PostalCodeSelectFlux Tests Cover:

Feature Tests Cover:

Test Database Setup

Component tests use in-memory SQLite databases with the RefreshDatabase trait:

Testing Component Interactions

Test Event Handling:

Test Session Integration:

Test Component Properties:

Running Tests with Coverage

Component Test Performance

Test execution speed:

Optimizing test performance:

Troubleshooting Tests

Tests not found:

Integration tests skipped: Ensure ENABLE_INTEGRATION_TESTS=true is set

Component tests failing:

Livewire component tests failing:

Coverage requires Xdebug:

Permission errors:

Database-related test failures:

PatronUDFSelectFlux

A dynamic Livewire component that creates select dropdowns from Patron User Defined Fields (UDFs) stored in your database. Perfect for forms that need library-specific custom fields like School, Department, Grade Level, etc.

Features

Quick Start

To use the PatronUDF component for a "School" selection:

  1. In your Livewire component:

  2. In your Blade template:

Configuration

1. Database Setup

Ensure your patron_udfs table has records like:

Sample Data:

2. Component Parameters
3. Usage Examples

Basic School Selection:

Department Selection with Custom Placeholder:

Grade Level with Session Integration:

4. Event Handling

The component dispatches patronUdfUpdated events:

5. Session Integration
6. Customization

Custom Display Names (Advanced): Extend the component to override display names:

7. Troubleshooting

No options appearing:

Session not persisting:

Wrong UDF loading:

PostalCodeSelectFlux

A comprehensive Livewire component for postal code selection with city, state, and county information. Ideal for address forms, service area selection, and location-based features.

Features

Quick Start

To use the postal code component for address selection:

  1. In your Livewire component:

  2. In your Blade template:

Configuration

1. Database Setup

Ensure your postal_codes table has the structure:

Sample Data:

2. Component Parameters
3. Display Formats

Available formats:

4. Geographic Filtering

Filter by State:

Filter by Multiple Criteria:

Dynamic Filtering in Parent Component:

5. Usage Examples

Basic Postal Code Selection:

Service Area Selection:

Address Form Integration:

6. Event Handling

The component dispatches comprehensive postalCodeUpdated events:

7. Session Integration
8. Advanced Customization

Custom Display Format: Extend the component for custom formatting:

Search Integration:

9. Performance Optimization

Lazy Loading:

Pagination for Large Datasets:

10. Troubleshooting

No postal codes appearing:

Performance issues:

Session not persisting:

Incorrect location data:

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.


All versions of papiclient with dependencies

PHP Build Version
Package Version
Requires nette/schema Version ^v1.3.0
league/commonmark Version ^2.4.0
php Version ^8.3
illuminate/database Version ^12.32.5|^13.0
illuminate/support Version ^12.32.5|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package blashbrook/papiclient contains the following files

Loading the files please wait ...