Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- **🙋 Get involved!** We have lots of stuff planned like more question types, collaboration on forms, [and much more](https://github.com/nextcloud/forms/milestones)!
]]></description>

<version>5.3.0</version>
<version>5.4.0-dev</version>
<licence>AGPL-3.0-or-later</licence>

<author>Affan Hussain</author>
Expand Down Expand Up @@ -61,7 +61,7 @@
<screenshot>https://raw.githubusercontent.com/nextcloud/forms/main/screenshots/forms3.png</screenshot>

<dependencies>
<nextcloud min-version="32" max-version="34" />
<nextcloud min-version="33" max-version="35" />
</dependencies>

<background-jobs>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"classmap-authoritative": true,
"sort-packages": true,
"platform": {
"php": "8.1"
"php": "8.2"
},
"allow-plugins": {
"bamarni/composer-bin-plugin": true
Expand Down
20 changes: 10 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/Migration/Version020002Date20200729205932.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt

if ($schema->hasTable('forms_v2_forms')) {
$schema->getTable('forms_v2_forms')
->changeColumn('description', [
->modifyColumn('description', [
'length' => 8192,
]);
}

if ($schema->hasTable('forms_v2_answers')) {
$schema->getTable('forms_v2_answers')
->changeColumn('text', [
->modifyColumn('text', [
'length' => 4096,
]);
}
Expand Down
6 changes: 4 additions & 2 deletions lib/Service/SubmissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use OCA\Forms\ResponseDefinitions;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\OCS\OCSException;
use OCP\Config\IUserConfig;
use OCP\Files\File;
use OCP\Files\IRootFolder;
use OCP\Files\NotPermittedException;
Expand Down Expand Up @@ -63,6 +64,7 @@ public function __construct(
private readonly IUrlGenerator $urlGenerator,
private readonly OptionMapper $optionMapper,
private readonly IEmailValidator $emailValidator,
private readonly IUserConfig $userConfig,
) {
$this->currentUser = $userSession->getUser();
}
Expand Down Expand Up @@ -232,9 +234,9 @@ public function getSubmissionsData(Form $form, string $fileFormat, ?File $file =
$defaultTimeZone = $this->config->getSystemValueString('default_timezone', 'UTC');

if (!$this->currentUser) {
$userTimezone = $this->config->getUserValue($form->getOwnerId(), 'core', 'timezone', $defaultTimeZone);
$userTimezone = $this->userConfig->getValueString($form->getOwnerId(), 'core', 'timezone', $defaultTimeZone);
} else {
$userTimezone = $this->config->getUserValue($this->currentUser->getUID(), 'core', 'timezone', $defaultTimeZone);
$userTimezone = $this->userConfig->getValueString($this->currentUser->getUID(), 'core', 'timezone', $defaultTimeZone);
}

// Process initial header
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor-bin/psalm/vendor/vimeo/psalm/config.xsd"
errorBaseline="tests/psalm-baseline.xml"
phpVersion="8.1"
phpVersion="8.2"
>
<projectFiles>
<directory name="lib" />
Expand Down
8 changes: 2 additions & 6 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use Nextcloud\Rector\Set\NextcloudSets;
use Rector\Config\RectorConfig;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;

return RectorConfig::configure()
->withPaths([
Expand All @@ -18,13 +17,10 @@
__DIR__ . '/tests',
])
// uncomment to reach your current PHP version
->withPhpSets(php81: true)
->withPhpSets(php82: true)
->withTypeCoverageLevel(0)
->withDeadCodeLevel(0)
->withCodeQualityLevel(0)
->withSets([
NextcloudSets::NEXTCLOUD_32,
])
->withSkip([
NullToStrictStringFuncCallArgRector::class,
NextcloudSets::NEXTCLOUD_33,
]);
8 changes: 6 additions & 2 deletions tests/Unit/Service/SubmissionServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use OCA\Forms\Service\FormsService;
use OCA\Forms\Service\SubmissionService;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\Config\IUserConfig;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
Expand Down Expand Up @@ -59,6 +60,7 @@ class SubmissionServiceTest extends TestCase {
private IURLGenerator|MockObject $urlGenerator;
private UploadedFileMapper|MockObject $uploadedFileMapper;
private OptionMapper|MockObject $optionMapper;
private IUserConfig|MockObject $userConfig;

public function setUp(): void {
parent::setUp();
Expand All @@ -74,6 +76,7 @@ public function setUp(): void {
$this->userManager = $this->createMock(IUserManager::class);
$userSession = $this->createMock(IUserSession::class);
$this->tempManager = $this->createMock(ITempManager::class);
$this->userConfig = $this->createMock(IUserConfig::class);

$user = $this->createMock(IUser::class);
$user->expects($this->any())
Expand Down Expand Up @@ -109,6 +112,7 @@ public function setUp(): void {
$this->urlGenerator,
$this->optionMapper,
$this->emailValidator,
$this->userConfig,
);
}

Expand Down Expand Up @@ -750,8 +754,8 @@ private function setUpCsvTest(array $questions, array $submissions, string $csvT
->with('default_timezone', 'UTC')
->willReturn('Europe/Berlin');

$this->config->expects($this->once())
->method('getUserValue')
$this->userConfig->expects($this->once())
->method('getValueString')
->with('currentUser', 'core', 'timezone', 'Europe/Berlin')
->willReturn('Europe/Berlin');

Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/cs-fixer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "8.1"
"php": "8.2"
}
},
"require": {
Expand Down
16 changes: 8 additions & 8 deletions vendor-bin/cs-fixer/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor-bin/openapi-extractor/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"config": {
"platform": {
"php": "8.1"
"php": "8.2"
}
},
"require-dev": {
Expand Down
29 changes: 14 additions & 15 deletions vendor-bin/openapi-extractor/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor-bin/phpunit/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "8.1"
"php": "8.2"
}
},
"require-dev": {
Expand Down
Loading
Loading