-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add PHP CS Fixer code style configuration and make target, improve do…
…cumentation
- Loading branch information
Showing
15 changed files
with
207 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; top-most EditorConfig file | ||
root = true | ||
|
||
; Unix-style newlines | ||
[*] | ||
charset = utf-8 | ||
end_of_line = LF | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{php,html,twig}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.md] | ||
max_line_length = 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,3 +61,4 @@ jobs: | |
|
||
- name: Run tests | ||
run: make test-lowest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
if (!file_exists(__DIR__.'/src')) { | ||
exit(0); | ||
} | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@PHP71Migration' => true, | ||
'@PHPUnit75Migration:risky' => true, | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'protected_to_private' => false, | ||
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false], | ||
]) | ||
->setRiskyAllowed(true) | ||
->setFinder( | ||
(new PhpCsFixer\Finder()) | ||
->in(__DIR__.'/src') | ||
->notPath('#/Fixtures/#') | ||
->in(__DIR__.'/tests') | ||
->append([__FILE__]) | ||
) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
Getting Started With BreadcrumbTrailBundle | ||
========================================== | ||
|
||
This bundle provides a breacrumb trail service also known as breadcrumbs or Fil d'Ariane. | ||
Breadcrumbs can be defined with annotations, PHP and Twig. | ||
This bundle provides a breadcrumb trail service also known as breadcrumbs or Fil d'Ariane. | ||
Breadcrumbs can be defined with Attributes, annotations, PHP and Twig. | ||
|
||
## Installation | ||
|
||
Please follow the steps given in [installation.md](src/Resources/doc/installation.md) to install this bundle. | ||
|
||
## Summary | ||
## Bundle documentation | ||
|
||
- [Annotation configuration](src/Resources/doc/annotation_configuration.md) | ||
- [PHP configuration](src/Resources/doc/php_configuration.md) | ||
- [Twig configuration](src/Resources/doc/twig_configuration.md) | ||
- [Render the breadcrumb trail](src/Resources/doc/rendering.md) | ||
- [Override the template](src/Resources/doc/override_template.md) | ||
- [Annotation configuration](src/Resources/doc/annotation_configuration.md) | ||
- [PHP configuration](src/Resources/doc/php_configuration.md) | ||
- [Twig configuration](src/Resources/doc/twig_configuration.md) | ||
- [Render the breadcrumb trail](src/Resources/doc/rendering.md) | ||
- [Override the template](src/Resources/doc/override_template.md) | ||
|
||
## Tests | ||
|
||
Several make targets can get used to run the PHPUnit test suite on different PHP environments: | ||
|
||
``` | ||
$ make test | ||
$ make test-php73 | ||
$ make test-php74-lowest | ||
``` | ||
|
||
## Code style | ||
|
||
PHP-CS-Fixer is used to keep the code style in shape. There is a make target that uses Docker to fix | ||
the code style without having to install any other dependencies: | ||
|
||
``` | ||
$ make cs | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.