Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync #117

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

sync #117

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9bc3d02
wip
blessingdube Dec 19, 2021
f4e3ef1
add php-cs-fixer config
blessingdube Dec 19, 2021
1e91c52
Fix styling
blessingdube Dec 19, 2021
efbd29d
wip
blessingdube Dec 19, 2021
9f77449
Merge remote-tracking branch 'origin/feature/adding-support-for-larav…
blessingdube Dec 19, 2021
ef980ca
Fix styling
blessingdube Dec 19, 2021
5ccfc5d
wip on fixing tests
blessingdube Dec 19, 2021
9e57437
Merge remote-tracking branch 'origin/feature/adding-support-for-larav…
blessingdube Dec 19, 2021
32ee2c6
Fix styling
blessingdube Dec 19, 2021
9460345
Only support Laravel 6, 7 and 8
blessingdube Dec 20, 2021
c214f0b
Fix styling
blessingdube Dec 20, 2021
6aed985
Update README.md
blessingdube Dec 20, 2021
6c61742
Merge pull request #1 from oss-tools/feature/adding-support-for-larav…
blessingdube Dec 20, 2021
25a72f2
remove update-changelog from workflows
blessingdube Dec 20, 2021
b5a06bf
add Laravel v9 support
blessingdube Mar 11, 2022
b6aabdd
Fix styling
blessingdube Mar 11, 2022
a20ad51
upgrade to Laravel 10
blessingdube Jul 24, 2023
62681fa
Fix styling
blessingdube Jul 24, 2023
be1fcb7
update run-tests.yml
blessingdube Jul 24, 2023
811d49c
Fix Laravel FileSystem dependency
blessingdube Jul 28, 2023
7724c6d
rector auto upgrade to 7.4
parsingeye Jan 21, 2022
7a74621
Laravel 10 compatibility
Hernan-Aranda-Prado Jan 26, 2024
0f4f23c
Laravel 10 compatibility
Hernan-Aranda-Prado Jan 26, 2024
2375821
Laravel 10 compatibility
Hernan-Aranda-Prado Jan 26, 2024
6b77cce
Laravel 10 compatibility
Hernan-Aranda-Prado Jan 26, 2024
e50e4f1
Fix styling
Hernan-Aranda-Prado Jan 26, 2024
0697dc3
Merge pull request #1 from mrge-group/laravel10_compatibility
Hernan-Aranda-Prado Jan 26, 2024
fbd6d6c
sync
Hernan-Aranda-Prado Jan 29, 2024
c7f31de
Fix styling
Hernan-Aranda-Prado Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check & fix styling

on: [push]

jobs:
php-cs-fixer:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs.dist.php --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
38 changes: 38 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: run-tests

on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1]
laravel: [10.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*

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

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

- name: Setup PHP
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
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: vendor/bin/phpunit
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/vendor
composer.phar
composer.lock

.idea/

.phpunit.result.cache
1 change: 1 addition & 0 deletions .php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"8.3.2","version":"3.48.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces_position":true,"class_definition":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sort_algorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}},"single_trait_insert_per_statement":true},"hashes":{"src\/Commands\/TransCommand.php":"f191d9809cd62711455870a7a5eba941","src\/Commands\/MissingCommand.php":"41b19031948fb4d35a9b914672795c32","src\/Commands\/RenameCommand.php":"2a861f52f926f5102d727a4fa899a190","src\/Commands\/ShowCommand.php":"a30aa8330a1f2129ed40f2ebd70b5ec3","src\/Commands\/FindCommand.php":"18b55503c0f8f7aadb52536dad53c716","src\/Commands\/SyncCommand.php":"1d6bde99dd25e746773a2ff4557286b2","src\/Commands\/RemoveCommand.php":"7fba053fee8b906bde17b296df34f2ff","src\/Manager.php":"d386a53b1219f38df326e2fb715bba4a","src\/LangmanServiceProvider.php":"addecf1c3978d49df3d57d8dfcabbf9a","tests\/ManagerTest.php":"80e6d703f929766c4cfe3aa29b946164","tests\/TestCase.php":"8e14293c7476b657d004956670a8dc0a","tests\/ShowCommandTest.php":"13cbe9ab443c441595fcf9d43c5f4ded","tests\/TransCommandTest.php":"1c4c20646cdf48f63cdd978aa56a594b","tests\/MissingCommandTest.php":"87a5ad2a51870949d56b74d64aaeaa6d","tests\/RemoveCommandTest.php":"695a9e3437fa3f823319b70dbea13b28","tests\/SyncCommandTest.php":"47fa049682d1652c0c8c675872a35379","tests\/Kernel.php":"05fed58b10f49d4ce757b78bf2e05288","tests\/FindCommandTest.php":"3c00233b198b6891b55b562c826a11c8","tests\/RenameCommandTest.php":"b695a36433c86ba0dfb3b2c681189414"}}
40 changes: 40 additions & 0 deletions .php_cs.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'single_trait_insert_per_statement' => true,
])
->setFinder($finder);
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion src/Commands/FindCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Illuminate\Console\Command;
use Illuminate\Support\Arr;
use Themsaid\Langman\Manager;
use Illuminate\Support\Str;

class FindCommand extends Command
{
Expand Down
3 changes: 2 additions & 1 deletion src/Commands/MissingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ private function collectValues(array $missing)

foreach ($missing as $missingKey) {
$values[$missingKey] = $this->ask(
"<fg=yellow>{$missingKey}</> translation", $this->getDefaultValue($missingKey)
"<fg=yellow>{$missingKey}</> translation",
$this->getDefaultValue($missingKey)
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/LangmanServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Themsaid\Langman;

use Illuminate\Support\ServiceProvider;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\ServiceProvider;

class LangmanServiceProvider extends ServiceProvider
{
Expand Down
2 changes: 1 addition & 1 deletion tests/MissingCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Themsaid\Langman\Manager;
use Mockery as m;
use Themsaid\Langman\Manager;

class MissingCommandTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/RemoveCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Themsaid\Langman\Manager;
use Mockery as m;
use Themsaid\Langman\Manager;

class RemoveCommandTest extends TestCase
{
Expand Down