Skip to content

Commit

Permalink
Merge pull request #4 from datalogix/feat-laravel-10
Browse files Browse the repository at this point in the history
Feat laravel 10
  • Loading branch information
ricardogobbosouza authored Jul 18, 2023
2 parents 09c0898 + dcce25a commit ba371d8
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 123 deletions.
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
* text=auto eol=lf

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.styleci.yml export-ignore
.phpunit-watcher.yml export-ignor
README.md export-ignore
phpunit.xml.dist export-ignore
16 changes: 9 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,26 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [7.3, 7.4, 8.0, 8.1]
laravel: [^7.0, ^8.0, ^9.0]
php: [7.4, 8.0, 8.1]
laravel: [^8.0, ^9.0, ^10.0]
#stability: [prefer-lowest, prefer-stable]
stability: [prefer-stable]
exclude:
- php: 7.3
laravel: 9
- php: 7.4
laravel: 9
- php: 7.4
laravel: 10
- php: 8.0
laravel: 10

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

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand All @@ -46,4 +48,4 @@ jobs:
run: vendor/bin/phpunit --verbose

- name: Coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
vendor
composer.phar
/vendor
composer.lock
.DS_Store
Thumbs.db
phpunit.xml
clover.xml
.idea
.vscode
.phpunit.result.cache
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
}
],
"require": {
"php": "^7.3|^8.0",
"datalogix/laravel-translation": "^1.1",
"datalogix/laravel-validation": "^1.3",
"illuminate/contracts": "^7.0|^8.0|^9.0",
"illuminate/database": "^7.0|^8.0|^9.0",
"illuminate/pagination": "^7.0|^8.0|^9.0",
"illuminate/support": "^7.0|^8.0|^9.0"
"php": "^7.4|^8.0",
"datalogix/laravel-translation": "^1.1|^2.0",
"datalogix/laravel-validation": "^1.3|^2.0",
"illuminate/contracts": "^8.0|^9.0|^10.0",
"illuminate/database": "^8.0|^9.0|^10.0",
"illuminate/pagination": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0"
},
"require-dev": {
"graham-campbell/testbench": "^5.7",
"phpunit/phpunit": "^8.5|^9.5",
"spatie/phpunit-watcher": "^1.0"
"graham-campbell/testbench": "^6.0",
"phpunit/phpunit": "^9.5|^10.0",
"spatie/phpunit-watcher": "^1.23"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions lang/en/passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
|
*/

'reset' => 'Your password has been reset!',
'sent' => 'We have emailed your password reset link!',
'reset' => 'Your password has been reset.',
'sent' => 'We have emailed your password reset link.',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that email address.",
Expand Down
185 changes: 97 additions & 88 deletions lang/en/validation.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lang/pt_BR/passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
|
*/

'reset' => 'Sua senha foi redefinida!',
'sent' => 'Enviamos seu link de redefinição de senha por e-mail!',
'reset' => 'Sua senha foi redefinida.',
'sent' => 'Enviamos seu link de redefinição de senha por e-mail.',
'throttled' => 'Aguarde antes de tentar novamente.',
'token' => 'Este token de redefinição de senha é inválido.',
'user' => 'Não encontramos um usuário com esse endereço de e-mail.',
Expand Down
13 changes: 11 additions & 2 deletions lang/pt_BR/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'alpha_dash' => 'O campo :attribute deve conter apenas letras, números, traços e sublinhados.',
'alpha_num' => 'O campo :attribute deve conter apenas letras e números.',
'array' => 'O campo :attribute deve ser uma matriz.',
'ascii' => 'O campo :attribute deve conter apenas caracteres alfanuméricos de byte único e símbolos.',
'before' => 'O campo :attribute deve ser uma data anterior a :date.',
'before_or_equal' => 'O campo :attribute deve ser uma data anterior ou igual a :date.',
'between' => [
Expand All @@ -31,11 +32,13 @@
'string' => 'O campo :attribute deve ter entre :min e :max caracteres.',
],
'boolean' => 'O campo :attribute deve ser verdadeiro ou falso.',
'can' => 'O campo :attribute contém um valor não autorizado.',
'confirmed' => 'O campo :attribute de confirmação não corresponde.',
'current_password' => 'A senha está incorreta.',
'date' => 'O campo :attribute deve ser uma data válida.',
'date_equals' => 'O campo :attribute deve ser uma data igual a :date.',
'date_format' => 'O campo :attribute não corresponde ao formato :format.',
'decimal' => 'O campo :attribute deve ter :decimal casas decimais.',
'declined' => 'O campo :attribute deve ser recusado.',
'declined_if' => 'O campo :attribute deve ser recusado quando :other for :value.',
'different' => 'O campo :attribute e o :other devem ser diferentes.',
Expand Down Expand Up @@ -101,6 +104,11 @@
'string' => 'O campo :attribute deve ter pelo menos :min caracteres.',
],
'min_digits' => 'O campo :attribute deve ter pelo menos :min dígitos.',
'missing' => 'O campo :attribute deve estar faltando.',
'missing_if' => 'O campo :attribute deve estar ausente quando :other for :value.',
'missing_unless' => 'O campo :attribute deve estar ausente, a menos que :other seja :value.',
'missing_with' => 'O campo :attribute deve estar ausente quando :values estiver presente.',
'missing_with_all' => 'O campo :attribute deve estar ausente quando :values estiverem presente.',
'multiple_of' => 'O campo :attribute deve ser um múltiplo de :value',
'not_in' => 'O campo :attribute selecionado é inválido.',
'not_regex' => 'O campo :attribute tem um formato inválido.',
Expand Down Expand Up @@ -141,6 +149,7 @@
'uploaded' => 'O campo :attribute falhou ao carregar.',
'uppercase' => 'O campo :attribute deve conter apenas caracteres maiúsculos.',
'url' => 'O campo :attribute deve ser uma URL válida.',
'ulid' => 'O campo :attribute deve ser um ULID válido.',
'uuid' => 'O campo :attribute deve ser um UUID válido.',

