Skip to content

Commit be8fde9

Browse files
Merge branch 'release/0.6.0'
2 parents b378dbd + 60876be commit be8fde9

File tree

111 files changed

+2821
-5774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+2821
-5774
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
vendor
33
.php-cs-fixer.cache
44
.phpcs-cache
5+
composer.lock

CHANGELOG.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# CHANGELOG
22

3+
## v0.6.0 - [2023/09/13] _Release on Programmer's Day. Happy holiday everyone :)_
4+
5+
- Rename method in ListenerPass getPassType() to getType()
6+
- Added PythonApplication, PerlApplication, WebAssemblyApplication
7+
- Added traits
8+
- Updated NodeJsApplication, JavaApplication, GoApplication
9+
- Updated package namespace from Pavlusha311245\UnitPhpSdk to UnitPhpSdk
10+
- Update UnitRequest. Replaced curl with guzzle package
11+
- Moved ListenerPass to Listener\ListenerPass
12+
- Mark some class as Arrayble
13+
314
## v0.5.0 - [2023/09/01]
415

516
- Added ProccessIsolation implementation
@@ -39,8 +50,8 @@
3950

4051
- Added new method `getListenerByPort`
4152
- Added methods for implementation
42-
- `setApplicationLogPath($path)`
43-
- `setApplicationLogFormat($format)`
53+
- `setApplicationLogPath($path)`
54+
- `setApplicationLogFormat($format)`
4455
- Replaced arrays to object in Route
4556
- Updated doc
4657

README.md

+20-25
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
SDK allows developers to interact with the Nginx Unit web server through php classes. This project will help embed web server management into your projects
1818

19-
## Supported Versions
19+
### Supported Versions
2020

2121
| Version | Nginx Unit Capability | Supported |
2222
|---------|:----------------------|--------------------|
23-
| 0.5.x | 1.30.0 | :white_check_mark: |
23+
| 0.6.x | 1.30.0 & 1.31.0 | :white_check_mark: |
2424
| < 0.4.x | 1.30.0 | :x: |
2525

2626
_THIS PROJECT IN DEVELOPMENT. DON'T USE IT IN PRODUCTION_
@@ -39,39 +39,34 @@ _THIS PROJECT IN DEVELOPMENT. DON'T USE IT IN PRODUCTION_
3939
1. Create folder `mkdir example-php-project`
4040
2. Open folder `cd example-php-project`
4141
3. Crate composer.json file. Example below:
42-
```shell
42+
```json
4343
{
44-
"name": "pavlusha311245/example-php-project",
45-
"require": {
46-
"pavlusha311245/unit-php-sdk": "0.5.0"
47-
},
48-
"autoload": {
49-
"psr-4": {
50-
"Pavlusha\\ExamplePhpProject\\": "src/"
51-
}
52-
},
53-
"authors": [
54-
{
55-
"name": "Paul Zavadski",
56-
"email": "[email protected]"
57-
}
58-
]
44+
"name": "user/example-php-project",
45+
"require": {
46+
"pavlusha311245/unit-php-sdk": "^0.6.0"
47+
},
48+
"autoload": {
49+
"psr-4": {
50+
"User\\ExamplePhpProject\\": "src/"
51+
}
52+
}
5953
}
54+
6055
```
6156
4. Install packages `composer install`
6257

6358
Congratulations! You installed package. Now you can use the full power of this SDK.
6459

6560
* Create `src/index.php` file
66-
1. `cd src` (`mkdir src` if doesn't exist)
61+
1. `cd src` (`mkdir src` if folder doesn't exist)
6762
2. `touch src/index.php`
6863
3. `nano src/index.php`
6964
* Paste code and change this line `socket: <your socket path to Nginx Unit>` for your configuration
7065

7166
```php
7267
<?php
7368

74-
use Pavlusha311245\UnitPhpSdk\Unit;
69+
use UnitPhpSdk\Unit;
7570

7671
require '../vendor/autoload.php';
7772

