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

Upgrade the app to use Symfony 6 and PHP 8.2 #178

Merged
merged 48 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d8588ab
Rearange the ci/qa folder and its contents
MKodde Dec 19, 2023
f8a7240
Remove Homestead from the project
MKodde Dec 19, 2023
45897e6
Remove build folder
MKodde Dec 19, 2023
136ca5c
Remove the code coverage metric from PHPUnit
MKodde Dec 19, 2023
43f1c3a
Require PHP 8.2
MKodde Dec 19, 2023
d3259f9
Move .env vars to openconext/parameters.yaml
MKodde Dec 19, 2023
022e6ae
Move config from SF3 to SF4/5 standard
MKodde Jan 2, 2024
d4463b1
Move assets to ./assets folder
MKodde Jan 2, 2024
c318592
Update Composer dependencies to run SF 6.4
MKodde Jan 2, 2024
dc243bc
Get the application back online
MKodde Jan 8, 2024
df43113
Call the correct method
MKodde Jan 8, 2024
ef2497d
Adhere to PHPStan levels 1..3
MKodde Jan 8, 2024
fa9d269
Adhere to PHPStan levels 4..6
MKodde Jan 8, 2024
0fc32bd
Adhere to PHPStan levels 7..9
MKodde Jan 8, 2024
b29dbfb
Remove http downgrade logic
MKodde Jan 9, 2024
ad3ffe7
Repair post upgrade defects
MKodde Jan 9, 2024
03f96f7
Install and configure incenteev parameters
MKodde Jan 9, 2024
e213e54
Install Yarn dependencies when running integration tests
MKodde Jan 9, 2024
e66a9ad
Repair code after running PHP CS
MKodde Jan 9, 2024
440e70f
Repair (non existing) PHP unit tests
MKodde Jan 10, 2024
a7b56bc
Address PHPMD issues
MKodde Jan 10, 2024
194634b
Add the missing phpstan.neon file
MKodde Jan 10, 2024
b823119
Ignore the /coverage folder
MKodde Jan 10, 2024
4c7c598
Run the acceptance tests on GHA
MKodde Jan 10, 2024
1a5b94a
Simplify the Kernel
MKodde Jan 10, 2024
a0d3c01
Update Yarn dependencies
MKodde Jan 15, 2024
4dca359
Implement strict typing throughout the app
MKodde Jan 15, 2024
04f9684
Move from tslint to eslint
MKodde Jan 15, 2024
4eb2845
Rename App namespace to Surfnet/Tiqr
MKodde Jan 15, 2024
cc17ef9
Exclude behat tests from builds
MKodde Jan 15, 2024
7f7f968
Call the correct validate script
MKodde Jan 18, 2024
e58fb3f
Clean the .gitignore
MKodde Jan 18, 2024
c481212
Clean up the RegistrationCommand
MKodde Jan 18, 2024
60d24b4
Docker: Make the docker image php82 compatible
quartje Jan 22, 2024
e3e752e
GHA tag release workflow: Use php82 branch of the build script
quartje Jan 22, 2024
a7dda1e
Favor Command::SUCCESS over return 0
MKodde Jan 23, 2024
fb18714
Replace Annotation routes for Attribute NS
MKodde Jan 23, 2024
d103ccc
Improve demo SP phpdoc
MKodde Jan 23, 2024
57b6b19
Remove App\Controller references
MKodde Jan 23, 2024
e0cb36d
Remove `use function` import statements
MKodde Jan 23, 2024
3343e0c
Translation error in otp retry attempts message
thijskh Jan 23, 2024
1501b03
Simplify TiqrContext method
MKodde Jan 23, 2024
82d6578
Simplify TiqrContext methods
MKodde Jan 23, 2024
f5f2fab
Rename ip to identityProvider
MKodde Jan 23, 2024
3944dcf
Stop using the `default` twig path prefix
MKodde Feb 7, 2024
2be6e44
Upgrade NPM dependencies
MKodde Feb 7, 2024
ec53a4a
Update Composer packages
MKodde Feb 7, 2024
f15127d
Fix OTP form rendering classes
thijskh Jan 23, 2024
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
2 changes: 1 addition & 1 deletion .docheader
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright %regexp:\d\d\d\d% SURFnet B.V.
* Copyright %regexp:\d{4}% SURFnet %regexp:(B.V.|bv)%
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
21 changes: 0 additions & 21 deletions .env.ci