/*
Expand Down Expand Up @@ -183,7 +192,7 @@
'currency_code' => 'O campo :attribute deve ser um código de moeda válido.',
//'date' => 'O campo :attribute deve ser uma data válida.',
'date_time' => 'O campo :attribute deve ser uma data e hora válida.',
'decimal' => 'O campo :attribute deve ter :value decimais.',
//'decimal' => 'O campo :attribute deve ter :value decimais.',
'digit' => 'O campo :attribute deve conter apenas dígitos.',
'directory' => 'O campo :attribute deve ser um diretório.',
'domain' => 'O campo :attribute deve ser um domínio válido.',
Expand Down Expand Up @@ -257,7 +266,7 @@
'object_type' => 'O campo :attribute deve ser um objeto.',
'odd' => 'O campo :attribute deve ser um número impar.',
'one_of' => 'O campo :attribute deve passar em apenas uma validação.',
'optional' => 'O campo :attribute deve ser opcinal.',
'optional' => 'O campo :attribute deve ser opcinal.',
'perfect_square' => 'O campo :attribute deve ser um quadrado perfeito.',
'pesel' => 'O campo :attribute deve ser um PESEL válido.',
'phone' => 'O campo :attribute deve ser número de telefone válido.',
Expand Down
1 change: 0 additions & 1 deletion src/Http/Middleware/HttpsProtocolMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class HttpsProtocolMiddleware
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
Expand Down
2 changes: 1 addition & 1 deletion tests/CustomValuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class CustomValuesTest extends TestCase
{
protected function getEnvironmentSetUp($app)
protected function getEnvironmentSetUp($app): void
{
$app->config->set('utils', [
'model' => [
Expand Down
4 changes: 1 addition & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ abstract class TestCase extends AbstractPackageTestCase
{
/**
* Get the service provider class.
*
* @return string
*/
protected function getServiceProviderClass()
protected static function getServiceProviderClass(): string
{
return UtilsServiceProvider::class;
}
Expand Down

0 comments on commit ba371d8

Please sign in to comment.