From af839e9d895a726cf985c68fb7db965521dd7132 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 4 Apr 2022 09:36:59 +0200 Subject: Update master php testing versions Signed-off-by: Joas Schilling --- .github/workflows/phpunit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 00bd3fd..639e919 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -197,7 +197,7 @@ jobs: # do not stop on another job's failure fail-fast: false matrix: - php-versions: ['7.4', '8.0'] + php-versions: ['7.4', '8.0', "8.1"] databases: ['oci'] server-versions: ['master'] -- cgit v1.2.3 From 6076e57275df55b1033f462516f5cfb3281ee333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 4 Apr 2022 14:45:06 +0200 Subject: composer update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- composer.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index cecdf50..353c8e7 100644 --- a/composer.lock +++ b/composer.lock @@ -9,21 +9,21 @@ "packages-dev": [ { "name": "php-parallel-lint/php-parallel-lint", - "version": "v1.2.0", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", - "reference": "474f18bc6cc6aca61ca40bfab55139de614e51ca" + "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/474f18bc6cc6aca61ca40bfab55139de614e51ca", - "reference": "474f18bc6cc6aca61ca40bfab55139de614e51ca", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6483c9832e71973ed29cf71bd6b3f4fde438a9de", + "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de", "shasum": "" }, "require": { "ext-json": "*", - "php": ">=5.4.0" + "php": ">=5.3.0" }, "replace": { "grogy/php-parallel-lint": "*", @@ -31,8 +31,8 @@ }, "require-dev": { "nette/tester": "^1.3 || ^2.0", - "php-parallel-lint/php-console-highlighter": "~0.3", - "squizlabs/php_codesniffer": "~3.0" + "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", + "squizlabs/php_codesniffer": "^3.6" }, "suggest": { "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" @@ -43,7 +43,7 @@ "type": "library", "autoload": { "classmap": [ - "./" + "./src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -60,9 +60,9 @@ "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", "support": { "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", - "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/master" + "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.3.2" }, - "time": "2020-04-04T12:18:32+00:00" + "time": "2022-02-21T12:50:22+00:00" } ], "aliases": [], @@ -72,5 +72,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } -- cgit v1.2.3 From c483424bc1448f6dcfbe8a360cb7e215b337f513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 4 Apr 2022 14:45:51 +0200 Subject: Do not pin phpunit version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 639e919..a3be1b3 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -48,7 +48,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite - tools: phpunit:8.5.13 + tools: phpunit coverage: none - name: Set up Nextcloud @@ -110,7 +110,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql - tools: phpunit:8.5.13 + tools: phpunit coverage: none - name: Set up Nextcloud @@ -174,7 +174,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql - tools: phpunit:8.5.13 + tools: phpunit coverage: none - name: Set up Nextcloud @@ -233,7 +233,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} extensions: mbstring, iconv, fileinfo, intl, oci8 - tools: phpunit:8.5.13 + tools: phpunit coverage: none - name: Set up Nextcloud -- cgit v1.2.3 From de131ed517cc2f6933cc84000ebe0be35d58ebaa Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 4 Apr 2022 15:10:48 +0200 Subject: Replace drone with github action Signed-off-by: Joas Schilling --- .drone.yml | 67 -------------------- .github/workflows/lint-info-xml.yml | 31 ++++++++++ .github/workflows/lint-php.yml | 47 ++++++++++++++ .scrutinizer.yml | 118 ------------------------------------ composer.json | 9 ++- 5 files changed, 84 insertions(+), 188 deletions(-) delete mode 100644 .drone.yml create mode 100644 .github/workflows/lint-info-xml.yml create mode 100644 .github/workflows/lint-php.yml delete mode 100644 .scrutinizer.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 14662fc..0000000 --- a/.drone.yml +++ /dev/null @@ -1,67 +0,0 @@ -kind: pipeline -name: compatibility - -steps: - - name: syntax-php7.4 - image: nextcloudci/php7.4:php7.4-3 - environment: - APP_NAME: data_request - CORE_BRANCH: master - DATABASEHOST: sqlite - commands: - - composer install - - ./vendor/bin/parallel-lint --exclude ./vendor/ . - - name: app-code-check - image: nextcloudci/php7.3:php7.3-5 - environment: - APP_NAME: data_request - CORE_BRANCH: master - DATABASEHOST: sqlite - commands: - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - ./occ app:check-code $APP_NAME - - cd apps/$APP_NAME/ - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - -type: docker - ---- -kind: pipeline -name: unit-sqlite-php7.4 - -steps: - - name: sqlite-php7.4 - image: nextcloudci/php7.4:php7.4-3 - environment: - APP_NAME: data_request - CORE_BRANCH: master - DATABASEHOST: sqlite - commands: - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - ./occ app:enable $APP_NAME - - cd apps/$APP_NAME - - # Run phpunit tests - - cd tests/unit/ - - phpunit --configuration phpunit.xml - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - -type: docker diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml new file mode 100644 index 0000000..cea2a2b --- /dev/null +++ b/.github/workflows/lint-info-xml.yml @@ -0,0 +1,31 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: + pull_request: + push: + branches: + - master + - stable* + +jobs: + xml-linters: + runs-on: ubuntu-latest + + name: info.xml lint + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Download schema + run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd + + - name: Lint info.xml + uses: ChristophWurst/xmllint-action@v1 + with: + xml-file: ./appinfo/info.xml + xml-schema-file: ./info.xsd diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml new file mode 100644 index 0000000..9cfb484 --- /dev/null +++ b/.github/workflows/lint-php.yml @@ -0,0 +1,47 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: + pull_request: + push: + branches: + - master + - stable* + +jobs: + php-lint: + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ["7.4", "8.0", "8.1"] + + name: php-lint + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: none + + - name: Lint + run: composer run lint + + summary: + runs-on: ubuntu-latest + needs: php-lint + + if: always() + + name: php-lint-summary + + steps: + - name: Summary status + run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index d171eab..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,118 +0,0 @@ -filter: - excluded_paths: - - 'tests/*' - - 'doc/*' - - -tools: - sensiolabs_security_checker: true - php_sim: true - php_pdepend: true - php_analyzer: true - -checks: - php: - line_length: - max_length: '100' - verify_access_scope_valid: true - require_scope_for_methods: true - no_underscore_prefix_in_methods: true - missing_arguments: true - method_calls_on_non_object: true - deprecated_code_usage: true - no_eval: true - parameter_doc_comments: true - return_doc_comments: true - fix_doc_comments: true - return_doc_comments: true - parameter_doc_comments: true - more_specific_types_in_doc_comments: true - code_rating: true - duplication: true - variable_existence: true - useless_calls: true - use_statement_alias_conflict: true - unused_variables: true - unused_properties: true - unused_parameters: true - unused_methods: true - unreachable_code: true - sql_injection_vulnerabilities: true - security_vulnerabilities: true - precedence_mistakes: true - precedence_in_conditions: true - parameter_non_unique: true - no_property_on_interface: true - no_non_implemented_abstract_methods: true - deprecated_code_usage: true - closure_use_not_conflicting: true - closure_use_modifiable: true - avoid_useless_overridden_methods: true - avoid_conflicting_incrementers: true - assignment_of_null_return: true - php5_style_constructor: true - one_class_per_file: true - require_php_tag_first: true - uppercase_constants: true - require_braces_around_control_structures: true - psr2_switch_declaration: true - psr2_control_structure_declaration: true - properties_in_camelcaps: true - parameters_in_camelcaps: true - optional_parameters_at_the_end: true - no_underscore_prefix_in_properties: true - no_space_inside_cast_operator: true - no_space_before_semicolon: true - no_short_open_tag: true - no_goto: true - lowercase_php_keywords: true - lowercase_basic_constants: true - function_in_camel_caps: true - classes_in_camel_caps: true - avoid_space_indentation: true - overriding_private_members: true - no_unnecessary_function_call_in_for_loop: true - simplify_boolean_return: true - javascript: - wrap_iife: true - no_process_exit: true - no_process_env: true - no_extra_semi: true - no_extra_bind: true - no_eval: true - no_else_return: true - dot_notation: true - camelcase: true - wrap_regex: true - valid_typeof: true - no_wrap_func: true - no_use_before_define: true - no_unreachable: true - no_undefined: true - no_trailing_spaces: true - no_reserved_keys: true - no_redeclare: true - no_obj_calls: true - no_loop_func: true - no_lonely_if: true - no_lone_blocks: true - no_inner_declarations: true - no_floating_decimal: true - no_extra_boolean_cast: true - no_empty: true - no_dupe_keys: true - -coding_style: - php: - indentation: - general: - use_tabs: true - size: 4 - spaces: - within: - brackets: false - other: - after_type_cast: false - braces: - classes_functions: - class: end-of-line diff --git a/composer.json b/composer.json index 8d00bd3..a294fe9 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,8 @@ { - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2" - } + "scripts": { + "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2" + } } -- cgit v1.2.3 From 7fb5657eec2366b1f4de536d6f50e73c151166b7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 4 Apr 2022 15:13:59 +0200 Subject: Remove unused dependency Signed-off-by: Joas Schilling --- composer.json | 3 --- composer.lock | 76 ----------------------------------------------------------- 2 files changed, 79 deletions(-) delete mode 100644 composer.lock diff --git a/composer.json b/composer.json index a294fe9..82eb3bd 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,5 @@ { "scripts": { "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2" } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 353c8e7..0000000 --- a/composer.lock +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "2501b26c7225377b7c0a5448de70e5d3", - "packages": [], - "packages-dev": [ - { - "name": "php-parallel-lint/php-parallel-lint", - "version": "v1.3.2", - "source": { - "type": "git", - "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6483c9832e71973ed29cf71bd6b3f4fde438a9de", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=5.3.0" - }, - "replace": { - "grogy/php-parallel-lint": "*", - "jakub-onderka/php-parallel-lint": "*" - }, - "require-dev": { - "nette/tester": "^1.3 || ^2.0", - "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", - "squizlabs/php_codesniffer": "^3.6" - }, - "suggest": { - "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" - }, - "bin": [ - "parallel-lint" - ], - "type": "library", - "autoload": { - "classmap": [ - "./src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "ahoj@jakubonderka.cz" - } - ], - "description": "This tool check syntax of PHP files about 20x faster than serial check.", - "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", - "support": { - "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", - "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.3.2" - }, - "time": "2022-02-21T12:50:22+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.1.0" -} -- cgit v1.2.3