Skip to content

Commit

Permalink
feat(master): Update vendors
Browse files Browse the repository at this point in the history
- Update symfony framework to version 5.1
- Fix coding standards
- Fix unit tests
  • Loading branch information
Artem Onyshchenko committed Jun 4, 2020
1 parent ccdc9ac commit 307eaf0
Show file tree
Hide file tree
Showing 151 changed files with 2,273 additions and 1,786 deletions.
80 changes: 65 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,62 @@ Backend RPC Api
- PostgreSQL 11
- RabbitMQ 3

## Requests

Get api documentation in JSON format.

`curl 'http://localhost:9501/doc'`

Get api documentation in OpenApi3 format.

`curl 'http://localhost:9501/doc/openapi.json'`

Get documentation in beauty Swagger format (open in browser).

`http://localhost:9501/docs`

Curl rpc 'ping' request.

`curl 'http://localhost:9501/json-rpc' --data-binary '[{ "jsonrpc":"2.0","method":"ping","params":[],"id" : 1 }]'`

Curl rpc 'add' item request.

`curl 'http://localhost:9501/json-rpc' --data-binary '[{ "jsonrpc":"2.0","method":"add","params":{"version": "0.0.1", "parentId": 2, "name": "test2", "url": "http://test2.com", "status": 1}, "id" : 2 }]'`

Curl rpc 'find' item request.

`curl 'http://localhost:9501/json-rpc' --data-binary '[{ "jsonrpc":"2.0","method":"find","params":{"parent_id" : 2},"id" : 1}]'`

Curl rpc 'fetch' item request.

`curl 'http://localhost:9501/json-rpc' --data-binary '[{ "jsonrpc":"2.0","method":"fetch","params":{"uuid": "2d291dbd-40b0-484e-9e94-40a015d99a63"},"id" : 1}]'`

Curl rpc 'update' item request.

`curl 'http://localhost:9501/json-rpc' --data-binary '[{ "jsonrpc":"2.0","method":"update", "params":{"version": "0.0.1","uuid": "2d291dbd-40b0-484e-9e94-40a015d99a63", "parentId": 3,"name": "test3","url": "http://test3.com","status": 1},"id" : 1}]'`

Curl rpc 'delete' item request.

`curl 'http://localhost:9501/json-rpc' --data-binary '[{ "jsonrpc":"2.0","method":"delete","params":{"version": "0.0.1", "uuid": "2d291dbd-40b0-484e-9e94-40a015d99a63"},"id" : 1 }]'`

## Project Setup

Up new environment:

`make install`

See all make commands

`make help`

Full test circle

`make test`

Execute tests:

`make phpunit`
`tests-unit`
`tests-integration`

Static code analysis:

Expand All @@ -34,31 +81,34 @@ Code style fixer:

`make coding-standards-fixer`

Code style checker:
Code style checker (PHP CS Fixer and PHP_CodeSniffer):

`make coding-standards`

Enter in php container:
Psalm is a static analysis tool for finding errors in PHP applications, built on top of PHP Parser:

`make php-shell`
`make psalm`

Make release commit
PHPStan focuses on finding errors in your code without actually running it.

`make release`
`make phpstan`

Make conventional commit,
read specs https://www.conventionalcommits.org/en/v1.0.0-beta.2
Phan is a static analyzer for PHP that prefers to minimize false-positives. Phan attempts to prove incorrectness rather than correctness.

`make commit`
`make phan`

Watch containers logs
Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers in your PHP projects.

`make logs`
`make layer`

See all make commands
Security Checker is a command line tool that checks if your application uses dependencies with known security vulnerabilities. It uses the Security Check Web service and the Security Advisories Database.

`make help`
`security-tests`

Full test circle
Enter in php container:

`make test`
`make php-shell`

Watch containers logs

`make logs`
Loading

0 comments on commit 307eaf0

Please sign in to comment.