From cb942cb1f64cfd6255522b11b3985bd1835f70bf Mon Sep 17 00:00:00 2001 From: Campii <dominik.chrzanowski183@gmail.com> Date: Wed, 28 Sep 2022 12:40:07 +0200 Subject: [PATCH 01/15] refactor: Code refactor [Interviewee] quiqqer/ckeditor4#31 --- src/QUI/Interview/Controls/IntervieweeData.LargeImageLeft.html | 2 +- src/QUI/Interview/Controls/IntervieweeData.LargeImageTop.html | 2 +- src/QUI/Interview/Controls/IntervieweeData.SmallImageLeft.html | 2 +- src/QUI/Interview/Controls/IntervieweeData.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/QUI/Interview/Controls/IntervieweeData.LargeImageLeft.html b/src/QUI/Interview/Controls/IntervieweeData.LargeImageLeft.html index 56bb750..040676b 100644 --- a/src/QUI/Interview/Controls/IntervieweeData.LargeImageLeft.html +++ b/src/QUI/Interview/Controls/IntervieweeData.LargeImageLeft.html @@ -11,6 +11,6 @@ </div> {if $description} - <div class="quiqqer-interview-control-interviewee-content-short">{$description}</div> + <div class="quiqqer-interview-control-interviewee-content-short default-content">{$description}</div> {/if} </div> \ No newline at end of file diff --git a/src/QUI/Interview/Controls/IntervieweeData.LargeImageTop.html b/src/QUI/Interview/Controls/IntervieweeData.LargeImageTop.html index acd960c..c687609 100644 --- a/src/QUI/Interview/Controls/IntervieweeData.LargeImageTop.html +++ b/src/QUI/Interview/Controls/IntervieweeData.LargeImageTop.html @@ -9,6 +9,6 @@ </header> {if $description} - <div class="quiqqer-interview-control-interviewee-short">{$description}</div> + <div class="quiqqer-interview-control-interviewee-short default-content">{$description}</div> {/if} </div> \ No newline at end of file diff --git a/src/QUI/Interview/Controls/IntervieweeData.SmallImageLeft.html b/src/QUI/Interview/Controls/IntervieweeData.SmallImageLeft.html index 6a23210..2d07913 100644 --- a/src/QUI/Interview/Controls/IntervieweeData.SmallImageLeft.html +++ b/src/QUI/Interview/Controls/IntervieweeData.SmallImageLeft.html @@ -12,7 +12,7 @@ <div class="quiqqer-interview-control-interviewee-content"> {if $description} - <div class="quiqqer-interview-control-interviewee-content-short">{$description}</div> + <div class="quiqqer-interview-control-interviewee-content-short default-content">{$description}</div> {/if} </div> </div> \ No newline at end of file diff --git a/src/QUI/Interview/Controls/IntervieweeData.html b/src/QUI/Interview/Controls/IntervieweeData.html index 45e0bfc..96b122e 100644 --- a/src/QUI/Interview/Controls/IntervieweeData.html +++ b/src/QUI/Interview/Controls/IntervieweeData.html @@ -5,7 +5,7 @@ {/if} {if $this->getAttribute('content') != ""} - <div class="control-body"> + <div class="control-body default-content"> {$this->getAttribute('content')} </div> {/if} -- GitLab From 7359e98a6a506d7a1c7e631c5a56e9fba467a041 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Fri, 24 May 2024 16:44:39 +0200 Subject: [PATCH 02/15] chore: add .gitattributes file --- .gitattributes | 15 +++++++++++++++ .gitignore | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9ab59b1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,15 @@ + +# Ignore developer files when exporting +.gitattributes export-ignore +.gitignore export-ignore +.gitlab-ci.yml export-ignore +.phive export-ignore +captainhook.json export-ignore +phpcs.xml.dist export-ignore +phpstan-baseline.neon export-ignore +phpstan.dist.neon export-ignore +phpunit.dist.xml export-ignore +tests export-ignore + +# Explicitly set file type and line endings for PHP files, improves git diff output +*.php text eol=lf diff=php \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a8c0d1b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +tools/ -- GitLab From 122e10c2ad28ef6fe723044b53c272298a227152 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Fri, 24 May 2024 16:44:39 +0200 Subject: [PATCH 03/15] chore: setup PHPStan for project tooling --- .gitignore | 2 ++ .phive/phars.xml | 4 ++++ phpstan-baseline.neon | 0 phpstan.dist.neon | 8 ++++++++ tests/phpstan-bootstrap.php | 13 +++++++++++++ 5 files changed, 27 insertions(+) create mode 100644 .phive/phars.xml create mode 100644 phpstan-baseline.neon create mode 100644 phpstan.dist.neon create mode 100644 tests/phpstan-bootstrap.php diff --git a/.gitignore b/.gitignore index a8c0d1b..0920b95 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ tools/ + +phpstan.neon diff --git a/.phive/phars.xml b/.phive/phars.xml new file mode 100644 index 0000000..f909b52 --- /dev/null +++ b/.phive/phars.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phive xmlns="https://phar.io/phive"> + <phar name="phpstan" version="1.11.1" installed="1.11.1" location="./tools/phpstan" copy="false"/> +</phive> diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..e69de29 diff --git a/phpstan.dist.neon b/phpstan.dist.neon new file mode 100644 index 0000000..15e9210 --- /dev/null +++ b/phpstan.dist.neon @@ -0,0 +1,8 @@ +includes: + - phpstan-baseline.neon + +parameters: + level: 8 + paths: + - src + tipsOfTheDay: false diff --git a/tests/phpstan-bootstrap.php b/tests/phpstan-bootstrap.php new file mode 100644 index 0000000..b61ff4b --- /dev/null +++ b/tests/phpstan-bootstrap.php @@ -0,0 +1,13 @@ +<?php + +if (!defined('QUIQQER_SYSTEM')) { + define('QUIQQER_SYSTEM', true); +} + +if (!defined('QUIQQER_AJAX')) { + define('QUIQQER_AJAX', true); +} + +putenv("QUIQQER_OTHER_AUTOLOADERS=KEEP"); + +require_once __DIR__ . '/../../../../bootstrap.php'; -- GitLab From c7cd87c921af60243bbad70c3c50cb247ccd45a1 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Fri, 24 May 2024 16:44:40 +0200 Subject: [PATCH 04/15] chore: setup PHPUnit for project tooling --- .gitignore | 4 ++++ .phive/phars.xml | 1 + phpunit.dist.xml | 8 ++++++++ tests/phpunit-bootstrap.php | 11 +++++++++++ 4 files changed, 24 insertions(+) create mode 100644 phpunit.dist.xml create mode 100644 tests/phpunit-bootstrap.php diff --git a/.gitignore b/.gitignore index 0920b95..b9f7c5c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ tools/ phpstan.neon + +.phpunit.result.cache + +phpunit.xml diff --git a/.phive/phars.xml b/.phive/phars.xml index f909b52..6984891 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <phive xmlns="https://phar.io/phive"> <phar name="phpstan" version="1.11.1" installed="1.11.1" location="./tools/phpstan" copy="false"/> + <phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/> </phive> diff --git a/phpunit.dist.xml b/phpunit.dist.xml new file mode 100644 index 0000000..f6c7bec --- /dev/null +++ b/phpunit.dist.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit bootstrap="tests/phpunit-bootstrap.php"> + <testsuites> + <testsuite name="Tests"> + <directory>tests/</directory> + </testsuite> + </testsuites> +</phpunit> diff --git a/tests/phpunit-bootstrap.php b/tests/phpunit-bootstrap.php new file mode 100644 index 0000000..eca92fd --- /dev/null +++ b/tests/phpunit-bootstrap.php @@ -0,0 +1,11 @@ +<?php + +if (!defined('QUIQQER_SYSTEM')) { + define('QUIQQER_SYSTEM', true); +} + +if (!defined('QUIQQER_AJAX')) { + define('QUIQQER_AJAX', true); +} + +require_once __DIR__ . '/../../../../bootstrap.php'; -- GitLab From aac6e17d5b10a857af2760ea216f0e8b91806f73 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Fri, 24 May 2024 16:44:40 +0200 Subject: [PATCH 05/15] chore: setup PHP_CodeSniffer for project tooling --- .phive/phars.xml | 2 ++ phpcs.xml.dist | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 phpcs.xml.dist diff --git a/.phive/phars.xml b/.phive/phars.xml index 6984891..3c7dea3 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -2,4 +2,6 @@ <phive xmlns="https://phar.io/phive"> <phar name="phpstan" version="1.11.1" installed="1.11.1" location="./tools/phpstan" copy="false"/> <phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/> + <phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/> + <phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/> </phive> diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..d48084f --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<ruleset> + <!-- Use PSR-12 ruleset --> + <rule ref="PSR12"/> + + <!-- Only scan *.php files --> + <arg name="extensions" value="php"/> + + <!-- Ignore warnings --> + <arg name="warning-severity" value="0"/> + + <!-- Process 64 (or number of CPU cores) files in parallel --> + <arg name="parallel" value="64"/> + + <!-- Output relative file paths, by setting the current folder as the basepath --> + <arg name="basepath" value="."/> + + <!-- Show colored output --> + <arg name="colors"/> + + <!-- Scan everything in the current folder --> + <file>.</file> +</ruleset> -- GitLab From 312ea91146c46c3ea4e87b5ad67234134ba890fb Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Fri, 24 May 2024 16:44:40 +0200 Subject: [PATCH 06/15] chore: setup CaptainHook for project tooling --- .phive/phars.xml | 1 + captainhook.json | 16 ++++++++++++++++ tests/captainhook-bootstrap.php | 3 +++ 3 files changed, 20 insertions(+) create mode 100644 captainhook.json create mode 100644 tests/captainhook-bootstrap.php diff --git a/.phive/phars.xml b/.phive/phars.xml index 3c7dea3..63a030f 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -4,4 +4,5 @@ <phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/> <phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/> <phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/> + <phar name="captainhook" version="^5.23.0" installed="5.23.0" location="./tools/captainhook" copy="false"/> </phive> diff --git a/captainhook.json b/captainhook.json new file mode 100644 index 0000000..30f1064 --- /dev/null +++ b/captainhook.json @@ -0,0 +1,16 @@ +{ + "config": { + "bootstrap": "tests/captainhook-bootstrap.php" + }, + "pre-commit": { + "enabled": true, + "actions": [ + { + "action": "\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting" + }, + { + "action": "composer test" + } + ] + } +} \ No newline at end of file diff --git a/tests/captainhook-bootstrap.php b/tests/captainhook-bootstrap.php new file mode 100644 index 0000000..1b61b73 --- /dev/null +++ b/tests/captainhook-bootstrap.php @@ -0,0 +1,3 @@ +<?php + +// This file is supposed to be empty, see https://github.com/captainhookphp/captainhook/issues/248 -- GitLab From b715776de3f179103d7441e3dfad3472bdb3c9d8 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Fri, 24 May 2024 16:44:40 +0200 Subject: [PATCH 07/15] chore: add developer scripts to composer.json --- composer.json | 104 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 73 insertions(+), 31 deletions(-) diff --git a/composer.json b/composer.json index d79bfa4..e78e118 100644 --- a/composer.json +++ b/composer.json @@ -1,34 +1,76 @@ { - "name": "quiqqer\/interview", - "type": "quiqqer-plugin", - "description": "Extension for blog and news plugin. This plugin adds some new attributes and provides new bricks.", - "license": "GPL-3.0+", - "authors": [ - { - "name": "Michael Danielczok", - "email": "michael@pcsg.de", - "homepage": "http:\/\/www.pcsg.de", - "role": "Developer" + "name": "quiqqer/interview", + "type": "quiqqer-plugin", + "description": "Extension for blog and news plugin. This plugin adds some new attributes and provides new bricks.", + "license": "GPL-3.0+", + "authors": [ + { + "name": "Michael Danielczok", + "email": "michael@pcsg.de", + "homepage": "http://www.pcsg.de", + "role": "Developer" + }, + { + "name": "Dominik Chrzanowski", + "email": "dominik.chrzanowski@gmail.com", + "role": "Developer" + } + ], + "support": { + "email": "support@pcsg.de" }, - { - "name": "Dominik Chrzanowski", - "email": "dominik.chrzanowski@gmail.com", - "role": "Developer" - } - ], - "support": { - "email": "support@pcsg.de" - }, - "require": { - "quiqqer\/quiqqer": ">=1.6|dev-master|dev-dev" - }, - "suggest": { - "quiqqer\/blog": "Create your own online diary. With the provided page types, managing and creating your own blog is no longer a problem.", - "quiqqer\/news": "News functionality for the QUIQQER system." - }, - "autoload": { - "psr-4": { - "QUI\\Interview\\": "src\/QUI\/Interview" + "require": { + "quiqqer/quiqqer": ">=1.6|dev-master|dev-dev" + }, + "suggest": { + "quiqqer/blog": "Create your own online diary. With the provided page types, managing and creating your own blog is no longer a problem.", + "quiqqer/news": "News functionality for the QUIQQER system." + }, + "autoload": { + "psr-4": { + "QUI\\Interview\\": "src/QUI/Interview" + } + }, + "scripts": { + "test": [ + "@dev:lint", + "@dev:phpunit" + ], + "dev:phpunit": "./tools/phpunit", + "dev:lint": [ + "@dev:lint:phpstan", + "@dev:lint:style" + ], + "dev:lint:phpstan": "./tools/phpstan", + "dev:lint:style": "./tools/phpcs", + "dev:lint:style:fix": "./tools/phpcbf", + "dev:init": [ + "@dev:init:check-requirements", + "@dev:init:tools", + "@dev:init:git-hooks" + ], + "dev:init:check-requirements": [ + "which composer > /dev/null || (echo 'Error: composer has to be globally installed'; exit 1)", + "which phive > /dev/null || (echo 'Error: PHIVE has to be globally installed'; exit 1)" + ], + "dev:init:tools": "phive install --temporary", + "dev:init:git-hooks": "./tools/captainhook install --only-enabled --force" + }, + "scripts-aliases": { + "test": [ + "dev:test" + ] + }, + "scripts-descriptions": { + "test": "Runs linting, static analysis, and unit tests.", + "dev:phpunit": "Run PHPUnit test suites", + "dev:lint": "Run PHPStan and code style check", + "dev:lint:phpstan": "Run PHPStan", + "dev:lint:style": "Run code style check (PHP_CodeSniffer)", + "dev:lint:style:fix": "Try to fix code style errors automatically", + "dev:init": "Initialize the developer tooling (tools and git hooks)", + "dev:init:check-requirements": "Check if the necessary requirements are met", + "dev:init:tools": "Install all developer tools (requires PHIVE)", + "dev:init:git-hooks": "Install all git hooks (may require tools to be installed)" } - } -} +} \ No newline at end of file -- GitLab From 00bf88896563da5d9e8a2362a25bdd1cc1be395f Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Fri, 24 May 2024 16:44:41 +0200 Subject: [PATCH 08/15] ci: use quiqqer-package-bundle component --- .gitlab-ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b5a64b4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ +include: + - component: dev.quiqqer.com/quiqqer/stabilization/ci-cd-components/quiqqer-package-bundle/quiqqer-package-bundle@main + +# Remove the entire phpunit-php8.1 block, to allow PHPUnit to run on PHP 8.1 in your pipeline +phpunit-php8.1: + rules: + - when: never + +# Remove the entire phpunit-php8.2 block, to allow PHPUnit to run on PHP 8.2 in your pipeline +phpunit-php8.2: + rules: + - when: never + +# Remove the entire phpunit-php8.3 block, to allow PHPUnit to run on PHP 8.3 in your pipeline +phpunit-php8.3: + rules: + - when: never \ No newline at end of file -- GitLab From 9d2c6622b3f0138266db0042e0795c80b18456a5 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Fri, 24 May 2024 16:44:41 +0200 Subject: [PATCH 09/15] docs: add CONTRIBUTING.md file --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4a69a59 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,3 @@ +# Contributing + +This package follows the [QUIQQER contribution guidelines](https://dev.quiqqer.com/quiqqer/stabilization/documentation/-/wikis/home). \ No newline at end of file -- GitLab From a84d719923d1e18bedd3e6028af05eefa53b9f9e Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Thu, 1 Aug 2024 17:32:31 +0200 Subject: [PATCH 10/15] chore: set PHPStan to level 5 with baseline --- .phive/phars.xml | 2 +- phpstan-baseline.neon | 6 ++++++ phpstan.dist.neon | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.phive/phars.xml b/.phive/phars.xml index 63a030f..ebb5988 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <phive xmlns="https://phar.io/phive"> - <phar name="phpstan" version="1.11.1" installed="1.11.1" location="./tools/phpstan" copy="false"/> + <phar name="phpstan" version="1.11.8" installed="1.11.8" location="./tools/phpstan" copy="false"/> <phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/> <phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/> <phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/> diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e69de29..48311ef 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - + message: "#^Parameter \\#2 \\$val of method QUI\\\\QDOM\\:\\:setAttribute\\(\\) expects array\\|bool\\|object\\|string, int given\\.$#" + count: 1 + path: src/QUI/Interview/Controls/IntervieweeData.php diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 15e9210..58a61ff 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -2,7 +2,9 @@ includes: - phpstan-baseline.neon parameters: - level: 8 + level: 5 paths: - src + bootstrapFiles: + - tests/phpstan-bootstrap.php tipsOfTheDay: false -- GitLab From 1e2e987bc5444be89931e206c3646e36d8e66bd0 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Thu, 1 Aug 2024 17:32:31 +0200 Subject: [PATCH 11/15] chore: upgrade CaptainHook to version ^5.23.3 --- .phive/phars.xml | 2 +- captainhook.json | 25 +++++++++++-------------- tests/captainhook-bootstrap.php | 3 --- 3 files changed, 12 insertions(+), 18 deletions(-) delete mode 100644 tests/captainhook-bootstrap.php diff --git a/.phive/phars.xml b/.phive/phars.xml index ebb5988..5bfa092 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -4,5 +4,5 @@ <phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/> <phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/> <phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/> - <phar name="captainhook" version="^5.23.0" installed="5.23.0" location="./tools/captainhook" copy="false"/> + <phar name="captainhook" version="^5.23.3" installed="5.23.3" location="./tools/captainhook" copy="false"/> </phive> diff --git a/captainhook.json b/captainhook.json index 30f1064..3702e1a 100644 --- a/captainhook.json +++ b/captainhook.json @@ -1,16 +1,13 @@ { - "config": { - "bootstrap": "tests/captainhook-bootstrap.php" - }, - "pre-commit": { - "enabled": true, - "actions": [ - { - "action": "\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting" - }, - { - "action": "composer test" - } - ] - } + "pre-commit": { + "enabled": true, + "actions": [ + { + "action": "\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting" + }, + { + "action": "composer test" + } + ] + } } \ No newline at end of file diff --git a/tests/captainhook-bootstrap.php b/tests/captainhook-bootstrap.php deleted file mode 100644 index 1b61b73..0000000 --- a/tests/captainhook-bootstrap.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -// This file is supposed to be empty, see https://github.com/captainhookphp/captainhook/issues/248 -- GitLab From ccd1257707b585038d4d92942a8e224d26e4b65a Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Tue, 6 Aug 2024 14:35:35 +0200 Subject: [PATCH 12/15] ci: use "quiqqer-package-bundle" component for QUIQQER version 1 --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b5a64b4..958e6db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,7 @@ include: - - component: dev.quiqqer.com/quiqqer/stabilization/ci-cd-components/quiqqer-package-bundle/quiqqer-package-bundle@main + - component: dev.quiqqer.com/quiqqer/stabilization/ci-cd-components/quiqqer-package-bundle/quiqqer-package-bundle@2 + inputs: + quiqqer-major-version: 1 # Remove the entire phpunit-php8.1 block, to allow PHPUnit to run on PHP 8.1 in your pipeline phpunit-php8.1: -- GitLab From 552e6aef33b8b1b9d54255743a10715dde6a0861 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Tue, 6 Aug 2024 15:00:19 +0200 Subject: [PATCH 13/15] chore: add LICENSE file --- LICENSE | 1 + 1 file changed, 1 insertion(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..57cd60a --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +GPL-3.0+ \ No newline at end of file -- GitLab From 6f2dd9ebb87655acfb4bc4a039c6efabc3302a97 Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan.wennrich@pcsg.de> Date: Tue, 6 Aug 2024 16:30:14 +0200 Subject: [PATCH 14/15] style: fix PSR-12 code style violations --- src/QUI/Interview/Controls/IntervieweeData.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/QUI/Interview/Controls/IntervieweeData.php b/src/QUI/Interview/Controls/IntervieweeData.php index 2516905..4cd7d99 100644 --- a/src/QUI/Interview/Controls/IntervieweeData.php +++ b/src/QUI/Interview/Controls/IntervieweeData.php @@ -31,7 +31,7 @@ public function __construct($attributes = []) 'template' => 'largeImageTop' // template ]); - $this->addCSSFile(dirname(__FILE__).'/IntervieweeData.css'); + $this->addCSSFile(dirname(__FILE__) . '/IntervieweeData.css'); parent::__construct($attributes); @@ -48,8 +48,10 @@ public function getBody() $Engine = QUI::getTemplateManager()->getEngine(); $Site = $this->getSite(); - if ($Site->getAttribute("type") !== 'quiqqer/blog:blog/entry' && - $Site->getAttribute("type") !== 'quiqqer/news:news/entry') { + if ( + $Site->getAttribute("type") !== 'quiqqer/blog:blog/entry' && + $Site->getAttribute("type") !== 'quiqqer/news:news/entry' + ) { return ''; } @@ -82,9 +84,9 @@ public function getBody() 'description' => $intervieweeData['description'] ]); - $Engine->assign('controlTemplate', $Engine->fetch(dirname(__FILE__).$html)); + $Engine->assign('controlTemplate', $Engine->fetch(dirname(__FILE__) . $html)); - return $Engine->fetch(dirname(__FILE__).'/IntervieweeData.html'); + return $Engine->fetch(dirname(__FILE__) . '/IntervieweeData.html'); } /** -- GitLab From 557a752c08cf396bb36697b4f6af406aace20dd9 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Tue, 25 Feb 2025 05:52:28 +0100 Subject: [PATCH 15/15] fix(phpstan): correct variable type Related: quiqqer/interview#4 --- phpstan-baseline.neon | 4 ---- src/QUI/Interview/Controls/IntervieweeData.php | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 48311ef..364905f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,6 +1,2 @@ parameters: ignoreErrors: - - - message: "#^Parameter \\#2 \\$val of method QUI\\\\QDOM\\:\\:setAttribute\\(\\) expects array\\|bool\\|object\\|string, int given\\.$#" - count: 1 - path: src/QUI/Interview/Controls/IntervieweeData.php diff --git a/src/QUI/Interview/Controls/IntervieweeData.php b/src/QUI/Interview/Controls/IntervieweeData.php index 4cd7d99..d73c549 100644 --- a/src/QUI/Interview/Controls/IntervieweeData.php +++ b/src/QUI/Interview/Controls/IntervieweeData.php @@ -35,7 +35,7 @@ public function __construct($attributes = []) parent::__construct($attributes); - $this->setAttribute('cacheable', 0); + $this->setAttribute('cacheable', "0"); } /** @@ -43,7 +43,7 @@ public function __construct($attributes = []) * * @see \QUI\Control::create() */ - public function getBody() + public function getBody(): string { $Engine = QUI::getTemplateManager()->getEngine(); $Site = $this->getSite(); -- GitLab