Download the PHP package luk-z/api-proxy-php without Composer

On this page you can find all versions of the php package luk-z/api-proxy-php. 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 api-proxy-php

Latest Stable Version

api-proxy-php

A PHP API proxy (headless) project built using the Lumen framework.

This is a lightweight API proxy built with Lumen (Laravel micro-framework). It provides a simple REST API structure without database or view management.

Usage in applications

  1. Install as dependency

  2. Add custom includes To add custom Controllers and Routes just define these constants:

  3. Copy the environment file:

Required define

In order to work the following php define should be defined:

These php defined are optional

Requirements

Development

Setup local machine

To install dependencies php 7.3+ and composer are needed. Instead installing them in the local machine use a dockerized composer (requires Docker Desktop).

Create php and composer aliases following this guide.

  1. Clone the repository:

  2. Install suggested vscode extensions

  3. Copy the php-cs-fixer-wrapper.sh file:

change WORKSPACE_ROOT="<absolute path to your workspace>" inserting the application absolute path (use pwd command to obtain absolute path)

  1. Install dependencies:

Running the Application

Start the development server:

The application will be available at http://localhost:8000.

Development Tools

Code Quality and Formatting

This project includes PHP linting and formatting tools that work seamlessly with Visual Studio Code.

Tools Included

Visual Studio Code Setup

  1. Install the recommended extensions when prompted, or manually install:

    • PHP CS Fixer (junstyle.php-cs-fixer)
    • PHP_CodeSniffer (ikappas.phpcs)
    • PHP Intelephense (bmewburn.vscode-intelephense-client)
  2. The workspace settings (.vscode/settings.json) are pre-configured to:
    • Enable format on save
    • Run PHP CS Fixer automatically
    • Show PHPCS violations in real-time

Command Line Usage

Check for coding standard violations:

Automatically fix coding standard violations:

Format code using PHP CS Fixer:

Check what PHP CS Fixer would change (dry run):

Configuration Files

Testing

This project uses PHPUnit for testing.

Run all tests:

Run tests with coverage:

Tests are located in the tests/ directory and follow the PSR-12 coding standard.

API Endpoints

Root Endpoint

Returns the Lumen version information.

Hello World Endpoint

Returns a simple JSON response:

Project Structure

License

This project is open-sourced software licensed under the MIT license.


All versions of api-proxy-php with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
laravel/lumen-framework Version ^8.0
luk-z/php-api-token-auth Version ^0.1.18
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 luk-z/api-proxy-php contains the following files

Loading the files please wait ...