Skip to content

Commit

Permalink
Update README, update cs fixer rules
Browse files Browse the repository at this point in the history
  • Loading branch information
babenkoivan committed Jul 5, 2021
1 parent 449e616 commit e86d7ea
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'dir_constant' => true,
'final_static_access' => false,
'self_static_accessor' => false,
'fully_qualified_strict_types' => true,
'function_to_constant' => true,
'function_typehint_space' => true,
Expand Down Expand Up @@ -76,7 +76,7 @@
'ternary_to_null_coalescing' => true,
'trim_array_spaces' => true,
'array_indentation' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => true,
'visibility_required' => true,
'yoda_style' => false,
]);
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test: ## Run tests

coverage: ## Run tests and generate the code coverage report
@printf "\033[93m→ Running tests and generating the code coverage report\033[0m\n"
@bin/phpunit --testdox --coverage-text
@XDEBUG_MODE=coverage bin/phpunit --testdox --coverage-text
@printf "\n\033[92m✔︎ Tests are completed and the report is generated\033[0m\n"

style-check: ## Check the code style
Expand All @@ -19,7 +19,7 @@ style-check: ## Check the code style

static-analysis: ## Do static code analysis
@printf "\033[93m→ Analysing the code\033[0m\n"
@bin/phpstan analyse
@php -d memory_limit=-1 bin/phpstan analyse
@printf "\n\033[92m✔︎ Code static analysis is completed\033[0m\n"

help: ## Show help
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,18 @@ php artisan elastic:migrate:reset

## Starting Over

Sometimes you just want to start over and rollback all the changes to migrate them again immediately:
Sometimes you just want to start over, rollback all the changes and apply them again:

```bash
php artisan elastic:migrate:refresh
```

Alternatively you can also drop all existing indices and rerun the migrations:

```bash
php artisan elastic:migrate:fresh
```

## Migration Status

You can always check which files have been already migrated and what can be reverted by the `elastic:migrate:rollback` command (the last batch):
Expand Down
15 changes: 9 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.4/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
executionOrder="depends,defects"
forceCoversAnnotation="true"
Expand All @@ -9,6 +9,14 @@
beStrictAboutTodoAnnotatedTests="true"
verbose="true"
colors="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<file>src/ServiceProvider.php</file>
</exclude>
</coverage>
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">tests/Unit</directory>
Expand All @@ -17,11 +25,6 @@
<directory suffix="Test.php">tests/Integration</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="DB_CONNECTION" value="testing"/>
Expand Down

0 comments on commit e86d7ea

Please sign in to comment.