diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index 087bb42..c8d0f2d 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -11,8 +11,8 @@ jobs: strategy: matrix: - php: ['8.0'] - moodle-branch: ['master'] # To be replaced with MOODLE_401_STABLE. + php: ['8.1'] + moodle-branch: ['MOODLE_402_STABLE'] database: ['pgsql'] steps: @@ -27,7 +27,7 @@ jobs: - name: Check for test folder id: check_tests run: | - echo "::set-output name=has_tests::${{ hashFiles('plugin/tests') != '' }}" + echo "has_tests=${{ hashFiles('plugin/tests') != '' }}" >> $GITHUB_OUTPUT - name: Setup PHP ${{ matrix.php }} uses: shivammathur/setup-php@v2 @@ -115,8 +115,8 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.0'] - moodle-branch: ['MOODLE_311_STABLE', 'MOODLE_400_STABLE', 'master'] # To be replaced with MOODLE_401_STABLE. + php: ['8.0', '8.1'] + moodle-branch: ['MOODLE_401_STABLE', 'MOODLE_402_STABLE'] database: ['mariadb', 'pgsql'] include: - php: '7.4' @@ -125,6 +125,18 @@ jobs: - php: '7.4' moodle-branch: 'MOODLE_39_STABLE' database: 'pgsql' + - php: '8.0' + moodle-branch: 'MOODLE_311_STABLE' + database: 'mariadb' + - php: '8.0' + moodle-branch: 'MOODLE_311_STABLE' + database: 'pgsql' + - php: '8.0' + moodle-branch: 'MOODLE_400_STABLE' + database: 'mariadb' + - php: '8.0' + moodle-branch: 'MOODLE_400_STABLE' + database: 'pgsql' steps: - name: Start MariaDB diff --git a/.github/workflows/moodle-release.yml b/.github/workflows/moodle-release.yml index d914148..a1acc46 100644 --- a/.github/workflows/moodle-release.yml +++ b/.github/workflows/moodle-release.yml @@ -44,7 +44,7 @@ jobs: --data-urlencode "altdownloadurl=${ZIPURL}" \ --data-urlencode "releasenotes=${BODY}" \ --data-urlencode "releasenotesformat=4") - echo "::set-output name=response::${RESPONSE}" + echo "response=${RESPONSE}" >> $GITHUB_OUTPUT - name: Evaluate the response id: evaluate-response env: diff --git a/thirdparty/vendor/bacon/bacon-qr-code/src/BaconQrCode/Encoder/MaskUtil.php b/thirdparty/vendor/bacon/bacon-qr-code/src/BaconQrCode/Encoder/MaskUtil.php index c294d55..44fbcf7 100644 --- a/thirdparty/vendor/bacon/bacon-qr-code/src/BaconQrCode/Encoder/MaskUtil.php +++ b/thirdparty/vendor/bacon/bacon-qr-code/src/BaconQrCode/Encoder/MaskUtil.php @@ -220,7 +220,7 @@ public static function getDataMaskBit($maskPattern, $x, $y) break; case 4: - $intermediate = (BitUtils::unsignedRightShift($y, 1) + ($x / 3)) & 0x1; + $intermediate = intval((BitUtils::unsignedRightShift($y, 1) + ($x / 3))) & 0x1; break; case 5: diff --git a/thirdparty/vendor/endroid/qrcode/src/Writer/PngWriter.php b/thirdparty/vendor/endroid/qrcode/src/Writer/PngWriter.php index d35656d..f748b3e 100644 --- a/thirdparty/vendor/endroid/qrcode/src/Writer/PngWriter.php +++ b/thirdparty/vendor/endroid/qrcode/src/Writer/PngWriter.php @@ -133,9 +133,10 @@ protected function addLogo($sourceImage, $logoPath, $logoWidth = null) $logoTargetHeight = intval($scale * imagesy($logoImage)); } - $logoX = imagesx($sourceImage) / 2 - $logoTargetWidth / 2; - $logoY = imagesy($sourceImage) / 2 - $logoTargetHeight / 2; - imagecopyresampled($sourceImage, $logoImage, $logoX, $logoY, 0, 0, $logoTargetWidth, $logoTargetHeight, $logoSourceWidth, $logoSourceHeight); + $logoX = intval(imagesx($sourceImage) / 2 - $logoTargetWidth / 2); + $logoY = intval(imagesy($sourceImage) / 2 - $logoTargetHeight / 2); + imagecopyresampled($sourceImage, $logoImage, $logoX, $logoY, 0, 0, + intval($logoTargetWidth), intval($logoTargetHeight), intval($logoSourceWidth), intval($logoSourceHeight)); return $sourceImage; } diff --git a/version.php b/version.php index 91bcbb7..42c4274 100644 --- a/version.php +++ b/version.php @@ -25,6 +25,6 @@ $plugin->component = 'block_qrcode'; // Full name of the plugin. $plugin->maturity = MATURITY_STABLE; -$plugin->release = 'v4.0-r1'; -$plugin->version = 2022040400; // The current plugin version (Date: YYYMMDDXX). +$plugin->release = 'v4.2-r1'; +$plugin->version = 2023051200; // The current plugin version (Date: YYYMMDDXX). $plugin->requires = 2020061500; // Requires Moodle 3.9+.