Skip to content

Commit 610d1eb

Browse files
authored
Merge pull request #340 from itk-dev/feature/update-drupal-and-php
Feature/update drupal and php
2 parents 4db41fc + f9e5de0 commit 610d1eb

File tree

111 files changed

+2715
-2657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+2715
-2657
lines changed

.gitattributes

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@
1919
*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
2020
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
2121
*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
22-
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
22+
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
2323
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
24-
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
25-
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
24+
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
25+
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
2626
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
2727
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
2828
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
2929
*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
3030
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
31-
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
32-
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
31+
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
32+
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
3333
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
34-
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
34+
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
3535
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
36-
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
36+
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
3737
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
3838
*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
39-
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
39+
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
4040
*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
4141
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
4242
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2

.github/workflows/pr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ jobs:
6464
runs-on: ubuntu-latest
6565
strategy:
6666
matrix:
67-
node: [ '14', '15' ]
67+
node: [ '16' ]
6868
steps:
6969
- uses: actions/checkout@v2
7070
- name: Setup node
71-
uses: actions/setup-node@v2
71+
uses: actions/setup-node@v3
7272
with:
7373
node-version: ${{ matrix.node }}
7474
- run: |
@@ -80,7 +80,7 @@ jobs:
8080
runs-on: ubuntu-latest
8181
services:
8282
mariadb:
83-
image: mariadb:10.4
83+
image: mariadb:10.11
8484
ports:
8585
- 3306:3306
8686
env:
@@ -150,7 +150,7 @@ jobs:
150150
runs-on: ubuntu-latest
151151
services:
152152
mariadb:
153-
image: mariadb:10.4
153+
image: mariadb:10.11
154154
ports:
155155
- 3306:3306
156156
env:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,6 @@ private-files/
197197
.vscode
198198
node_modules/
199199
yarn-error.log
200+
201+
# Ignore DS store
202+
.DS_Store

