Skip to content

Commit

Permalink
Merge pull request #839 from nextcloud/prepare-release-3.10
Browse files Browse the repository at this point in the history
Prepare release 3.10
  • Loading branch information
nickvergessen authored Jul 25, 2024
2 parents 3b39b8c + a772165 commit ae56fe1
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/appstore-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

Expand All @@ -72,7 +72,7 @@ jobs:
filename: ${{ env.APP_NAME }}/appinfo/info.xml

- name: Set up php ${{ steps.php-versions.outputs.php-min }}
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: ${{ steps.php-versions.outputs.php-min }}
coverage: none
Expand All @@ -95,7 +95,7 @@ jobs:
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
env:
NODE_ENV: production
CYPRESS_INSTALL_BINARY: 0
run: |
cd ${{ env.APP_NAME }}
npm ci
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/dependabot-approve-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
pull-requests: write

steps:
- name: Disabled on forks
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo 'Can not approve PRs from forks'
exit 1
# GitHub actions bot approve
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1

- name: Set up php${{ steps.versions.outputs.php-available }}
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: ${{ steps.versions.outputs.php-available }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-stylelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ jobs:
(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
days-before-feedback: 14
start-date: '2024-04-30'
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot'
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
exempt-bots: true
2 changes: 1 addition & 1 deletion .github/workflows/psalm-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-nextcloud-ocp-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
submodules: true

- name: Set up php8.2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: 8.2
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

## 3.10.0 – 2024-07-25
### Changed
- Compatibility with Nextcloud 30
- Require Nextcloud 27

## 3.9.0 – 2024-03-08
### Added
- Compatibility with Nextcloud 29
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<database>sqlite</database>
<database>mysql</database>
<database>pgsql</database>
<nextcloud min-version="28" max-version="29" />
<nextcloud min-version="28" max-version="30" />
</dependencies>

<background-jobs>
Expand Down
20 changes: 5 additions & 15 deletions lib/Controller/APIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
use OCA\TwoFactorNextcloudNotification\Service\TokenManager;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\IRequest;
Expand All @@ -42,11 +44,7 @@ public function __construct(
parent::__construct($appName, $request);
}

/**
* @NoAdminRequired
* @param int $attemptId
* @return DataResponse
*/
#[NoAdminRequired]
public function approve(int $attemptId): DataResponse {
try {
$token = $this->tokenManager->getById($attemptId);
Expand All @@ -66,11 +64,7 @@ public function approve(int $attemptId): DataResponse {
return new DataResponse([], Http::STATUS_ACCEPTED);
}

/**
* @NoAdminRequired
* @param int $attemptId
* @return DataResponse
*/
#[NoAdminRequired]
public function disapprove(int $attemptId): DataResponse {
try {
$token = $this->tokenManager->getById($attemptId);
Expand All @@ -90,11 +84,7 @@ public function disapprove(int $attemptId): DataResponse {
return new DataResponse([], Http::STATUS_OK);
}

/**
* @PublicPage
* @param string $token
* @return DataResponse
*/
#[PublicPage]
public function poll(string $token): DataResponse {
try {
$token = $this->tokenManager->getByToken($token);
Expand Down
5 changes: 2 additions & 3 deletions lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

use OCA\TwoFactorNextcloudNotification\Service\StateManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\IUserSession;
Expand All @@ -41,9 +42,7 @@ public function __construct(
parent::__construct($appName, $request);
}

/**
* @NoAdminRequired
*/
#[NoAdminRequired]
public function setState(bool $state): JSONResponse {
$this->stateManager->setState($this->userSession->getUser(), $state);
return new JSONResponse([
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version0001Date20180411172140.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

namespace OCA\TwoFactorNextcloudNotification\Migration;

use Doctrine\DBAL\Types\Types;
use OCA\TwoFactorNextcloudNotification\AppInfo\Application;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

Expand Down
4 changes: 2 additions & 2 deletions lib/Provider/NotificationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ public function getPersonalSettings(IUser $user): IPersonalProviderSettings {
return new Personal($this->initialStateService, $this->stateManager->getState($user));
}

public function enableFor(IUser $user) {
public function enableFor(IUser $user): void {
$this->stateManager->setState($user, true);
}

public function disableFor(IUser $user) {
public function disableFor(IUser $user): void {
$this->stateManager->setState($user, false);
}
}
7 changes: 1 addition & 6 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="tests/psalm-baseline.xml"
phpVersion="8.0.2"
>
<projectFiles>
<directory name="lib" />
Expand All @@ -21,12 +22,6 @@
</ignoreFiles>
</extraFiles>
<issueHandlers>
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="OC" />
<referencedClass name="Doctrine\DBAL\Types\Types" />
</errorLevel>
</UndefinedClass>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<referencedClass name="Doctrine\DBAL\Schema\Schema" />
Expand Down

0 comments on commit ae56fe1

Please sign in to comment.