Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enh/stable5/add-indices #3429

Closed
wants to merge 14 commits into from
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: ./.github/actions/setup-composer
with:
php-version: ${{ matrix.php-versions }}
php-tools: composer, php-cs-fixer
php-tools: composer

- name: Run coding standards check
run: composer run cs:check
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,16 @@ jobs:
with:
server-version: ${{ matrix.server-versions }}
php-version: ${{ matrix.php-versions }}
php-tools: phpunit:9
server-path: ${{ env.SERVER_PATH }}
db-engine: sqlite

- name: PHPUnit
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: phpunit -c tests/phpunit.xml
run: composer run phpunit:unit

- name: PHPUnit integration
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: phpunit -c tests/phpunit.integration.xml
run: composer run phpunit:integration

mysql:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -79,17 +78,16 @@ jobs:
with:
server-version: ${{ matrix.server-versions }}
php-version: ${{ matrix.php-versions }}
php-tools: phpunit:9
server-path: ${{ env.SERVER_PATH }}
db-engine: 'mysql'

- name: PHPUnit
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: phpunit -c tests/phpunit.xml
run: composer run phpunit:unit

- name: PHPUnit integration
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: phpunit -c tests/phpunit.integration.xml
run: composer run phpunit:integration

pgsql:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -123,14 +121,13 @@ jobs:
with:
server-version: ${{ matrix.server-versions }}
php-version: ${{ matrix.php-versions }}
php-tools: phpunit:9
server-path: ${{ env.SERVER_PATH }}
db-engine: 'pgsql'

- name: PHPUnit
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: phpunit -c tests/phpunit.xml
run: composer run phpunit:unit

- name: PHPUnit integration
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: phpunit -c tests/phpunit.integration.xml
run: composer run phpunit:integration
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: ./.github/actions/setup-composer
with:
php-version: ${{ matrix.php-versions }}
php-tools: composer, psalm
php-tools: composer

- name: Install Nextcloud API
run: composer require --dev nextcloud/ocp:dev-${{ matrix.ocp-version }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
.psalm.cache
.project/
.idea/
.vscode/
build/
css/*.map
js/*
css/*
nbproject/
node_modules/
tests/.phpunit.result.cache
npm-debug.log
vendor
vendor-bin/**/vendor/
Thumbs.db
yarn-error.log
*.cmd
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.
##
## [5.4.3] - 2024-01-31
### Fixes
- Fixed repair steps

## [5.4.2] - 2023-11-11
### Fixes
- Fixed table definition
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ setup-dev: setup-dev-composer npm-init
# install composer deps for ci (tests and analysis)
setup-build-composer: composer
composer install --no-dev -o
composer dump-autoload -o

# install composer deps for release package
setup-dev-composer: composer
composer install -o
composer dump-autoload -o

# install node deps
npm-init:
Expand Down Expand Up @@ -90,10 +88,6 @@ ifeq (,$(composer))
php $(build_tools_dir)/composer.phar update --prefer-dist
endif

#install additional dev tools
tools: composer
composer global require phpunit/phpunit vimeo/psalm friendsofphp/php-cs-fixer

# Builds the source package for the appstore
# signs, if certificate is present
package: clean
Expand Down
6 changes: 3 additions & 3 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<name>Polls</name>
<summary>A polls app, similar to Doodle/Dudle with the possibility to restrict access.</summary>
<description>A polls app, similar to Doodle/Dudle with the possibility to restrict access (members, certain groups/users, hidden and public).</description>
<version>5.4.2</version>
<version>5.4.3</version>
<licence>agpl</licence>
<author>Vinzenz Rosenkranz</author>
<author>René Gieling</author>
Expand Down Expand Up @@ -60,8 +60,8 @@
<post-migration>
<step>OCA\Polls\Migration\RepairSteps\DropOrphanedTables</step>
<step>OCA\Polls\Migration\RepairSteps\DropOrphanedColumns</step>
<step>OCA\Polls\Migration\RepairSteps\DeleteInvalidRecords</step>
<step>OCA\Polls\Migration\RepairSteps\UpdateHashes</step>
<step>OCA\Polls\Migration\RepairSteps\DeleteInvalidRecords</step>
<step>OCA\Polls\Migration\RepairSteps\CreateIndices</step>
</post-migration>
<install>
Expand All @@ -76,4 +76,4 @@
<order>77</order>
</navigation>
</navigations>
</info>
</info>
4 changes: 2 additions & 2 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'page#index', 'url' => '/not-found', 'verb' => 'GET', 'postfix' => 'notfound'],
['name' => 'page#index', 'url' => '/list/{category}', 'verb' => 'GET', 'postfix' => 'list', 'defaults' => array('category' => 'relevant')],
['name' => 'page#index', 'url' => '/list/{category}', 'verb' => 'GET', 'postfix' => 'list', 'defaults' => ['category' => 'relevant']],
['name' => 'page#index', 'url' => '/combo', 'verb' => 'GET', 'postfix' => 'combo'],
['name' => 'page#vote', 'url' => '/vote/{id}', 'verb' => 'GET'],

Expand Down Expand Up @@ -127,7 +127,7 @@
['name' => 'preferences#get_calendars', 'url' => '/calendars', 'verb' => 'GET'],

// REST-API calls
['name' => 'base_api#preflighted_cors', 'url' => '/api/v1.0/{path}', 'verb' => 'OPTIONS', 'requirements' => array('path' => '.+')],
['name' => 'base_api#preflighted_cors', 'url' => '/api/v1.0/{path}', 'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],
['name' => 'poll_api#list', 'url' => '/api/v1.0/polls', 'verb' => 'GET'],
['name' => 'poll_api#transfer_polls', 'url' => '/api/v1.0/polls/transfer/{sourceUser}/{destinationUser}', 'verb' => 'PUT'],
['name' => 'poll_api#transfer_poll', 'url' => '/api/v1.0/poll/{pollId}/transfer/{destinationUser}', 'verb' => 'PUT'],
Expand Down
25 changes: 20 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
"optimize-autoloader": true,
"autoloader-suffix": "Polls",
"platform": {
"php": "7.4"
}
"php": "8.0"
},
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
},
"autoload": {
"psr-4": {
Expand All @@ -32,20 +35,32 @@
}
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"doctrine/dbal": "^3.6",
"league/factory-muffin": "^3.0",
"league/factory-muffin-faker": "^2.0",
"nextcloud/coding-standard": "^1.0",
"nextcloud/ocp": "dev-stable27",
"doctrine/dbal": "^3.6"
"nextcloud/ocp": "dev-stable27"
},
"scripts": {
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"psalm": "psalm --no-diff",
"phpunit:unit": "phpunit -c tests/phpunit.xml",
"phpunit:integration": "phpunit -c tests/phpunit.xml",
"psalm:fix": "psalm --alter --issues=MissingReturnType,InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
"psalm:info": "psalm --no-diff --show-info=true",
"psalm:baseline": "psalm --set-baseline=psalm-baseline.xml",
"psalm:baseline:update": "psalm --update-baseline"
"psalm:baseline:update": "psalm --update-baseline",
"bin": "echo 'bin not installed'",
"post-install-cmd": [
"@composer bin all install --ansi",
"composer dump-autoload"
],
"post-update-cmd": [
"@composer bin all update --ansi",
"composer dump-autoload"
]
},
"require": {
"league/commonmark": "^2.1",
Expand Down
Loading
Loading