.php-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.4
1+
8.1

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ Versioning](https://semver.org/spec/v2.0.0.html).
99
## [Unreleased]
1010

1111
- [PR-341](https://github.com/itk-dev/os2loop/pull/341): Notify of collection changed when document is changed.
12+
13+
## [feature/update-drupal-and-php]
14+
- Upgrade drupal core (9.5.10)
15+
- Upgrade contrib module
16+
- Change code analysis tool (drupal-check -> phpstan for more configuration options)
17+
- Update custom modules with phpcs and phpstan tools.
18+
- Update configuration to match drupal upgrade.
19+
- Upgrade docker setup to use php 8.1
20+
21+
## [develop]
1222
- [LOOP-862](https://jira.itkdev.dk/browse/LOOP-862): Added documentation for modules and hooks.
1323
- [LOOP-947](https://jira.itkdev.dk/browse/LOOP-947): Styling user profile page
1424
- [LOOP-948](https://jira.itkdev.dk/browse/LOOP-948): Fix position of user dropdown menu, that extends outside the viewport on narrow screens.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Github](https://img.shields.io/badge/source-os2loop/os2loop-blue?style=flat-square)](https://github.com/os2loop/os2loop)
44
[![Release](https://img.shields.io/github/v/release/os2loop/os2loop?sort=semver&style=flat-square)](https://github.com/os2loop/os2loop/releases)
5-
[![PHP Version](https://img.shields.io/badge/PHP-%5E7.4-9cf)](https://www.php.net/downloads)
5+
[![PHP Version](https://img.shields.io/badge/PHP-%5E8.1-9cf)](https://www.php.net/downloads)
66
[![Build Status](https://img.shields.io/github/workflow/status/itk-dev/os2loop/PR%20Review?&logo=github&style=flat-square)](https://github.com/os2loop/os2loop/actions?query=workflow%3A%22Test+%26+Code+Style+Review%22)
77
[![Read License](https://img.shields.io/github/license/os2loop/os2loop)](https://github.com/os2loop/os2loop/blob/master/LICENSE.txt)
88
[![Github downloads](https://img.shields.io/github/downloads/os2loop/os2loop/total?style=flat-square&colorB=darkmagenta)](https://packagist.org/packages/os2loop/os2loop/stats)
@@ -137,9 +137,9 @@ composer coding-standards-apply
137137
```
138138

139139
```sh
140-
docker run --volume ${PWD}:/app --workdir /app node:16.13.2 yarn install
141-
docker run --volume ${PWD}:/app --workdir /app node:16.13.2 yarn coding-standards-check
142-
docker run --volume ${PWD}:/app --workdir /app node:16.13.2 yarn coding-standards-apply
140+
docker run --rm --volume ${PWD}:/app --workdir /app node:16 yarn install
141+
docker run --rm --volume ${PWD}:/app --workdir /app node:16 yarn coding-standards-check
142+
docker run --rm --volume ${PWD}:/app --workdir /app node:16 yarn coding-standards-apply
143143
```
144144

145145
### GitHub Actions
@@ -175,6 +175,6 @@ composer coding-standards-check
175175
## Build assets
176176

177177
```sh
178-
docker run --volume ${PWD}:/app --workdir /app node:16.13.2 yarn install
179-
docker run --volume ${PWD}:/app --workdir /app node:16.13.2 yarn encore dev
178+
docker run --rm --volume ${PWD}:/app --workdir /app node:16 yarn install
179+
docker run --rm --volume ${PWD}:/app --workdir /app node:16 yarn encore dev
180180
```

composer.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
}
3838
},
3939
"require": {
40+
"php": "^8.1",
4041
"composer/installers": "^1.9",
4142
"cweagans/composer-patches": "^1.7",
4243
"drupal/adminimal_theme": "^1.6",
@@ -97,8 +98,11 @@
9798
"install-codestandards": [
9899
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
99100
],
100-
"coding-standards-check/drupal-check": [
101-
"php vendor/bin/drupal-check --deprecations --analysis web/profiles/custom/os2loop"
101+
"code-analysis/phpstan": [
102+
"phpstan analyse --configuration=phpstan.neon --memory-limit=2G"
103+
],
104+
"code-analysis": [
105+
"@code-analysis/phpstan"
102106
],
103107
"coding-standards-check/phpcs": [
104108
"php vendor/bin/phpcs --standard=phpcs.xml.dist"
@@ -108,7 +112,6 @@
108112
],
109113
"coding-standards-check": [
110114
"@coding-standards-check/phpcs",
111-
"@coding-standards-check/drupal-check",
112115
"@coding-standards-check/twigcs"
113116
],
114117
"coding-standards-apply/phpcs": [
@@ -132,7 +135,8 @@
132135
"dealerdirect/phpcodesniffer-composer-installer": true,
133136
"drupal/console-extend-plugin": true,
134137
"drupal/core-composer-scaffold": true,
135-
"drupal/core-project-message": true
138+
"drupal/core-project-message": true,
139+
"phpstan/extension-installer": true
136140
}
137141
},
138142
"extra": {
@@ -200,9 +204,9 @@
200204
"enable-patching": true,
201205
"patches": {
202206
"drupal/core": {
203-
"Disable forced configuration langcode (https://www.drupal.org/project/drupal/issues/3150540)": "https://www.drupal.org/files/issues/2020-06-10/locale-config-langcodes.patch",
207+
"Disable forced configuration langcode (https://www.drupal.org/project/drupal/issues/3150540)": "https://www.drupal.org/files/issues/2023-05-24/3150540-36.patch",
204208
"Handle undefined index when using form states (https://www.drupal.org/project/drupal/issues/2700667)": "https://www.drupal.org/files/issues/2020-03-11/2700667-104.patch",
205-
"Multiple usages of FieldPluginBase::getEntity do not check for NULL, leading to WSOD (https://www.drupal.org/project/drupal/issues/3007424)": "https://www.drupal.org/files/issues/2021-01-06/3007424-108.patch"
209+
"Multiple usages of FieldPluginBase::getEntity do not check for NULL, leading to WSOD (https://www.drupal.org/project/drupal/issues/3007424)": "https://www.drupal.org/files/issues/2023-05-23/3007424-207-9.5.x.patch"
206210
},
207211
"drupal/flag": {
208212
"Implement Migration Paths for Flag 7.x (https://www.drupal.org/project/flag/issues/2409901#comment-13082245)": "https://www.drupal.org/files/issues/2019-04-25/2409901_flag_migration_paths_52.patch",
@@ -235,7 +239,9 @@
235239
"drupal/devel": "^4.1",
236240
"friendsoftwig/twigcs": "^5.0",
237241
"kint-php/kint": "^4.1",
238-
"mglaman/drupal-check": "^1.1",
242+
"mglaman/phpstan-drupal": "^1.1",
243+
"phpstan/extension-installer": "^1.2",
244+
"phpstan/phpstan-deprecation-rules": "^1.1",
239245
"os2loop/os2loop_fixtures": "*",
240246
"phpspec/prophecy-phpunit": "^2.0"
241247
}

0 commit comments

Comments
 (0)