Skip to content

Commit

Permalink
NC26 compat (#192)
Browse files Browse the repository at this point in the history
* NC26 compat

* Update CI/CD to use stable26
* Remove support for PHP 7.4
* Add support for PHP 8.2
* Adjust DI parameter naming convention
* New code formatting
* See also https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_26.html

* Move to SonarQube coverage
  • Loading branch information
R0Wi authored Mar 25, 2023
1 parent bc78886 commit cee565e
Show file tree
Hide file tree
Showing 35 changed files with 351 additions and 356 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['8.0', '8.1', '8.2']

name: php${{ matrix.php-versions }}-LINT
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
php-versions: ['8.1']
databases: ['sqlite']
server-versions: ['stable25']
server-versions: ['stable26']

name: php${{ matrix.php-versions }}-${{ matrix.databases }}

Expand Down Expand Up @@ -74,9 +74,9 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['8.0', '8.1', '8.2']
databases: ['mysql']
server-versions: ['stable25']
server-versions: ['stable26']

name: php${{ matrix.php-versions }}-${{ matrix.databases }}

Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
matrix:
php-versions: ['8.1']
databases: ['pgsql']
server-versions: ['stable25']
server-versions: ['stable26']

name: php${{ matrix.php-versions }}-${{ matrix.databases }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
ocp-version: [ 'dev-master' ]
php-version: [ '7.4', '8.0', '8.1' ]
php-version: [ '8.0', '8.1', '8.2' ]

name: Nextcloud ${{ matrix.ocp-version }} PHP${{ matrix.php-version }}
steps:
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/codecov.yml → .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
php-versions: ['8.0']
databases: ['sqlite']
server-versions: ['stable25']
server-versions: ['stable26']

name: php${{ matrix.php-versions }}-${{ matrix.databases }}-COVERAGE

Expand Down Expand Up @@ -84,9 +84,14 @@ jobs:
working-directory: apps/${{ env.APP_NAME }}
run: make coverage-all

- name: Upload coverage to Codecov
- name: Fix code coverage paths
working-directory: ./apps/${{ env.APP_NAME }}/coverage
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${{ secrets.CODECOV_TOKEN }} -Z
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' php-coverage.xml

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
projectBaseDir: ./apps/${{ env.APP_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ port `9003`. Depending on your system a possible configuration could
look like this:

```ini
; /etc/php/7.4/cli/php.ini
; /etc/php/8.0/cli/php.ini
; ...
[Xdebug]
zend_extension=/usr/lib/php/20190902/xdebug.so
Expand All @@ -246,7 +246,7 @@ xdebug.remote_autostart=1
```

```ini
; /etc/php/7.4/apache2/php.ini
; /etc/php/8.0/apache2/php.ini
; ...
[Xdebug]
zend_extension=/usr/lib/php/20190902/xdebug.so
Expand Down Expand Up @@ -301,7 +301,7 @@ services:
networks:
- web_dev
```
`IMAGE` could be set to `IMAGE=thecodingmachine/php:7.4-v4-apache-node14` and the content of `Dockerfile` might
`IMAGE` could be set to `IMAGE=thecodingmachine/php:8.0-v4-apache-node14` and the content of `Dockerfile` might
look like this:

```dockerfile
Expand Down
6 changes: 3 additions & 3 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
The processing is done via workflow-engine and can therefore easily be customized.
Please note that you'll have to install the OcrMyPDF CLI on your Nextcloud server to
process PDF files. More installation instructions can be found in the docs https://github.com/R0Wi/workflow_ocr/blob/master/README.md.</description>
<version>1.25.0</version>
<version>1.26.0</version>
<licence>agpl</licence>
<author mail="[email protected]">Robin Windey</author>
<namespace>WorkflowOcr</namespace>
Expand All @@ -27,7 +27,7 @@
<repository type="git">https://github.com/R0Wi/workflow_ocr.git</repository>
<screenshot>https://github.com/R0Wi/workflow_ocr/blob/eb2d65e9610406bbab22c4c8dda1cea015b5c791/doc/img/usage_1.jpg?raw=true</screenshot>
<dependencies>
<nextcloud min-version="25" max-version="25"/>
<php min-version="7.4" max-version="8.1"/>
<nextcloud min-version="26" max-version="26"/>
<php min-version="8.0" max-version="8.2"/>
</dependencies>
</info>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"optimize-autoloader": true,
"classmap-authoritative": true,
"platform": {
"php": "7.4"
"php": "8.0"
}
},
"scripts": {
Expand Down
Loading

0 comments on commit cee565e

Please sign in to comment.