| 
1 |  | - | 
2 | 1 | <p align="center">  | 
3 |  | -<img style="text-aligh: center" src="https://15804523-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F77F3kdmGsRkZFelMUJq1%2Ficon%2FnsTZCyEjC1z8LJWkzLro%2F%D1%8B.svg?alt=media&token=ce321f03-8fdf-4c4d-aaef-888183f713f6" width="200" alt="Company logo">  | 
 | 2 | +<img style="text-align: center" src="https://15804523-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F77F3kdmGsRkZFelMUJq1%2Ficon%2FnsTZCyEjC1z8LJWkzLro%2F%D1%8B.svg?alt=media&token=ce321f03-8fdf-4c4d-aaef-888183f713f6" width="200" alt="Company logo">  | 
4 | 3 | </p>  | 
5 | 4 | 
 
  | 
6 | 5 | <p align="center">  | 
7 | 6 | <b style="font-size: 2rem">PHP SDK for Nginx Unit</b>  | 
8 | 7 | </p>  | 
9 | 8 | 
 
  | 
10 | 9 | <p align="center">  | 
11 |  | -<a href="https://packagist.org/packages/pavlusha311245/unit-php-sdk"><img src="https://img.shields.io/packagist/v/Pavlusha311245/unit-php-sdk?labelColor=%231e293b&color=%23702963&link=https%3A%2F%2Fpackagist.org%2Fpackages%2Fpavlusha311245%2Funit-php-sdk"></a>  | 
12 |  | -<a href="https://unit-sdk.pavlusha.me/"><img src="https://img.shields.io/website?url=https%3A%2F%2Funit-sdk.pavlusha.me%2F&label=documentation&link=https%3A%2F%2Funit-sdk.pavlusha.me%2F"></a>  | 
 | 10 | +<a href="https://packagist.org/packages/pavlusha311245/unit-php-sdk"><img src="https://img.shields.io/packagist/v/Pavlusha311245/unit-php-sdk?labelColor=%231e293b&color=%23702963&link=https%3A%2F%2Fpackagist.org%2Fpackages%2Fpavlusha311245%2Funit-php-sdk" alt="packagist link"></a>  | 
 | 11 | +<a href="https://unit-sdk.pavlusha.me/"><img src="https://img.shields.io/website?url=https%3A%2F%2Funit-sdk.pavlusha.me%2F&label=documentation&link=https%3A%2F%2Funit-sdk.pavlusha.me%2F" alt="documentation link"></a>  | 
 | 12 | +<img src="https://github.com/Pavlusha311245/nginx-unit-php-sdk/actions/workflows/deploy_codecov.yaml/badge.svg" alt="documentation link">  | 
 | 13 | +<a href="https://codecov.io/gh/Pavlusha311245/nginx-unit-php-sdk" >   | 
 | 14 | + <img src="https://codecov.io/gh/Pavlusha311245/nginx-unit-php-sdk/graph/badge.svg?token=FGTTDSJ7BX" alt="Codecov dabge"/>   | 
 | 15 | + </a>  | 
13 | 16 | </p>  | 
14 | 17 | 
 
  | 
15 |  | -## About   | 
16 |  | - | 
17 |  | -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  | 
18 |  | - | 
19 |  | -### Supported Versions  | 
20 |  | - | 
21 |  | -| Version | Nginx Unit Capability | Supported          |  | 
22 |  | -|---------|:----------------------|--------------------|  | 
23 |  | -| 0.6.x   | 1.30.0 & 1.31.0       | :white_check_mark: |  | 
24 |  | -| < 0.4.x | 1.30.0                | :x:                |  | 
25 |  | - | 
26 |  | -_THIS PROJECT IN DEVELOPMENT. DON'T USE IT IN PRODUCTION_  | 
 | 18 | +## About  | 
27 | 19 | 
 
  | 
28 |  | -## Quick start  | 
 | 20 | +SDK allows developers to interact with the Nginx Unit web server through php classes. This project will help embed web  | 
 | 21 | +server management into your projects  | 
 | 22 | +> This project in development. Don't use it in production. Some features may not work correctly. Please report bugs and issues to the issue tracker.  | 
29 | 23 | 
  | 
30 |  | -### Pre-requirements  | 
 | 24 | +### Requirements  | 
31 | 25 | 
 
  | 
