Skip to content

Commit

Permalink
Security and Code Style fixes
Browse files Browse the repository at this point in the history
- removed `composer.lock`
- updated `README.md`
- fixed code styling in `src/CoMagic/RestApiClient.php`
- added ability to run `src/tests/test.php` in Docker
  • Loading branch information
pashamesh committed Sep 24, 2024
1 parent e86ad24 commit 67fc1d6
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 682 deletions.
9 changes: 9 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG PHP_VERSION=7.4
ARG COMPOSER_VERSION=2.7.9

FROM composer:${COMPOSER_VERSION} AS composer
FROM php:${PHP_VERSION}-fpm-alpine

COPY --from=composer /usr/bin/composer /usr/bin/composer

WORKDIR /app
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/vendor/
/nbproject/
.idea
.DS_Store
.DS_Store
composer.lock
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.SILENT:

all: test

.PHONY: test
test:
docker compose run --rm test

.PHONY: build
build:
docker compose build
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CoMagic & Uiscom API php client
# [Uiscom](https://www.uiscom.ru/) & [CoMagic](https://main.comagic.ru/) API PHP client
CoMagic php client for:
- Rest API https://www.comagic.ru/support/api/
- Call API
Expand Down Expand Up @@ -38,7 +38,8 @@ $config = [

```

Do not foreget to add `Call API` permissions to user if you want to use login and password authorization for Call API
Do not forget to add `Call API` permissions to user if you want to use login and
password authorization for Call API.


### Rest API
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "php binding for CoMagic API",
"type": "library",
"require": {
"ext-json": "*",
"guzzlehttp/guzzle": "^6.2"
},
"autoload": {
Expand Down
Loading

0 comments on commit 67fc1d6

Please sign in to comment.