Skip to content

Commit

Permalink
Merge pull request #85 from snapshotpl/allow-php8.1
Browse files Browse the repository at this point in the history
Allow PHP 8.1 and remove deprecated `/api/package` feature
  • Loading branch information
Ocramius committed Jun 7, 2022
2 parents c41552c + 05eded3 commit 6c97eae
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 1,203 deletions.
58 changes: 0 additions & 58 deletions README.md
Expand Up @@ -613,64 +613,6 @@ The minimum structure for creating a new REST service will appear as follows:
}
```

### api/package

This endpoint is for building a deploy package for APIs.

- `Accept`: `application/json`

Returns a JSON structure on success, an API-Problem payload on error.

- `Content-Type`: `application/json`

Expects an object with the property "format", for the file format
ZIP, TAR, TGZ, and ZPK; an "apis" property with a list of the API to
include in the package; a "composer" property that specify if execute
composer or not and an optional "config" property containing the path
to an application config folder to be used in the package.


- Methods: `GET`, `POST`

- Errors: `application/problem+json`

The request payload for `POST` should have the following structure:

```JSON
{
"format": "the file format to be used for the package",
"apis" : {
"Test": true
},
"composer": true,
"config": "the config path to be used in the package"
}
```

On success, the service returns the followings structure:

```JSON
{
"token": "a random token string",
"format": "the file format used for the package"
}
```

The fields of this response can be used in the `GET` method to download
the package file. Basically, the token is a temporary file name stored in
the system temporary folder (`/tmp` in GNU/Linux).

The request payload for `GET` should have the following structure:

```
GET /api/package?token=xxx&format=yyy
```

On success, the service returns the file as `application/octet-stream`
content type.



## API Models

The following is a list of various models either returned via the API endpoints listed above, or
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Expand Up @@ -30,7 +30,7 @@
}
},
"require": {
"php": "^7.3 || ~8.0.0",
"php": "^7.3 || ~8.0.0 || ~8.1.0",
"laminas-api-tools/api-tools": "^1.4",
"laminas-api-tools/api-tools-admin-ui": "^1.3.9",
"laminas-api-tools/api-tools-api-problem": "^1.3",
Expand Down Expand Up @@ -61,15 +61,14 @@
},
"require-dev": {
"ext-sqlite3": "*",
"alcaeus/mongo-php-adapter": "^1.2",
"alcaeus/mongo-php-adapter": "^1.2.2",
"laminas/laminas-coding-standard": "~2.3.0",
"laminas/laminas-config": "^2.6 || ^3.2",
"laminas/laminas-loader": "^2.6",
"phpspec/prophecy-phpunit": "^2.0.1",
"phpunit/phpunit": "^9.5.5",
"psalm/plugin-phpunit": "^0.15.0",
"vimeo/psalm": "^4.3",
"zfcampus/zf-deploy": "^1.3"
"vimeo/psalm": "^4.3"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 6c97eae

Please sign in to comment.