diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index c7ea176..473a37b 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -9,15 +9,15 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, macOS-latest] - php-versions: ['7.2', '7.3', '7.4'] + php-versions: ['7.3', '7.4', '8.0'] name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Setup PHP - uses: shivammathur/setup-php@v1 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: mbstring, intl @@ -26,23 +26,18 @@ jobs: id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache composer dependencies - uses: actions/cache@v1 + - name: Cache dependencies + uses: actions/cache@v2 with: path: ${{ steps.composer-cache.outputs.dir }} - # Use composer.json for key, if composer.lock is not committed. - # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: ${{ runner.os }}-composer- - - name: Validate composer.json and composer.lock - run: composer validate - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader + run: composer install --prefer-dist - name: Run test suite run: composer run-script test - + - name: Run style-checking run: composer run-script check-style diff --git a/CHANGELOG.md b/CHANGELOG.md index 8851897..ad64bd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [v5.0.0](https://github.com/elforastero/transliterate/releases/tag/2.0.0) - Support for Laravel 8 +- Drop support of php7.2 - Require phpunit >= 9 ## [v4.0.0](https://github.com/elforastero/transliterate/releases/tag/2.0.0) diff --git a/composer.json b/composer.json index a358fef..085d4df 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ } }, "require": { - "php": ">=7.2", + "php": ">=7.3", "ext-intl": "*", "illuminate/support": "^6.0|^7.0|^8.0" }, diff --git a/src/Facade.php b/src/Facade.php index 59f0d78..5cce92c 100644 --- a/src/Facade.php +++ b/src/Facade.php @@ -14,7 +14,7 @@ class Facade extends BaseFacade /** * @return string */ - public static function getFacadeAccessor() + public static function getFacadeAccessor(): string { return 'Transliterate'; } diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 3f97b80..4f1fd69 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -40,9 +40,9 @@ public function register() } /** - * @return array + * @return string[] */ - public function provides() + public function provides(): array { return ['Transliterate']; } diff --git a/src/Transformer.php b/src/Transformer.php index d594126..34b75b5 100644 --- a/src/Transformer.php +++ b/src/Transformer.php @@ -12,7 +12,7 @@ final class Transformer { /** - * @var array + * @var string[] */ private static $stack = []; @@ -29,7 +29,7 @@ public static function register(callable $callback): void /** * Get an array of all registered callbacks. * - * @return array + * @return callable[] */ public static function getAll(): array { @@ -40,7 +40,7 @@ public static function getAll(): array * Override closures stack. * For testing purposes only. * - * @param array $stack + * @param string[] $stack */ public static function override(array $stack): void { diff --git a/src/Transliterator.php b/src/Transliterator.php index a77c57f..989f3f4 100644 --- a/src/Transliterator.php +++ b/src/Transliterator.php @@ -105,8 +105,6 @@ public function slugify(string $text): string /** * Get map array according to config file. - * - * @return array */ private function getMap(): array {