Skip to content

Commit

Permalink
Merge pull request #4 from ageekdev/laravel10.x
Browse files Browse the repository at this point in the history
Laravel10.x
  • Loading branch information
tintnaingwinn authored Feb 12, 2023
2 parents ee4c28c + 094e95d commit 95f7c36
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Security Policy

If you discover any security related issues, please email tintnaingwin@geniefintech.com instead of using the issue tracker.
If you discover any security related issues, please email amigo.k8@gmail.com instead of using the issue tracker.
7 changes: 6 additions & 1 deletion .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ jobs:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/[email protected]
uses: aglipanci/[email protected]
with:
preset: laravel
verboseMode: true
testMode: true
pintVersion: 1.4.1

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: PHPStan

on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
push:
paths:
- '**.php'
- 'phpstan.neon.dist'

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v2
- name: Install composer dependencies
uses: ramsey/composer-install@v1

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
- name: Run PHPStan
timeout-minutes: 2
run: ./vendor/bin/phpstan --error-format=github
23 changes: 16 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,23 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1 8.0]
laravel: [9.*, 8.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
php: [8.2, 8.1, 8.0]
laravel: [10.*, 9.*, 8.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
larastan: 2.4.*
- laravel: 9.*
testbench: 7.*
larastan: 2.*
- laravel: 8.*
testbench: 6.23
larastan: 1.*
exclude:
- laravel: 10.*
php: 8.0

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand All @@ -32,7 +40,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Setup problem matchers
Expand All @@ -42,8 +50,9 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nunomaduro/larastan:${{ matrix.larastan }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
timeout-minutes: 2
run: vendor/bin/pest
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<h1 align="center">Laravel Num</h1>

[![Latest Version on Packagist](https://img.shields.io/packagist/v/ageekdev/laravel-num.svg?style=flat-square)](https://packagist.org/packages/ageekdev/laravel-num)
[![Laravel 8.x](https://img.shields.io/badge/Laravel-8.x-red.svg?style=flat-square)](http://laravel.com)
[![Laravel 9.x](https://img.shields.io/badge/Laravel-9.x-red.svg?style=flat-square)](http://laravel.com)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/ageekdev/laravel-num/run-tests?label=tests&style=flat-square)](https://github.com/ageekdev/laravel-num/actions?query=workflow%3Arun-tests+branch%3Amain)
[![Laravel 8.x](https://img.shields.io/badge/Laravel-8.x-red.svg?style=flat-square)](https://laravel.com/docs/8.x)
[![Laravel 9.x](https://img.shields.io/badge/Laravel-9.x-red.svg?style=flat-square)](https://laravel.com/docs/9.x)
[![Laravel 10.x](https://img.shields.io/badge/Laravel-10.x-red.svg?style=flat-square)](http://laravel.com)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/ageekdev/laravel-num/run-tests.yml?label=tests&style=flat-square)](https://github.com/ageekdev/laravel-num/actions/workflows/run-tests.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/ageekdev/laravel-num.svg?style=flat-square)](https://packagist.org/packages/ageekdev/laravel-num)

To convert the unicode digit to another unicode digit.
Expand Down Expand Up @@ -136,6 +137,11 @@ Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Tint Naing Win](https://github.com/tintnaingwinn)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@
}
],
"require": {
"php": "^8.0",
"illuminate/support": "^8.0|^9.0"
"php": "^8.0|^8.1|^8.2",
"illuminate/support": "^8.0|^9.0|^10.0"
},
"require-dev": {
"laravel/pint": "^1.2",
"nunomaduro/collision": "^5.10|^6.1",
"nunomaduro/larastan": "^1.0|2.1.12",
"orchestra/testbench": "^6.23|^7.0",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"laravel/pint": "^1.4",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0"
"phpstan/phpstan-phpunit": "^1.0",
"nunomaduro/collision": "^5.11|^6.2|^7.0",
"nunomaduro/larastan": "^1.0|^2.0",
"orchestra/testbench": "^6.24|^7.6|^8.0",
"pestphp/pest": "^1.21|^2.0",
"pestphp/pest-plugin-laravel": "^1.2|^2.0",
"roave/security-advisories": "dev-latest"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ parameters:
level: 4
paths:
- src
- config
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkMissingIterableValueType: false
8 changes: 4 additions & 4 deletions src/Facades/Num.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
use Illuminate\Support\Facades\Facade;

/**
* @method string convert(int|string $string, string $to = 'en' , string $from = null)
* @method string toMyanmar(string $string)
* @method string toEnglish(string $string)
* @method string toThai(string $string)
* @method static string convert(int|string $string, string $to = 'en' , string $from = null)
* @method static string toMyanmar(string $string)
* @method static string toEnglish(string $string)
* @method static string toThai(string $string)
*
* @see \AgeekDev\Num\Num
*/
Expand Down

0 comments on commit 95f7c36

Please sign in to comment.