Skip to content

Commit

Permalink
Merge pull request #1 from Jeroeny/update
Browse files Browse the repository at this point in the history
refactor
  • Loading branch information
Jeroeny authored Oct 27, 2019
2 parents dcce2e7 + 186b719 commit 030d91f
Show file tree
Hide file tree
Showing 192 changed files with 10,646 additions and 14,020 deletions.
22 changes: 11 additions & 11 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
* text=auto

/doc export-ignore
/test export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
/UPGRADE.md export-ignore
/doc export-ignore
/test export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/phpcs.xml export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
/UPGRADE.md export-ignore
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.idea
vendor/
composer.lock

.idea
.phpunit.result.cache
.phpcs-cache
26 changes: 9 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
language: php

sudo: false

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot

matrix:
# test latest PHP stable version with lowest dependencies and phpstan static analysis
include:
- php: 7.1
env: COMPOSER_FLAGS="--prefer-lowest" STATIC_ANALYSIS=yes

before_script:
- travis_retry composer self-update
- travis_retry composer update --no-interaction ${COMPOSER_FLAGS}
- if [ "$STATIC_ANALYSIS" != "" ]; then curl -L https://github.com/phpstan/phpstan/releases/download/0.8/phpstan.phar -o phpstan.phar; fi;
install:
- composer install --no-progress

script:
- vendor/bin/phpunit --verbose --coverage-text
- if [ "$STATIC_ANALYSIS" != "" ]; then php phpstan.phar analyse --level=4 lib; fi;
- ./vendor/bin/phpcs
- ./vendor/bin/phpstan analyse -c phpstan.neon
- ./vendor/bin/phpunit --coverage-clover=coverage.xml

