diff options
33 files changed, 35924 insertions, 35776 deletions
diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 71e45611..01d53573 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -10,8 +10,6 @@ on: env: APP_NAME: social BRANCH: ${{ github.base_ref }} - CYPRESS_baseUrl: http://127.0.0.1:8082/index.php - TESTING: true jobs: init: @@ -19,17 +17,20 @@ jobs: steps: - name: Checkout app - uses: actions/checkout@v2 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + + - name: Install server dependencies + run: composer install - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@v1.1 + uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 id: versions with: - fallbackNode: "^12" - fallbackNpm: "^6" + fallbackNode: "^14" + fallbackNpm: "^7" - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: cache: "npm" node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -37,17 +38,15 @@ jobs: - name: Set up npm ${{ steps.versions.outputs.npmVersion }} run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - - name: Install dependencies & build app + - name: Install node dependencies & build app run: | npm ci - composer install TESTING=true npm run build --if-present - - name: Save context - uses: actions/cache@v3 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: key: cypress-context-${{ github.run_id }} - path: /home/runner/work/social + path: ./ cypress: runs-on: ubuntu-latest @@ -57,32 +56,30 @@ jobs: fail-fast: false matrix: # run multiple copies of the current job in parallel - containers: [1, 2, 3, 4, 5, 6, 7, 8] + containers: ["component", 1, 2] name: runner ${{ matrix.containers }} steps: - name: Restore context - uses: actions/cache@v3 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: + fail-on-cache-miss: true key: cypress-context-${{ github.run_id }} - path: /home/runner/work/social + path: ./ - - name: Setup server - run: | - cd cypress - docker-compose up -d + - name: Set up node ${{ needs.init.outputs.nodeVersion }} + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + with: + cache: "npm" + node-version: ${{ needs.init.outputs.nodeVersion }} - - name: Wait for server - run: npm run wait-on $CYPRESS_baseUrl + - name: Set up npm ${{ needs.init.outputs.npmVersion }} + run: npm i -g npm@"${{ needs.init.outputs.npmVersion }}" - - name: Enable app & configure server - run: | - cd cypress - docker-compose exec --env APP_NAME=${{ env.APP_NAME }} --env BRANCH=${{ env.BRANCH }} -T nextcloud bash /initserver.sh + - name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests - - name: Cypress run - uses: cypress-io/github-action@v4 + uses: cypress-io/github-action@db1693016f23ccf9043f4b2428f9b04e5d502a73 # v5.8.1 with: record: true parallel: true @@ -90,9 +87,21 @@ jobs: ci-build-id: ${{ github.sha }}-${{ github.run_number }} tag: ${{ github.event_name }} env: - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + # Needs to be prefixed with CYPRESS_ + CYPRESS_BRANCH: ${{ env.BRANCH }} # https://github.com/cypress-io/github-action/issues/124 COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} + # Needed for some specific code workarounds + TESTING: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + + - name: Upload snapshots + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + if: always() + with: + name: snapshots_${{ matrix.containers }} + path: cypress/snapshots - name: Extract NC logs if: always() @@ -104,3 +113,15 @@ jobs: with: name: nc_logs_${{ matrix.containers }} path: nextcloud.log + + summary: + runs-on: ubuntu-latest + needs: [init, cypress] + + if: always() + + name: cypress-summary + + steps: + - name: Summary status + run: if ${{ needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi diff --git a/appinfo/info.xml b/appinfo/info.xml index 6f9bd205..ba05010d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> + xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> <id>social</id> <name>Social</name> <summary>🎉 Nextcloud becomes part of the federated social networks!</summary> @@ -22,7 +22,8 @@ <author mail="maxence@artificial-owl.com" homepage="https://artificial-owl.com/">Maxence Lange</author> <author mail="jus@bitgrid.net">Julius Härtl</author> <author mail="jonas@violoncello.ch" homepage="https://violoncello.ch">Jonas Sulzer</author> - <author mail="hey@jancborchardt.net" homepage="https://jancborchardt.net">Jan-Christoph Borchardt</author> + <author mail="hey@jancborchardt.net" homepage="https://jancborchardt.net">Jan-Christoph + Borchardt</author> <author mail="cyrpub@bollu.be">Cyrille Bollu</author> <namespace>Social</namespace> <category>social</category> @@ -34,7 +35,7 @@ <database>pgsql</database> <database>sqlite</database> <database>mysql</database> - <nextcloud min-version="26" max-version="28"/> + <nextcloud min-version="26" max-version="28" /> </dependencies> <background-jobs> @@ -76,4 +77,4 @@ <contactsmenu> <provider>OCA\Social\Providers\ContactsMenuProvider</provider> </contactsmenu> -</info> +</info>
\ No newline at end of file diff --git a/composer.json b/composer.json index 43246ccf..89400867 100644 --- a/composer.json +++ b/composer.json @@ -49,4 +49,4 @@ "url": "https://git.friendi.ca/friendica/php-json-ld" } ] -}
\ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 9e21dd9b..d18f7ff4 100644 --- a/composer.lock +++ b/composer.lock @@ -581,102 +581,30 @@ "time": "2019-12-04T15:06:13+00:00" }, { - "name": "doctrine/annotations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" - }, - "time": "2023-02-02T22:02:53+00:00" - }, - { "name": "doctrine/deprecations", - "version": "v1.0.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -695,9 +623,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" }, - "time": "2022-05-02T15:47:09+00:00" + "time": "2023-06-03T09:27:29+00:00" }, { "name": "doctrine/instantiator", @@ -770,83 +698,6 @@ "time": "2022-12-30T00:23:10+00:00" }, { - "name": "doctrine/lexer", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "84a527db05647743d50373e0ec53a152f2cde568" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", - "reference": "84a527db05647743d50373e0ec53a152f2cde568", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-15T16:57:16+00:00" - }, - { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", "source": { @@ -1009,102 +860,6 @@ "time": "2022-12-24T12:35:10+00:00" }, { - "name": "friendsofphp/php-cs-fixer", - "version": "v3.17.0", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "3f0ed862f22386c55a767461ef5083bddceeed79" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3f0ed862f22386c55a767461ef5083bddceeed79", - "reference": "3f0ed862f22386c55a767461ef5083bddceeed79", - "shasum": "" - }, - "require": { - "composer/semver": "^3.3", - "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^2", - "doctrine/lexer": "^2 || ^3", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^7.4 || ^8.0", - "sebastian/diff": "^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.27", - "symfony/polyfill-php80": "^1.27", - "symfony/polyfill-php81": "^1.27", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" - }, - "require-dev": { - "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^2.0", - "mikey179/vfsstream": "^1.6.11", - "php-coveralls/php-coveralls": "^2.5.3", - "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.16", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.6", - "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.2.3", - "symfony/yaml": "^5.4 || ^6.0" - }, - "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters." - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "keywords": [ - "Static code analysis", - "fixer", - "standards", - "static analysis" - ], - "support": { - "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.17.0" - }, - "funding": [ - { - "url": "https://github.com/keradus", - "type": "github" - } - ], - "time": "2023-05-22T19:59:32+00:00" - }, - { "name": "myclabs/deep-copy", "version": "1.11.1", "source": { @@ -1216,21 +971,21 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "20efa30db5240a5f078e03b04c685735a89dfc9e" + "reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/20efa30db5240a5f078e03b04c685735a89dfc9e", - "reference": "20efa30db5240a5f078e03b04c685735a89dfc9e", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/55def702fb9a37a219511e1d8c6fe8e37164c1fb", + "reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb", "shasum": "" }, "require": { - "friendsofphp/php-cs-fixer": "^3.9", - "php": "^7.3|^8.0" + "php": "^7.3|^8.0", + "php-cs-fixer/shim": "^3.17" }, "type": "library", "autoload": { @@ -1251,9 +1006,9 @@ "description": "Nextcloud coding standards for the php cs fixer", "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.1.0" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.1.1" }, - "time": "2023-04-13T10:52:46+00:00" + "time": "2023-06-01T12:05:01+00:00" }, { "name": "nextcloud/ocp", @@ -1261,12 +1016,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "29a2f9083bf28bac1be72b86ccb0aba7db81bf2c" + "reference": "8088698ae770c2655906850fc57112a316a991b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/29a2f9083bf28bac1be72b86ccb0aba7db81bf2c", - "reference": "29a2f9083bf28bac1be72b86ccb0aba7db81bf2c", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/8088698ae770c2655906850fc57112a316a991b0", + "reference": "8088698ae770c2655906850fc57112a316a991b0", "shasum": "" }, "require": { @@ -1298,20 +1053,20 @@ "issues": "https://github.com/nextcloud-deps/ocp/issues", "source": "https://github.com/nextcloud-deps/ocp/tree/master" }, - "time": "2023-05-22T09:54:33+00:00" + "time": "2023-06-27T00:43:31+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -1352,9 +1107,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "phar-io/manifest", @@ -1468,6 +1223,58 @@ "time": "2022-02-21T01:04:05+00:00" }, { + "name": "php-cs-fixer/shim", + "version": "v3.20.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/shim.git", + "reference": "3253acf5cdb96383bb37ce7052e5dbf49a660f1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/3253acf5cdb96383bb37ce7052e5dbf49a660f1e", + "reference": "3253acf5cdb96383bb37ce7052e5dbf49a660f1e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "replace": { + "friendsofphp/php-cs-fixer": "self.version" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer", + "php-cs-fixer.phar" + ], + "type": "application", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/PHP-CS-Fixer/shim/issues", + "source": "https://gi |