Skip to content

Commit 6c97eae

Browse files
authored
Merge pull request #85 from snapshotpl/allow-php8.1
Allow PHP 8.1 and remove deprecated `/api/package` feature
2 parents c41552c + 05eded3 commit 6c97eae

File tree

9 files changed

+21
-1203
lines changed

9 files changed

+21
-1203
lines changed

README.md

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -613,64 +613,6 @@ The minimum structure for creating a new REST service will appear as follows:
613613
}
614614
```
615615
616-
### api/package
617-
618-
This endpoint is for building a deploy package for APIs.
619-
620-
- `Accept`: `application/json`
621-
622-
Returns a JSON structure on success, an API-Problem payload on error.
623-
624-
- `Content-Type`: `application/json`
625-
626-
Expects an object with the property "format", for the file format
627-
ZIP, TAR, TGZ, and ZPK; an "apis" property with a list of the API to
628-
include in the package; a "composer" property that specify if execute
629-
composer or not and an optional "config" property containing the path
630-
to an application config folder to be used in the package.
631-
632-
633-
- Methods: `GET`, `POST`
634-
635-
- Errors: `application/problem+json`
636-
637-
The request payload for `POST` should have the following structure:
638-
639-
```JSON
640-
{
641-
"format": "the file format to be used for the package",
642-
"apis" : {
643-
"Test": true
644-
},
645-
"composer": true,
646-
"config": "the config path to be used in the package"
647-
}
648-
```
649-
650-
On success, the service returns the followings structure:
651-
652-
```JSON
653-
{
654-
"token": "a random token string",
655-
"format": "the file format used for the package"
656-
}
657-
```
658-
659-
The fields of this response can be used in the `GET` method to download
660-
the package file. Basically, the token is a temporary file name stored in
661-
the system temporary folder (`/tmp` in GNU/Linux).
662-
663-
The request payload for `GET` should have the following structure:
664-
665-
```
666-
GET /api/package?token=xxx&format=yyy
667-
```
668-
669-
On success, the service returns the file as `application/octet-stream`
670-
content type.
671-
672-
673-
674616
## API Models
675617
676618
The following is a list of various models either returned via the API endpoints listed above, or

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131
},
3232
"require": {
33-
"php": "^7.3 || ~8.0.0",
33+
"php": "^7.3 || ~8.0.0 || ~8.1.0",
3434
"laminas-api-tools/api-tools": "^1.4",
3535
"laminas-api-tools/api-tools-admin-ui": "^1.3.9",
3636
"laminas-api-tools/api-tools-api-problem": "^1.3",
@@ -61,15 +61,14 @@
6161
},
6262
"require-dev": {
6363
"ext-sqlite3": "*",
64-
"alcaeus/mongo-php-adapter": "^1.2",
64+
"alcaeus/mongo-php-adapter": "^1.2.2",
6565
"laminas/laminas-coding-standard": "~2.3.0",
6666
"laminas/laminas-config": "^2.6 || ^3.2",
6767
"laminas/laminas-loader": "^2.6",
6868
"phpspec/prophecy-phpunit": "^2.0.1",
6969
"phpunit/phpunit": "^9.5.5",
7070
"psalm/plugin-phpunit": "^0.15.0",
71-
"vimeo/psalm": "^4.3",
72-
"zfcampus/zf-deploy": "^1.3"
71+
"vimeo/psalm": "^4.3"
7372
},
7473
"autoload": {
7574
"psr-4": {

0 commit comments

Comments
 (0)