From 14b4356305d916dca8218a28222289d2b82493d5 Mon Sep 17 00:00:00 2001 From: "St. Frank" Date: Sat, 3 May 2025 09:38:45 +0200 Subject: [PATCH 1/4] v2.0 --- .editorconfig | 20 ++++++++++++++++++++ .gitattributes | 7 +++++++ .github/workflows/tests.yml | 10 ++++++++-- ext.php | 2 +- language/de/permissions_hpl_ext.php | 2 +- migrations/v10x/release_0_0_1.php | 2 +- 6 files changed, 38 insertions(+), 5 deletions(-) create mode 100755 .editorconfig create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig new file mode 100755 index 0000000..1b20df7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +end_of_line = lf +insert_final_newline = true + +[*.{php,js,css,json,html,txt,md,yml}] +charset = utf-8 +indent_style = tab +indent_size = 4 +trim_trailing_whitespace = true + +[*.{html,txt,md,yml}] +trim_trailing_whitespace = false + +[*.yml] +indent_style = space diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3406f51 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +# Auto detect text files and perform LF normalization +* text=auto +* eol=lf +.gitattributes export-ignore +.gitignore export-ignore +.editorconfig export-ignore +.github/ export-ignore \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c687166..737eff5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,11 +11,13 @@ env: on: push: branches: # Run tests when commits are pushed to these branches in your repo - - main + - master + - 2.0.x pull_request: # Run tests when pull requests are made on these branches in your repo branches: - - main + - master + - 2.0.x jobs: # START Basic Checks Job (EPV, code sniffer, images check, etc.) @@ -24,7 +26,11 @@ jobs: strategy: matrix: include: +<<<<<<< Updated upstream - php: '7.2' +======= + - php: '7.4' +>>>>>>> Stashed changes db: "none" NOTESTS: 1 diff --git a/ext.php b/ext.php index 211ae7f..7a06827 100755 --- a/ext.php +++ b/ext.php @@ -6,7 +6,7 @@ * @copyright (c) 2024 St.Frank * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * - * + * */ namespace wintstar\hideprofilelink; diff --git a/language/de/permissions_hpl_ext.php b/language/de/permissions_hpl_ext.php index 47e2e94..d0da68d 100755 --- a/language/de/permissions_hpl_ext.php +++ b/language/de/permissions_hpl_ext.php @@ -42,5 +42,5 @@ $lang = array_merge($lang, array( 'ACL_A_HPL_VIEW_PROFILELINK' => 'Kann Link zu Profile und das Profile sehen', 'ACL_M_HPL_VIEW_PROFILELINK' => 'Kann Link zu Profile und das Profile sehen', - 'ACL_U_HPL_VIEW_PROFILELINK' => 'Kann Link zu Profile und das Profile sehen', + 'ACL_U_HPL_VIEW_PROFILELINK' => 'Kann Link zu Profile und das Profile sehen', )); \ No newline at end of file diff --git a/migrations/v10x/release_0_0_1.php b/migrations/v10x/release_0_0_1.php index b713320..b295687 100755 --- a/migrations/v10x/release_0_0_1.php +++ b/migrations/v10x/release_0_0_1.php @@ -29,4 +29,4 @@ public function update_data() ['permission.permission_set', ['ROLE_ADMIN_FULL', 'a_hpl_view_profilelink']] ); } -} +} \ No newline at end of file From 76ac97b13d604f8305e854c78d8158f2dd4a7937 Mon Sep 17 00:00:00 2001 From: "St. Frank" Date: Sat, 3 May 2025 09:57:59 +0200 Subject: [PATCH 2/4] Update tests.yml --- .github/workflows/tests.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 737eff5..8459e8a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,11 +26,7 @@ jobs: strategy: matrix: include: -<<<<<<< Updated upstream - - php: '7.2' -======= - php: '7.4' ->>>>>>> Stashed changes db: "none" NOTESTS: 1 From 555599d99717ffadb0509bccdb2e329e2dc9f856 Mon Sep 17 00:00:00 2001 From: "St. Frank" Date: Sat, 3 May 2025 10:14:57 +0200 Subject: [PATCH 3/4] Fix end of file --- .github/workflows/tests.yml | 4 ---- language/de/hideprofilelink.php | 2 +- language/de/permissions_hpl_ext.php | 2 +- language/en/hideprofilelink.php | 2 +- language/en/permissions_hpl_ext.php | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 737eff5..8459e8a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,11 +26,7 @@ jobs: strategy: matrix: include: -<<<<<<< Updated upstream - - php: '7.2' -======= - php: '7.4' ->>>>>>> Stashed changes db: "none" NOTESTS: 1 diff --git a/language/de/hideprofilelink.php b/language/de/hideprofilelink.php index 62c5f6a..2339722 100755 --- a/language/de/hideprofilelink.php +++ b/language/de/hideprofilelink.php @@ -41,4 +41,4 @@ $lang = array_merge($lang, array( 'NO_VIEW_USERSPROFILE' => 'Du bist nicht berechtigt Profile anzusehen.', -)); \ No newline at end of file +)); diff --git a/language/de/permissions_hpl_ext.php b/language/de/permissions_hpl_ext.php index d0da68d..461f736 100755 --- a/language/de/permissions_hpl_ext.php +++ b/language/de/permissions_hpl_ext.php @@ -43,4 +43,4 @@ 'ACL_A_HPL_VIEW_PROFILELINK' => 'Kann Link zu Profile und das Profile sehen', 'ACL_M_HPL_VIEW_PROFILELINK' => 'Kann Link zu Profile und das Profile sehen', 'ACL_U_HPL_VIEW_PROFILELINK' => 'Kann Link zu Profile und das Profile sehen', -)); \ No newline at end of file +)); diff --git a/language/en/hideprofilelink.php b/language/en/hideprofilelink.php index 4b10d6b..a2ca14d 100755 --- a/language/en/hideprofilelink.php +++ b/language/en/hideprofilelink.php @@ -41,4 +41,4 @@ $lang = array_merge($lang, array( 'NO_VIEW_USERSPROFILE' => 'You are not authorised to view profiles.', -)); \ No newline at end of file +)); diff --git a/language/en/permissions_hpl_ext.php b/language/en/permissions_hpl_ext.php index c7fa08c..02fa1f3 100755 --- a/language/en/permissions_hpl_ext.php +++ b/language/en/permissions_hpl_ext.php @@ -43,4 +43,4 @@ 'ACL_A_HPL_VIEW_PROFILELINK' => 'Can see link to profile and profile', 'ACL_M_HPL_VIEW_PROFILELINK' => 'Can see link to profile and profile', 'ACL_U_HPL_VIEW_PROFILELINK' => 'Can see link to profile and profile', -)); \ No newline at end of file +)); From 590f05dcb102ea17567b674efc7a7fd787042a0a Mon Sep 17 00:00:00 2001 From: "St. Frank" Date: Sat, 3 May 2025 10:39:47 +0200 Subject: [PATCH 4/4] Remove tests.yml Third-party software for testing makes no sense to me --- .gitattributes | 7 --- .github/workflows/tests.yml | 89 ------------------------------------- 2 files changed, 96 deletions(-) delete mode 100644 .gitattributes delete mode 100644 .github/workflows/tests.yml diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 3406f51..0000000 --- a/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto -* eol=lf -.gitattributes export-ignore -.gitignore export-ignore -.editorconfig export-ignore -.github/ export-ignore \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 8459e8a..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Tests - -env: - EXTNAME: wintstar/hideprofilelink # Your extension vendor/package name - SNIFF: 1 # Run code sniffer on your code? 1 or 0 - IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0 - EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0 - EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0 - PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on - -on: - push: - branches: # Run tests when commits are pushed to these branches in your repo - - master - - 2.0.x - - pull_request: # Run tests when pull requests are made on these branches in your repo - branches: - - master - - 2.0.x - -jobs: - # START Basic Checks Job (EPV, code sniffer, images check, etc.) - basic-checks: - runs-on: ubuntu-22.04 - strategy: - matrix: - include: - - php: '7.4' - db: "none" - NOTESTS: 1 - - name: PHP ${{ matrix.php }} - ${{ matrix.db }} - - steps: - - name: Checkout phpBB - uses: actions/checkout@v2 - with: - repository: phpbb/phpbb - ref: ${{ env.PHPBB_BRANCH }} - path: phpBB3 - - - name: Checkout extension - uses: actions/checkout@v2 - with: - path: phpBB3/phpBB/ext/${{ env.EXTNAME }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap - coverage: none - - - name: Setup environment for phpBB - env: - DB: ${{ matrix.db }} - PHP_VERSION: ${{ matrix.php }} - NOTESTS: '1' - run: .github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS - working-directory: ./phpBB3 - - - name: Setup EPV - if: ${{ env.EPV != 0 }} - run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs - working-directory: ./phpBB3/phpBB - - - name: Run code sniffer - if: ${{ env.SNIFF != 0 }} - env: - NOTESTS: '1' - run: .github/ext-sniff.sh $EXTNAME $NOTESTS - working-directory: ./phpBB3 - - - name: Check image ICC profiles - if: ${{ env.IMAGE_ICC != 0 }} - run: .github/check-image-icc-profiles.sh - working-directory: ./phpBB3 - - - name: Check executable files - if: ${{ env.EXECUTABLE_FILES != 0 }} - run: .github/ext-check-executable-files.sh ./ $EXTNAME - working-directory: ./phpBB3 - - - name: Run EPV - if: ${{ env.EPV != 0 }} - run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/$EXTNAME/" - working-directory: ./phpBB3 - # END Basic Checks Job