From 8cdae3879f3ed227e6d8c1a5ae917d0e301cfef9 Mon Sep 17 00:00:00 2001 From: Pablo Ogando Ferreira Date: Tue, 6 Feb 2024 09:08:48 +0100 Subject: [PATCH] Update DOC, and add github actions --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ .php-cs-fixer.dist.php | 24 ++++++++++++++++++++++++ README.md | 6 +++++- composer.json | 4 ++-- 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .php-cs-fixer.dist.php diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7d2778a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: Code validation + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + php-versions: ['7.2'] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: PHP validator + run: find . -type f -name "*.php" -print0 | xargs -0 -n1 -P8 php -l + + - name: PHPCSFixer + uses: docker://oskarstark/php-cs-fixer-ga:3.1.0 + with: + args: --config=.php-cs-fixer.dist.php --diff --dry-run diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..10640a2 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,24 @@ +in(__DIR__) + ->exclude('var') +; + +$config = new PhpCsFixer\Config(); +return $config->setRules([ + '@Symfony' => true, + '@PhpCsFixer' => true, + 'array_syntax' => ['syntax' => 'short'], + 'is_null' => true, + 'list_syntax' => ['syntax' => 'short'], + 'modernize_types_casting' => true, + 'ternary_to_null_coalescing' => true, + 'combine_nested_dirname' => true, + 'phpdoc_types_order' => [ + 'null_adjustment' => 'always_last', + 'sort_algorithm' => 'none', + ], +]) + ->setFinder($finder) + ->setRiskyAllowed(true) + ; diff --git a/README.md b/README.md index d546e2f..9b2026d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ ExternalAPIBundle ================= +WARNING: We cannot guarantee that this module is compatible with new versions of PuMuKIT. + +This package allow to interact with PuMuKIT through an external API. It is a RESTful API that allows to create and update Multimedia Objects. + API Examples using curl: -##### New mediapackage +##### New media package ``` curl -X POST -f -i --basic -u admin:admin http://localhost:8000/app_dev.php/api/ingest/createMediaPackage ``` diff --git a/composer.json b/composer.json index 440ce86..9a99334 100644 --- a/composer.json +++ b/composer.json @@ -8,12 +8,12 @@ "bundle", "pumukit" ], - "homepage": "https://gitlab.teltek.es/pumukit/PumukitExternalAPIBundle.git", + "homepage": "https://github.com/teltek/PumukitExternalAPIBundle.git", "license": "proprietary", "authors": [ { "name": "Teltek Team", - "homepage": "http://teltek.es" + "homepage": "https://teltek.es" } ], "require": {