diff --git a/.github/workflows/ci-php-oldest.yml b/.github/workflows/ci-php-oldest.yml index 932f6a4..f1d6353 100644 --- a/.github/workflows/ci-php-oldest.yml +++ b/.github/workflows/ci-php-oldest.yml @@ -8,13 +8,20 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.1' - uses: actions/cache@v3 with: path: vendor - key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.OS }}-build-oldest-${{ hashFiles('**/composer.lock') }} - uses: php-actions/composer@v6 + env: + COMPOSER: "composer-php-oldest.json" with: php_version: "7.1" + version: 1 - name: PHP Lint run: vendor/bin/phplint --exclude=vendor - name: PHP Unit diff --git a/composer-php-oldest.json b/composer-php-oldest.json new file mode 100644 index 0000000..328940c --- /dev/null +++ b/composer-php-oldest.json @@ -0,0 +1,21 @@ +{ + "name": "qualityunit/tnef-decoder", + "description": "TNEF Decoder library extracted from squirell mail plugin to decode winmail.dat file in email attachment", + "keywords": ["tnef decoder", "winmail.dat"], + "license": "GPL-2.0-or-later", + "type": "library", + "homepage": "https://github.com/QualityUnit/TNEFDecoder", + "require": { + "php": ">=7.0", + "ext-mbstring": "*" + }, + "require-dev": { + "overtrue/phplint": "3.2.0", + "phpunit/phpunit": "7.5.20" + }, + "autoload": { + "psr-4": { + "TNEFDecoder\\": "src/TNEFDecoder/" + } + } +} diff --git a/src/TNEFDecoder/TNEFBuffer.php b/src/TNEFDecoder/TNEFBuffer.php index 5b2eb41..5c8cc4d 100644 --- a/src/TNEFDecoder/TNEFBuffer.php +++ b/src/TNEFDecoder/TNEFBuffer.php @@ -1,4 +1,6 @@ -offset = 0; } - function getBytes(int $numBytes): ?string + function getBytes(int $numBytes) { if ($this->getRemainingBytes() < $numBytes) { $this->offset = strlen($this->data);