@@ -83,13 +78,13 @@ $unit = new Unit(
8378
$unit->getConfig();
8479
```
8580

86-
* Run index.php
81+
* Run `php index.php`
8782

88-
#### Happy coding 😊
83+
### Documentation
8984

90-
## Documentation
85+
More examples and detailed information can be found [in the documentation](https://unit-sdk.pavlusha.me/)
9186

92-
More information about API references you can find [here](https://unit-sdk.pavlusha.me/)
87+
Happy coding 😊
9388

9489
## Changelog
9590

@@ -103,6 +98,6 @@ read [here](https://docs.github.com/en/get-started/quickstart/contributing-to-pr
10398
## Security Policy
10499

105100
If you find bugs and vulnerabilities, please
106-
101+
107102

108103
More info [here](SECURITY.md)

SECURITY.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
## Security Policy
22

33
## Versioning
4-
We use SemVer for versioning. For the versions available, see the tags on this repository.
4+
We use [SemVer](https://semver.org/) for versioning. For the versions available, see the tags on this repository.
55

66
## Supported Versions
77

88
| Version | Nginx Unit Capability | Supported |
99
|---------|:----------------------|--------------------|
10-
| 0.5.x | 1.30.0 | :white_check_mark: |
11-
| < 0.4.x | 1.30.0 | :x: |
10+
| 0.6.x | 1.30.0 & 1.31.0 | :white_check_mark: |
11+
| < 0.5.x | 1.30.0 | :x: |
1212

1313
## Vulnerability Report
1414

1515
Please report all package vulnerabilities as well as dependencies that may also compromise the safe use of this project
16-
to [email protected]. Each vulnerability will be treated as a priority for fixes.
16+
to [email protected] . Each vulnerability will be treated as a priority for fixes.

composer.json

+24-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pavlusha311245/unit-php-sdk",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"type": "sdk",
55
"description": "This project allows developers to interact with the Nginx Unit web server through PHP classes",
66
"license": "Apache-2.0",
@@ -10,43 +10,47 @@
1010
"nginx unit",
1111
"sdk"
1212
],
13-
"autoload": {
14-
"psr-4": {
15-
"Pavlusha311245\\UnitPhpSdk\\": "src/"
16-
}
17-
},
18-
"autoload-dev": {
19-
"psr-4": {
20-
"Tests\\": "tests/"
21-
}
22-
},
2313
"authors": [
2414
{
2515
"name": "Pavel Zavadski",
2616
"email": "[email protected]",
2717
"homepage": "https://pavlusha.me/"
2818
}
2919
],
30-
"minimum-stability": "stable",
20+
"scripts": {
21+
"test": [
22+
"./vendor/bin/pest",
23+
"./vendor/bin/phpstan analyse -c phpstan.neon"
24+
],
25+
"test:unit": "./vendor/bin/pest",
26+
"test:phpstan": "./vendor/bin/phpstan analyse -c phpstan.neon",
27+
"lint": "./vendor/bin/php-cs-fixer fix --rules=@PSR12 ."
28+
},
3129
"require": {
3230
"php": ">=8.2",
3331
"friendsofphp/php-cs-fixer": "^3.21",
34-
"ext-curl": "*"
32+
"ext-curl": "*",
33+
"guzzlehttp/guzzle": "^7.0"
3534
},
3635
"require-dev": {
3736
"pestphp/pest": "^2.8",
3837
"phpstan/phpstan": "^1.10"
3938
},
39+
"autoload": {
40+
"psr-4": {
41+
"UnitPhpSdk\\": "src/"
42+
}
43+
},
44+
"autoload-dev": {
45+
"psr-4": {
46+
"Tests\\": "tests/"
47+
}
48+
},
4049
"config": {
4150
"allow-plugins": {
4251
"pestphp/pest-plugin": true
4352
}
4453
},
45-
"scripts": {
46-
"test": [
47-
"./vendor/bin/pest",
48-
"./vendor/bin/phpstan analyse -c phpstan.neon"
49-
],
50-
"lint": "./vendor/bin/php-cs-fixer fix --rules=@PSR12 ."
51-
}
54+
"minimum-stability": "stable",
55+
"prefer-stable": true
5256
}

0 commit comments

Comments
 (0)