This file was deleted.

3 changes: 0 additions & 3 deletions .env.dist

This file was deleted.

4 changes: 0 additions & 4 deletions .env.test

This file was deleted.

21 changes: 0 additions & 21 deletions .env.vm

This file was deleted.

295 changes: 295 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config

It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.

We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md

Happy linting! 💖
*/
module.exports = {
"env": {
"browser": true,
"node": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"eslint-plugin-import",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow",
"@typescript-eslint",
"@typescript-eslint/tslint"
],
"root": true,
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Object": {
"message": "Avoid using the `Object` type. Did you mean `object`?"
},
"Function": {
"message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
},
"Boolean": {
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
},
"Number": {
"message": "Avoid using the `Number` type. Did you mean `number`?"
},
"String": {
"message": "Avoid using the `String` type. Did you mean `string`?"
},
"Symbol": {
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
}
}
}
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
}
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
}
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/semi": [
"error",
"always"
],
"@typescript-eslint/triple-slash-reference": [
"error",
{
"path": "always",
"types": "prefer-import",
"lib": "always"
}
],
"@typescript-eslint/typedef": "off",
"@typescript-eslint/unified-signatures": "error",
"complexity": [
"error",
{
"max": 12
}
],
"constructor-super": "error",
"dot-notation": "off",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "error",
"id-denylist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"import/order": [
"off",
{
"alphabetize": {
"caseInsensitive": true,
"order": "asc"
},
"newlines-between": "ignore",
"groups": [
[
"builtin",
"external",
"internal",
"unknown",
"object",
"type"
],
"parent",
[
"sibling",
"index"
]
],
"distinctGroup": false,
"pathGroupsExcludedImportTypes": [],
"pathGroups": [
{
"pattern": "./",
"patternOptions": {
"nocomment": true,
"dot": true
},
"group": "sibling",
"position": "before"
},
{
"pattern": ".",
"patternOptions": {
"nocomment": true,
"dot": true
},
"group": "sibling",
"position": "before"
},
{
"pattern": "..",
"patternOptions": {
"nocomment": true,
"dot": true
},
"group": "parent",
"position": "before"
},
{
"pattern": "../",
"patternOptions": {
"nocomment": true,
"dot": true
},
"group": "parent",
"position": "before"
}
]
}
],
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "error",
"jsdoc/newline-after-description": "error",
"max-classes-per-file": [
"error",
1
],
"max-len": "off",
"new-parens": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": "error",
"no-debugger": "error",
"no-duplicate-imports": "off",
"no-empty": "error",
"no-empty-function": "off",
"no-eval": "error",
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-new-wrappers": "error",
"no-shadow": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-use-before-define": "off",
"no-var": "error",
"object-shorthand": "error",
"one-var": [
"error",
"never"
],
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"allowStandaloneDeclarations": true
}
],
"prefer-const": "error",
"radix": "error",
"semi": "off",
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
],
"use-isnan": "error",
"valid-typeof": "off",
"@typescript-eslint/tslint/config": [
"error",
{
"rules": {
"function-name": [
true,
{
"method-regex": "^[a-z][\\w\\d]+$",
"private-method-regex": "^[a-z][\\w\\d]+$",
"protected-method-regex": "^[a-z][\\w\\d]+$",
"static-method-regex": "^[a-zA-Z_\\d]+$",
"function-regex": "^[a-zA-Z][\\w\\d]+$"
}
]
}
}
]
}
};
2 changes: 1 addition & 1 deletion .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: OpenConext/Stepup-Build
ref: master
ref: feature/php82_build
- name: Output the semver tag to the tag variable
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/test-acceptance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run acceptance tests (Behat)
on: [pull_request]

jobs:
run-qa-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: /var/www/html/
container:
image: ghcr.io/openconext/openconext-basecontainers/php82-apache2-node20-composer2:latest
volumes:
- .:/var/www/html

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Copy certificate material
run: mkdir /config && cp -r ./ci/config/* /config/

- name: Composer install
run: composer install

- name: Yarn & Yarn Encore
run: yarn && yarn encore production

- name: Run Behat tests
run: composer behat
Loading
Loading