Skip to content

Commit

Permalink
feat: drop support of php7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ElForastero committed Feb 24, 2021
1 parent a10a9ef commit 30d49b4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 21 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
},
"require": {
"php": ">=7.2",
"php": ">=7.3",
"ext-intl": "*",
"illuminate/support": "^6.0|^7.0|^8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Facade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Facade extends BaseFacade
/**
* @return string
*/
public static function getFacadeAccessor()
public static function getFacadeAccessor(): string
{
return 'Transliterate';
}
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public function register()
}

/**
* @return array
* @return string[]
*/
public function provides()
public function provides(): array
{
return ['Transliterate'];
}
Expand Down
6 changes: 3 additions & 3 deletions src/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
final class Transformer
{
/**
* @var array
* @var string[]
*/
private static $stack = [];

Expand All @@ -29,7 +29,7 @@ public static function register(callable $callback): void
/**
* Get an array of all registered callbacks.
*
* @return array<callable>
* @return callable[]
*/
public static function getAll(): array
{
Expand All @@ -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
{
Expand Down
2 changes: 0 additions & 2 deletions src/Transliterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ public function slugify(string $text): string

/**
* Get map array according to config file.
*
* @return array
*/
private function getMap(): array
{
Expand Down

0 comments on commit 30d49b4

Please sign in to comment.