From 7f881ef3062f8033abeedb285cbc290c494ae6fc Mon Sep 17 00:00:00 2001 From: dartcafe Date: Sun, 3 Nov 2024 09:23:22 +0100 Subject: [PATCH 1/5] update versions Signed-off-by: dartcafe --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 6 +++--- .github/actions/setup-composer/action.yml | 4 ++-- .github/actions/setup-server/action.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index f22fbcc79..c9991ba63 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -151,11 +151,11 @@ body: description: | Which Nextcloud Server version are you running. options: - - "Nextcloud 25" - - "Nextcloud 26" - "Nextcloud 27" - "Nextcloud 28" - "Nextcloud 29" + - "Nextcloud 30" + - "Nextcloud 31" - "Other/Don't know" validations: required: true @@ -184,7 +184,7 @@ body: attributes: label: Other PHP version description: Add your _other_ PHP versoin - placeholder: i.e. PHP 7.4 + placeholder: i.e. PHP 8.3 - type: dropdown id: server-database diff --git a/.github/actions/setup-composer/action.yml b/.github/actions/setup-composer/action.yml index a8d982b78..39b11a875 100644 --- a/.github/actions/setup-composer/action.yml +++ b/.github/actions/setup-composer/action.yml @@ -3,9 +3,9 @@ name: Setup composer and PHP inputs: php-version: - description: 'PHP version (default: 8.0)' + description: 'PHP version (default: 8.2)' required: false - default: '8.0' + default: '8.2' php-tools: description: 'Additional php tools' required: false diff --git a/.github/actions/setup-server/action.yml b/.github/actions/setup-server/action.yml index c258ba3be..fa1149a47 100644 --- a/.github/actions/setup-server/action.yml +++ b/.github/actions/setup-server/action.yml @@ -12,8 +12,8 @@ inputs: description: 'App to checkout (default: polls)' php-version: required: false - default: '8.0' - description: 'PHP version (default: 8.0)' + default: '8.2' + description: 'PHP version (default: 8.2)' php-tools: description: 'Additional php tools' required: false From e7bbd286af2c536bd6124a97e9ba729b45b8c941 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Sun, 3 Nov 2024 09:30:19 +0100 Subject: [PATCH 2/5] testing composer with -W Signed-off-by: dartcafe --- .github/actions/setup-composer/action.yml | 4 ++-- .github/actions/setup-server/action.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-composer/action.yml b/.github/actions/setup-composer/action.yml index 39b11a875..4b1664f2e 100644 --- a/.github/actions/setup-composer/action.yml +++ b/.github/actions/setup-composer/action.yml @@ -57,11 +57,11 @@ runs: - name: Install dev packages if: steps.cache-composer.outputs.cache-hit != 'true' && inputs.mode == 'dev' working-directory: ${{ inputs.working-directory }} - run: composer i -o + run: composer i -W -o shell: bash - name: Install production packages if: steps.cache-composer.outputs.cache-hit != 'true' && inputs.mode == 'production' working-directory: ${{ inputs.working-directory }} - run: composer i --no-dev -o + run: composer i -W --no-dev -o shell: bash diff --git a/.github/actions/setup-server/action.yml b/.github/actions/setup-server/action.yml index fa1149a47..846823ffb 100644 --- a/.github/actions/setup-server/action.yml +++ b/.github/actions/setup-server/action.yml @@ -85,7 +85,7 @@ runs: - name: Set up components working-directory: ${{ inputs.server-path }}/apps/${{ inputs.app-name }} shell: bash - run: composer i + run: -W - name: Remove Nextcloud API and Doctrine working-directory: ${{ inputs.server-path }}/apps/${{ inputs.app-name }} From 4ee4ecd28060822731ce16faf72cbe6ce8c0e7a4 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Sun, 3 Nov 2024 09:30:47 +0100 Subject: [PATCH 3/5] fix Signed-off-by: dartcafe --- .github/actions/setup-server/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-server/action.yml b/.github/actions/setup-server/action.yml index 846823ffb..8e3414fd3 100644 --- a/.github/actions/setup-server/action.yml +++ b/.github/actions/setup-server/action.yml @@ -85,7 +85,7 @@ runs: - name: Set up components working-directory: ${{ inputs.server-path }}/apps/${{ inputs.app-name }} shell: bash - run: -W + run: composer i -W - name: Remove Nextcloud API and Doctrine working-directory: ${{ inputs.server-path }}/apps/${{ inputs.app-name }} From d35e1bdb5b828ebd9b07a2b0cfc1d6f759a9a975 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Sun, 3 Nov 2024 09:35:03 +0100 Subject: [PATCH 4/5] next try Signed-off-by: dartcafe --- .github/actions/setup-composer/action.yml | 4 ++-- .github/actions/setup-server/action.yml | 2 +- .github/workflows/static-analysis.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-composer/action.yml b/.github/actions/setup-composer/action.yml index 4b1664f2e..39b11a875 100644 --- a/.github/actions/setup-composer/action.yml +++ b/.github/actions/setup-composer/action.yml @@ -57,11 +57,11 @@ runs: - name: Install dev packages if: steps.cache-composer.outputs.cache-hit != 'true' && inputs.mode == 'dev' working-directory: ${{ inputs.working-directory }} - run: composer i -W -o + run: composer i -o shell: bash - name: Install production packages if: steps.cache-composer.outputs.cache-hit != 'true' && inputs.mode == 'production' working-directory: ${{ inputs.working-directory }} - run: composer i -W --no-dev -o + run: composer i --no-dev -o shell: bash diff --git a/.github/actions/setup-server/action.yml b/.github/actions/setup-server/action.yml index 8e3414fd3..fa1149a47 100644 --- a/.github/actions/setup-server/action.yml +++ b/.github/actions/setup-server/action.yml @@ -85,7 +85,7 @@ runs: - name: Set up components working-directory: ${{ inputs.server-path }}/apps/${{ inputs.app-name }} shell: bash - run: composer i -W + run: composer i - name: Remove Nextcloud API and Doctrine working-directory: ${{ inputs.server-path }}/apps/${{ inputs.app-name }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 571c8438f..7650c7ede 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -30,10 +30,10 @@ jobs: php-tools: composer - name: Install Nextcloud API - run: composer require --dev nextcloud/ocp:dev-${{ matrix.ocp-version }} + run: composer require --dev -W nextcloud/ocp:dev-${{ matrix.ocp-version }} - name: Install symfony/console - run: composer require symfony/console + run: composer require -W symfony/console - name: Run coding standards check run: composer run psalm From 884545d0f78dc9e8b88b8ebc39b632ce4f5d3400 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Sun, 3 Nov 2024 09:44:52 +0100 Subject: [PATCH 5/5] another test Signed-off-by: dartcafe [skip ci] --- lib/Db/Comment.php | 6 +++--- lib/Db/EntityWithUser.php | 4 ++-- lib/Db/Log.php | 6 +++--- lib/Db/Option.php | 30 +++++++++++++++--------------- lib/Db/Poll.php | 34 +++++++++++++++++----------------- lib/Db/Preferences.php | 2 +- lib/Db/Share.php | 10 +++++----- lib/Db/Subscription.php | 2 +- lib/Db/Vote.php | 8 ++++---- lib/Db/Watch.php | 4 ++-- 10 files changed, 53 insertions(+), 53 deletions(-) diff --git a/lib/Db/Comment.php b/lib/Db/Comment.php index 2f6a8b9ab..e05230a08 100644 --- a/lib/Db/Comment.php +++ b/lib/Db/Comment.php @@ -42,9 +42,9 @@ class Comment extends EntityWithUser implements JsonSerializable { protected int $parent = 0; public function __construct() { - $this->addType('pollId', 'int'); - $this->addType('timestamp', 'int'); - $this->addType('deleted', 'int'); + $this->addType('pollId', 'integer'); + $this->addType('timestamp', 'integer'); + $this->addType('deleted', 'integer'); } /** diff --git a/lib/Db/EntityWithUser.php b/lib/Db/EntityWithUser.php index 7c5d7c3a7..54eef5311 100644 --- a/lib/Db/EntityWithUser.php +++ b/lib/Db/EntityWithUser.php @@ -37,8 +37,8 @@ abstract class EntityWithUser extends Entity { public function __construct() { // joined Attributes - $this->addType('anonymized', 'int'); - $this->addType('poll_expire', 'int'); + $this->addType('anonymized', 'integer'); + $this->addType('poll_expire', 'integer'); } /** * Anonymized the user completely (ANON_FULL) or just strips out personal information diff --git a/lib/Db/Log.php b/lib/Db/Log.php index abac8f05c..1bf6ba398 100644 --- a/lib/Db/Log.php +++ b/lib/Db/Log.php @@ -54,9 +54,9 @@ class Log extends Entity implements JsonSerializable { protected int $processed = 0; public function __construct() { - $this->addType('pollId', 'int'); - $this->addType('created', 'int'); - $this->addType('processed', 'int'); + $this->addType('pollId', 'integer'); + $this->addType('created', 'integer'); + $this->addType('processed', 'integer'); } /** diff --git a/lib/Db/Option.php b/lib/Db/Option.php index 3384f0757..4fe26c0de 100644 --- a/lib/Db/Option.php +++ b/lib/Db/Option.php @@ -81,23 +81,23 @@ class Option extends EntityWithUser implements JsonSerializable { protected int $showResults = 0; public function __construct() { - $this->addType('released', 'int'); - $this->addType('pollId', 'int'); - $this->addType('timestamp', 'int'); - $this->addType('order', 'int'); - $this->addType('confirmed', 'int'); - $this->addType('duration', 'int'); - $this->addType('deleted', 'int'); + $this->addType('released', 'integer'); + $this->addType('pollId', 'integer'); + $this->addType('timestamp', 'integer'); + $this->addType('order', 'integer'); + $this->addType('confirmed', 'integer'); + $this->addType('duration', 'integer'); + $this->addType('deleted', 'integer'); // joined Attributes - $this->addType('optionLimit', 'int'); - $this->addType('voteLimit', 'int'); - $this->addType('userCountYesVotes', 'int'); - $this->addType('countOptionVotes', 'int'); - $this->addType('votesYes', 'int'); - $this->addType('votesNo', 'int'); - $this->addType('votesMaybe', 'int'); - $this->addType('showResults', 'int'); + $this->addType('optionLimit', 'integer'); + $this->addType('voteLimit', 'integer'); + $this->addType('userCountYesVotes', 'integer'); + $this->addType('countOptionVotes', 'integer'); + $this->addType('votesYes', 'integer'); + $this->addType('votesNo', 'integer'); + $this->addType('votesMaybe', 'integer'); + $this->addType('showResults', 'integer'); } /** diff --git a/lib/Db/Poll.php b/lib/Db/Poll.php index 8f7b6926f..f127e4783 100644 --- a/lib/Db/Poll.php +++ b/lib/Db/Poll.php @@ -164,25 +164,25 @@ class Poll extends EntityWithUser implements JsonSerializable { protected int $participantsCount = 0; public function __construct() { - $this->addType('created', 'int'); - $this->addType('expire', 'int'); - $this->addType('deleted', 'int'); - $this->addType('anonymous', 'int'); - $this->addType('allowComment', 'int'); - $this->addType('allowMaybe', 'int'); - $this->addType('proposalsExpire', 'int'); - $this->addType('voteLimit', 'int'); - $this->addType('optionLimit', 'int'); - $this->addType('adminAccess', 'int'); - $this->addType('hideBookedUp', 'int'); - $this->addType('useNo', 'int'); - $this->addType('lastInteraction', 'int'); + $this->addType('created', 'integer'); + $this->addType('expire', 'integer'); + $this->addType('deleted', 'integer'); + $this->addType('anonymous', 'integer'); + $this->addType('allowComment', 'integer'); + $this->addType('allowMaybe', 'integer'); + $this->addType('proposalsExpire', 'integer'); + $this->addType('voteLimit', 'integer'); + $this->addType('optionLimit', 'integer'); + $this->addType('adminAccess', 'integer'); + $this->addType('hideBookedUp', 'integer'); + $this->addType('useNo', 'integer'); + $this->addType('lastInteraction', 'integer'); // joined columns - $this->addType('isCurrentUserLocked', 'int'); - $this->addType('maxDate', 'int'); - $this->addType('minDate', 'int'); - $this->addType('countOptions', 'int'); + $this->addType('isCurrentUserLocked', 'integer'); + $this->addType('maxDate', 'integer'); + $this->addType('minDate', 'integer'); + $this->addType('countOptions', 'integer'); // subqueried columns $this->addType('currentUserVotes', 'int'); diff --git a/lib/Db/Preferences.php b/lib/Db/Preferences.php index b4053010e..30722be2d 100644 --- a/lib/Db/Preferences.php +++ b/lib/Db/Preferences.php @@ -45,7 +45,7 @@ class Preferences extends Entity implements JsonSerializable { protected ?string $preferences = ''; public function __construct() { - $this->addType('timestamp', 'int'); + $this->addType('timestamp', 'integer'); // initialize with default values $this->setPreferences(json_encode(self::DEFAULT)); diff --git a/lib/Db/Share.php b/lib/Db/Share.php index 196f1eed0..ce9c6e40e 100644 --- a/lib/Db/Share.php +++ b/lib/Db/Share.php @@ -126,11 +126,11 @@ class Share extends EntityWithUser implements JsonSerializable { protected int $voted = 0; public function __construct() { - $this->addType('pollId', 'int'); - $this->addType('invitationSent', 'int'); - $this->addType('locked', 'int'); - $this->addType('reminderSent', 'int'); - $this->addType('deleted', 'int'); + $this->addType('pollId', 'integer'); + $this->addType('invitationSent', 'integer'); + $this->addType('locked', 'integer'); + $this->addType('reminderSent', 'integer'); + $this->addType('deleted', 'integer'); $this->urlGenerator = Server::get(IURLGenerator::class); } diff --git a/lib/Db/Subscription.php b/lib/Db/Subscription.php index 644edd605..f3e093064 100644 --- a/lib/Db/Subscription.php +++ b/lib/Db/Subscription.php @@ -33,7 +33,7 @@ class Subscription extends Entity implements JsonSerializable { public function __construct() { - $this->addType('pollId', 'int'); + $this->addType('pollId', 'integer'); } /** diff --git a/lib/Db/Vote.php b/lib/Db/Vote.php index da9080501..f0ea1a8dc 100644 --- a/lib/Db/Vote.php +++ b/lib/Db/Vote.php @@ -52,10 +52,10 @@ class Vote extends EntityWithUser implements JsonSerializable { protected ?int $optionId = null; public function __construct() { - $this->addType('id', 'int'); - $this->addType('pollId', 'int'); - $this->addType('voteOptionId', 'int'); - $this->addType('deleted', 'int'); + $this->addType('id', 'integer'); + $this->addType('pollId', 'integer'); + $this->addType('voteOptionId', 'integer'); + $this->addType('deleted', 'integer'); } /** diff --git a/lib/Db/Watch.php b/lib/Db/Watch.php index 18791d06d..3a02f1deb 100644 --- a/lib/Db/Watch.php +++ b/lib/Db/Watch.php @@ -41,8 +41,8 @@ class Watch extends Entity implements JsonSerializable { protected string $sessionId = ''; public function __construct() { - $this->addType('pollId', 'int'); - $this->addType('updated', 'int'); + $this->addType('pollId', 'integer'); + $this->addType('updated', 'integer'); } /**