after_success:
- bash <(curl -s https://codecov.io/bash)
File renamed without changes.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ up: ## Up the containers

test: up ## Test API
docker-compose exec php composer install
docker-compose exec php /app/vendor/phpunit/phpunit/phpunit --no-configuration /app/test
docker-compose exec php /app/vendor/phpunit/phpunit/phpunit --no-configuration /app/test
31 changes: 8 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,24 @@
A PHP wrapper to be used with [Gitlab's API](https://github.com/gitlabhq/gitlabhq/tree/master/doc/api).
==============

[![Build Status](https://travis-ci.org/m4tthumphrey/php-gitlab-api.svg?branch=master)](https://travis-ci.org/m4tthumphrey/php-gitlab-api)
[![StyleCI](https://styleci.io/repos/6816335/shield?branch=master)](https://styleci.io/repos/6816335)
[![Total Downloads](https://poser.pugx.org/m4tthumphrey/php-gitlab-api/downloads?format=flat-square)](https://packagist.org/packages/m4tthumphrey/php-gitlab-api)
[![Latest Stable Version](https://poser.pugx.org/m4tthumphrey/php-gitlab-api/version?format=flat-square)](https://packagist.org/packages/m4tthumphrey/php-gitlab-api)
[![Latest Unstable Version](https://poser.pugx.org/m4tthumphrey/php-gitlab-api/v/unstable?format=flat-square)](//packagist.org/packages/m4tthumphrey/php-gitlab-api)
[![Build Status](https://travis-ci.org/Jeroeny/gitlab-api.svg?branch=master)](https://travis-ci.org/jeroeny/gitlab-api)
[![StyleCI](https://styleci.io/repos/217726394/shield?branch=master)](https://github.styleci.io/repos/217726394)
[![codecov](https://codecov.io/gh/Jeroeny/gitlab-api/branch/master/graph/badge.svg)](https://codecov.io/gh/Jeroeny/gitlab-api)

Based on [php-github-api](https://github.com/m4tthumphrey/php-github-api) and code from [KnpLabs](https://github.com/KnpLabs/php-github-api).

Forked from [php-gitlab-api](https://github.com/jeroeny/gitlab-api) and based on [php-github-api](https://github.com/m4tthumphrey/php-github-api) and code from [KnpLabs](https://github.com/KnpLabs/php-github-api).

Installation
------------

Via [composer](https://getcomposer.org)

```bash
composer require m4tthumphrey/php-gitlab-api php-http/guzzle6-adapter:^1.0
composer require jeroeny/gitlab-api
```

Why `php-http/guzzle6-adapter`? We are decoupled from any HTTP messaging client with help by [HTTPlug](http://httplug.io).

You can visit [HTTPlug for library users](http://docs.php-http.org/en/latest/httplug/users.html) to get more information about installing HTTPlug related packages.

Versioning
----------

Depending on your Gitlab server version, you must choose the right version of this library.
Please refer to the following table to pick the right one.

|Version|Gitlab API Version|Gitlab Version|
|-------|------------------|--------------|
|9.x | V4 | >= 9.0 |
|8.x | V3 | < 9.5 |

General API Usage
-----------------

Expand Down Expand Up @@ -98,7 +84,7 @@ $issue = $project->createIssue('This does not work.', array(
$issue->close();
```

You get the idea! Take a look around ([API methods](https://github.com/m4tthumphrey/php-gitlab-api/tree/master/lib/Gitlab/Api),
You get the idea! Take a look around ([API methods](https://github.com/jeroeny/gitlab-api/tree/master/lib/Gitlab/Api),
[models](https://github.com/m4tthumphrey/php-gitlab-api/tree/master/lib/Gitlab/Model)) and please feel free to report any bugs.

Framework Integrations
Expand All @@ -111,5 +97,4 @@ If you have integrated GitLab into a popular PHP framework, let us know!
Contributing
------------

There are many parts of Gitlab that I have not added to this as it was originally created for personal use, hence the
lack of tests. Feel free to fork and add new functionality and tests, I'll gladly accept decent pull requests.
Feel free to fork and add new functionality and/or tests, I'll gladly accept decent pull requests.
109 changes: 61 additions & 48 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,63 @@
{
"name": "m4tthumphrey/php-gitlab-api",
"type": "library",
"description": "GitLab API client",
"homepage": "https://github.com/m4tthumphrey/php-gitlab-api",
"keywords": ["gitlab", "api"],
"license": "MIT",
"authors": [
{
"name": "Matt Humphrey",
"homepage": "http://m4tt.io"
},
{
"name": "KnpLabs Team",
"homepage": "http://knplabs.com"
},
{
"name": "Thibault Duplessis",
"email": "[email protected]",
"homepage": "http://ornicar.github.com"
}
],
"require": {
"php": "^5.6 || ^7.0",
"ext-xml": "*",
"php-http/client-common": "^1.6",
"php-http/client-implementation": "^1.0",
"php-http/discovery": "^1.2",
"php-http/httplug": "^1.1",
"php-http/multipart-stream-builder": "^1.0",
"symfony/options-resolver": "^2.6 || ^3.0 || ^4.0"
},
"require-dev": {
"guzzlehttp/psr7": "^1.2",
"php-http/guzzle6-adapter": "^1.0",
"php-http/mock-client": "^1.0",
"phpunit/phpunit": "^5.7.27 || ^6.5"
},
"autoload": {
"psr-4": { "Gitlab\\": "lib/Gitlab/" }
},
"autoload-dev": {
"psr-4": { "Gitlab\\Tests\\": "test/Gitlab/Tests/" }
},
"extra": {
"branch-alias": {
"dev-master": "9.14-dev"
}
}
"name": "jeroeny/gitlab-api",
"type": "library",
"description": "GitLab API client",
"homepage": "https://github.com/jeroeny/gitlab-api",
"keywords": [
"gitlab",
"api"
],
"license": "MIT",
"authors": [
{
"name": "Matt Humphrey",
"homepage": "http://m4tt.io"
},
{
"name": "KnpLabs Team",
"homepage": "http://knplabs.com"
},
{
"name": "Thibault Duplessis",
"email": "[email protected]",
"homepage": "http://ornicar.github.com"
}
],
"require": {
"php": "^7.2",
"ext-json": "*",
"ext-xml": "*",
"php-http/client-common": "^2.0",
"php-http/discovery": "^1.7",
"php-http/httplug": "^2.0",
"php-http/message": "^1.8",
"php-http/multipart-stream-builder": "^1.1",
"symfony/options-resolver": "^4.3"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.5",
"doctrine/coding-standard": "^6.0",
"guzzlehttp/psr7": "^1.6",
"moxio/php-codesniffer-sniffs": "^2.3",
"php-http/guzzle6-adapter": "^2.0",
"php-http/mock-client": "^1.3",
"phpstan/phpstan": "^0.11",
"phpunit/phpunit": "^8.4",
"slevomat/coding-standard": "^5.0",
"squizlabs/php_codesniffer": "^3.5",
"zendframework/zend-diactoros": "^2.1"
},
"autoload": {
"psr-4": {
"Gitlab\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Gitlab\\Tests\\": "tests/unit"
}
},
"config": {
"sort-packages": true
}
}
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: "3"
services:
php:
build: etc/docker/dev/php
build: .
volumes:
- .:/app
working_dir: /app
command: tail -f /dev/null
command: tail -f /dev/null
11 changes: 0 additions & 11 deletions lib/Gitlab/Api/ApiInterface.php

This file was deleted.

Loading

0 comments on commit 030d91f

Please sign in to comment.