32 |  | -* [PHP](https://www.php.net/) >= 8.2  | 
33 |  | -* [PHP curl extension](https://www.php.net/manual/en/book.curl.php)  | 
 | 26 | +* [PHP](https://www.php.net/) >= 8.3  | 
34 | 27 | * [Composer](https://getcomposer.org/) >= 2  | 
35 |  | -* [Nginx unit](https://unit.nginx.org/installation/) >= 1.30.0  | 
36 |  | - | 
37 |  | -### Installation  | 
38 | 28 | 
 
  | 
39 |  | -1. Create folder `mkdir example-php-project`  | 
40 |  | -2. Open folder `cd example-php-project`  | 
41 |  | -3. Crate composer.json file. Example below:  | 
42 |  | -```json  | 
43 |  | -{  | 
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 |  | -  }  | 
53 |  | -}  | 
54 |  | - | 
55 |  | -```  | 
56 |  | -4. Install packages `composer install`  | 
 | 29 | +### Supported Versions  | 
57 | 30 | 
 
  | 
58 |  | -Congratulations! You installed package. Now you can use the full power of this SDK.  | 
 | 31 | +| Version | Nginx Unit Capability | Supported          |  | 
 | 32 | +|---------|:----------------------|--------------------|  | 
 | 33 | +| 0.7.x   | <= 1.32.1             | :white_check_mark: |  | 
 | 34 | +| < 0.6.x | -                     | :x:                |  | 
59 | 35 | 
 
  | 
60 |  | -* Create `src/index.php` file  | 
61 |  | -  1. `cd src` (`mkdir src` if folder doesn't exist)  | 
62 |  | -  2. `touch src/index.php`  | 
63 |  | -  3. `nano src/index.php`  | 
64 |  | -* Paste code and change this line `socket: <your socket path to Nginx Unit>` for your configuration  | 
 | 36 | +### Quick start  | 
65 | 37 | 
 
  | 
66 |  | -```php  | 
67 |  | -<?php  | 
 | 38 | +How to start using the SDK in your project you can find in the [documentation](https://unit-sdk.pavlusha.me/installation).  | 
68 | 39 | 
 
  | 
69 |  | -use UnitPhpSdk\Unit;  | 
 | 40 | +### Documentation  | 
70 | 41 | 
 
  | 
71 |  | -require '../vendor/autoload.php';  | 
 | 42 | +The Unit SDK offers a wide range of functionality. More examples and detailed information about its features,  | 
 | 43 | +installation, and use can be found [in the documentation](https://unit-sdk.pavlusha.me/). Check it out to make the most  | 
 | 44 | +of this extensive tool. Happy coding 😊  | 
72 | 45 | 
 
  | 
73 |  | -$unit = new Unit(  | 
74 |  | -    socket: <your socket path to Nginx Unit>,  | 
75 |  | -    address: 'http://localhost'  | 
76 |  | -);  | 
 | 46 | +## Changelog  | 
77 | 47 | 
 
  | 
78 |  | -$unit->getConfig();  | 
79 |  | -```  | 
 | 48 | +We regularly update our code base due to new features, bug fixes or performance improvements. More information about  | 
 | 49 | +these changes, including version details and update summaries, can be seen [here](CHANGELOG.md).  | 
80 | 50 | 
 
  | 
81 |  | -* Run `php index.php`  | 
 | 51 | +## Contributing  | 
82 | 52 | 
 
  | 
83 |  | -### Documentation  | 
 | 53 | +We appreciate all forms of contributions from code additions to reporting issues. Our project is open-source and thrives  | 
 | 54 | +from the contributions made by our community. More info about how you can contribute to our project, contribution  | 
 | 55 | +guidelines, and the whole process can be  | 
 | 56 | +read [here](https://docs.github.com/en/get-started/quickstart/contributing-to-projects).  | 
84 | 57 | 
 
  | 
85 |  | -More examples and detailed information can be found [in the documentation](https://unit-sdk.pavlusha.me/)  | 
 | 58 | +## Code of Conduct  | 
86 | 59 | 
 
  | 
87 |  | -Happy coding 😊  | 
 | 60 | +We want to create a welcoming environment for all of our projects. Our code of conduct outlines our expectations for all  | 
 | 61 | +those who participate in our community, as well as the consequences for unacceptable behavior. We invite you to help us  | 
 | 62 | +create a safe and positive experience for everyone. More info about our code of conduct can be  | 
 | 63 | +found [here](.github/CODE_OF_CONDUCT.md).  | 
88 | 64 | 
 
  | 
89 |  | -## Changelog  | 
 | 65 | +## Security Policy  | 
90 | 66 | 
 
  | 
91 |  | -More information about changes you can see [here](CHANGELOG.md)  | 
 | 67 | +If you find bugs and vulnerabilities, please  | 
 | 68 | + | 
92 | 69 | 
 
  | 
93 |  | -## Contribution  | 
 | 70 | +More info [here](.github/SECURITY.md)  | 
94 | 71 | 
 
  | 
95 |  | -More info about contribution you can  | 
96 |  | -read [here](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)  | 
 | 72 | +## Support  | 
97 | 73 | 
 
  | 
98 |  | -## Security Policy  | 
 | 74 | +<div>  | 
 | 75 | +<p>The project is being developed with the support of IDE from JetBrains</p>  | 
 | 76 | +  <img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" alt="JetBrains Logo (Main) logo.">  | 
 | 77 | +</div>  | 
99 | 78 | 
 
  | 
100 |  | -If you find bugs and vulnerabilities, please  | 
101 |  | - | 
 | 79 | +## License  | 
102 | 80 | 
 
  | 
103 |  | -More info [here](SECURITY.md)  | 
 | 81 | +This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.  | 
0 commit comments