diff --git a/.semver b/.semver deleted file mode 100644 index 32abc21..0000000 --- a/.semver +++ /dev/null @@ -1,6 +0,0 @@ ---- -:major: 0 -:minor: 2 -:patch: 0 -:special: '' -:metadata: '' \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b5fd93f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -dist: xenial -language: php -notifications: {email: false} -php: ['7.2', '7.3'] - -install: composer install --no-interaction -script: composer run-script test -after_success: composer run-script coverage diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 27ae63a..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "command": "robo clean", - "label": "robo : clean", - "problemMatcher": [], - "type": "shell" - }, - { - "command": "robo coverage", - "label": "robo : coverage", - "problemMatcher": [], - "type": "shell" - }, - { - "command": "robo doc", - "label": "robo : doc", - "problemMatcher": [], - "type": "shell" - }, - { - "command": "robo lint", - "label": "robo : lint", - "problemMatcher": [], - "type": "shell" - }, - { - "command": "robo test", - "group": {"isDefault": true, "kind": "build"}, - "label": "robo : test", - "problemMatcher": [], - "type": "shell" - }, - { - "command": "robo upgrade", - "label": "robo : upgrade", - "problemMatcher": [], - "type": "shell" - }, - { - "command": "robo version", - "label": "robo : version", - "problemMatcher": [], - "type": "shell" - }, - { - "command": "robo watch", - "label": "robo : watch", - "problemMatcher": [], - "type": "shell" - } - ] -} diff --git a/AUTHORS.txt b/AUTHORS.txt deleted file mode 100644 index b214165..0000000 --- a/AUTHORS.txt +++ /dev/null @@ -1 +0,0 @@ -Cédric Belin diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 66e0898..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,19 +0,0 @@ -# Changelog - -## Version [0.3.0](https://github.com/sab-international/gitea.php/compare/v0.2.0...v0.3.0) -- Breaking change: removed `__toString()` methods from the model classes. -- Breaking change: using camelcase instead of all caps for constants. -- Modified the package layout. -- Updated the package dependencies. - -## Version [0.2.0](https://github.com/sab-international/gitea.php/compare/v0.1.1...v0.2.0) -- Added `__toString()` methods to the model classes. -- Added the `TrackedTime` model. -- Added a user guide based on [MkDocs](http://www.mkdocs.org). -- Updated the package dependencies. - -## Version [0.1.1](https://github.com/sab-international/gitea.php/compare/v0.1.0...v0.1.1) -- Fixed [issue #1](https://github.com/sab-international/gitea.php/issues/1): the `PushEvent::jsonSerialize()` method returns `"TODO"` strings. - -## Version 0.1.0 -- Initial release. diff --git a/RoboFile.php b/RoboFile.php deleted file mode 100644 index e4adabd..0000000 --- a/RoboFile.php +++ /dev/null @@ -1,101 +0,0 @@ -stopOnFail(); - } - - /** - * Deletes all generated files and reset any saved state. - * @return Result The task result. - */ - function clean(): Result { - return $this->collectionBuilder() - ->addTask($this->taskCleanDir('var')) - ->addTask($this->taskDeleteDir(['build', 'doc/api', 'web'])) - ->run(); - } - - /** - * Uploads the results of the code coverage. - * @return Result The task result. - */ - function coverage(): Result { - return $this->_exec('coveralls var/coverage.xml'); - } - - /** - * Builds the documentation. - * @return Result The task result. - */ - function doc(): Result { - return $this->collectionBuilder() - ->addTask($this->taskFilesystemStack() - ->copy('CHANGELOG.md', 'doc/about/changelog.md') - ->copy('LICENSE.md', 'doc/about/license.md')) - ->addTask($this->taskExec('mkdocs build --config-file=etc/mkdocs.yaml')) - ->addTask($this->taskFilesystemStack() - ->remove(['doc/about/changelog.md', 'doc/about/license.md'])) - ->run(); - } - - /** - * Performs the static analysis of source code. - * @return Result The task result. - */ - function lint(): Result { - return $this->taskExecStack() - ->exec('php -l example/main.php') - ->exec('phpstan analyse --configuration=etc/phpstan.neon') - ->run(); - } - - /** - * Runs the test suites. - * @return Result The task result. - */ - function test(): Result { - return $this->_exec('phpunit --configuration=etc/phpunit.xml'); - } - - /** - * Upgrades the project to the latest revision. - * @return Result The task result. - */ - function upgrade(): Result { - $composer = PHP_OS_FAMILY == 'Windows' ? 'php '.escapeshellarg('C:\Program Files\PHP\share\composer.phar') : 'composer'; - return $this->taskExecStack() - ->exec('git reset --hard') - ->exec('git fetch --all --prune') - ->exec('git pull --rebase') - ->exec("$composer update --no-interaction") - ->run(); - } - - /** - * Increments the version number of the package. - * @param string $component The part in the version number to increment. - * @return Result The task result. - */ - function version(string $component = 'patch'): Result { - return $this->taskSemVer('.semver')->increment($component)->run(); - } - - /** - * Watches for file changes. - * @return Result The task result. - */ - function watch(): Result { - return $this->taskWatch()->monitor('test', function() { $this->test(); })->run(); - } -} diff --git a/doc/about/see_also.md b/doc/about/see_also.md deleted file mode 100644 index a364126..0000000 --- a/doc/about/see_also.md +++ /dev/null @@ -1,15 +0,0 @@ -# See also - -## Development -- [API reference](https://dev.sabcomputer.com/gitea.php/api) -- [Packagist package](https://packagist.org/packages/sab-international/gitea) -- [Submit an issue](https://github.com/sab-international/gitea.php/issues) - -## Testing -- [Continuous integration](https://travis-ci.com/sab-international/gitea.php) -- [Code coverage](https://coveralls.io/github/sab-international/gitea.php/) - -## Other implementations -- Dart: [Gitea for Dart](https://dev.sabcomputer.com/gitea.dart) -- JavaScript: [Gitea for JS](https://dev.sabcomputer.com/gitea.js) -- Yii Framework: [Gitea for Yii](https://dev.sabcomputer.com/yii2-gitea) diff --git a/doc/img/favicon.ico b/doc/img/favicon.ico deleted file mode 100644 index b76b17a..0000000 Binary files a/doc/img/favicon.ico and /dev/null differ diff --git a/doc/img/gitea.png b/doc/img/gitea.png deleted file mode 100644 index 154e5c8..0000000 Binary files a/doc/img/gitea.png and /dev/null differ diff --git a/doc/index.md b/doc/index.md deleted file mode 100644 index da3fbe4..0000000 --- a/doc/index.md +++ /dev/null @@ -1,15 +0,0 @@ -# Gitea for PHP -![Runtime](https://img.shields.io/packagist/php-v/sab-international/gitea.svg) ![Release](https://img.shields.io/packagist/v/sab-international/gitea.svg) ![License](https://img.shields.io/packagist/l/sab-international/gitea.svg) ![Downloads](https://img.shields.io/packagist/dt/sab-international/gitea.svg) ![Coverage](https://coveralls.io/repos/github/sab-international/gitea.php/badge.svg) ![Build](https://travis-ci.com/sab-international/gitea.php.svg) - -[Gitea](https://gitea.io) client library, in [PHP](https://secure.php.net). - -![Gitea](img/gitea.png) - -## Quick start -Install the latest version of **Gitea for PHP** with [Composer](https://getcomposer.org): - -```shell -composer require sab-international/gitea -``` - -For detailed instructions, see the [installation guide](installation.md). diff --git a/doc/installation.md b/doc/installation.md deleted file mode 100644 index c1f6b5b..0000000 --- a/doc/installation.md +++ /dev/null @@ -1,39 +0,0 @@ -# Installation - -## Requirements -Before installing **Gitea for PHP**, you need to make sure you have [PHP](https://secure.php.net) -and [Composer](https://getcomposer.org), the PHP package manager, up and running. - -!!! warning - Gitea for PHP requires PHP >= **7.2.0**. - -You can verify if you're already good to go with the following commands: - -```shell -php --version -# PHP 7.2.10-0ubuntu1 (cli) (built: Sep 13 2018 13:38:55) ( NTS ) - -composer --version -# Composer version 1.7.3 2018-11-01 10:05:06 -``` - -!!! info - If you plan to play with the package sources, you will also need - [Robo](https://robo.li) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material). - -## Installing with Composer package manager - -### 1. Install it -From a command prompt, run: - -```shell -composer require sab-international/gitea -``` - -### 2. Import it -Now in your [PHP](https://secure.php.net) code, you can use: - -```php - - - Gitea for PHP - - - ../var - - - ../doc/api - - -