-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f514bb
commit 3f55425
Showing
8 changed files
with
198 additions
and
0 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,17 @@ | ||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
|
||
# markdown uses two trailing spaces for explicit line breaks | ||
[*.md] | ||
trim_trailing_whitespace = false |
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,7 @@ | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.php_cs.dist export-ignore | ||
.phpstan.neon export-ignore | ||
.phpunit.xml.dist export-ignore | ||
/Tests export-ignore |
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,22 @@ | ||
# PHPUnit | ||
/phpunit.xml | ||
.phpunit.result.cache | ||
|
||
# composer | ||
/composer.phar | ||
/composer.lock | ||
/auth.json | ||
/vendor | ||
|
||
# IDEs | ||
.idea/* | ||
*.iml | ||
*~ | ||
.php-version | ||
php.ini | ||
|
||
# System files | ||
.DS_Store | ||
|
||
# php-cs-fixer | ||
.php_cs.cache |
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,36 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->exclude(['var/cache']) | ||
->in(__DIR__); | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'ordered_imports' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'array_syntax' => ['syntax' => 'short'], | ||
'phpdoc_align' => false, | ||
'class_definition' => [ | ||
'multiLineExtendsEachSingleLine' => true, | ||
], | ||
'linebreak_after_opening_tag' => true, | ||
'declare_strict_types' => true, | ||
'mb_str_functions' => true, | ||
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], | ||
'no_php4_constructor' => true, | ||
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'php_unit_strict' => true, | ||
'phpdoc_order' => true, | ||
'semicolon_after_instruction' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'array_indentation' => true, | ||
'multiline_whitespace_before_semicolons' => true, | ||
]) | ||
->setFinder($finder); |
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,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace HandcraftedInTheAlps\Bundle\SuluResourceBundle; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class HandcraftedInTheAlpsSuluResourceBundle extends Bundle | ||
{ | ||
} |
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,64 @@ | ||
{ | ||
"name": "handcraftedinthealps/sulu-resource-bundle", | ||
"license": "MIT", | ||
"type": "sulu-bundle", | ||
"description": "Provide resource functionality for Sulu CMS.", | ||
"require": { | ||
"php": "^7.2", | ||
"symfony/http-kernel": "^4.3 || ^5.0" | ||
}, | ||
"require-dev": { | ||
"friendsofphp/php-cs-fixer": "^2.12", | ||
"handcraftedinthealps/code-coverage-checker": "^0.2.0", | ||
"jangregor/phpstan-prophecy": "^0.5.1", | ||
"phpstan/phpstan": "^0.12.1", | ||
"phpstan/phpstan-phpunit": "^0.12", | ||
"phpstan/phpstan-webmozart-assert": "^0.12.2", | ||
"sensiolabs-de/deptrac-shim": "^0.5.0", | ||
"symfony/monolog-bundle": "^3.1", | ||
"symfony/phpunit-bridge": "^4.3", | ||
"thecodingmachine/phpstan-strict-rules": "^0.12", | ||
"zendframework/zendsearch": "@dev" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"HandcraftedInTheAlps\\Bundle\\SuluResourceBundle\\": "" | ||
} | ||
}, | ||
"scripts": { | ||
"lint": [ | ||
"@lint-composer", | ||
"@php-cs", | ||
"@phpstan" | ||
], | ||
"test": "@phpunit", | ||
"lint-composer": "@composer validate", | ||
"phpstan": "vendor/bin/phpstan analyse", | ||
"php-cs": "vendor/bin/php-cs-fixer fix --verbose --diff --dry-run", | ||
"php-cs-fix": "vendor/bin/php-cs-fixer fix", | ||
"check-code-coverage": "vendor/bin/code-coverage-checker", | ||
"phpunit": "vendor/bin/simple-phpunit" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.0-dev" | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/luca-rath/messenger-utils" | ||
}, | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/luca-rath/model-utils" | ||
}, | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/luca-rath/testing-utils" | ||
} | ||
] | ||
} |
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 @@ | ||
includes: | ||
- vendor/jangregor/phpstan-prophecy/src/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/rules.neon | ||
- vendor/phpstan/phpstan-webmozart-assert/extension.neon | ||
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon | ||
|
||
parameters: | ||
paths: | ||
- . | ||
level: max | ||
excludes_analyse: | ||
- %currentWorkingDirectory%/DependencyInjection/Configuration.php | ||
- %currentWorkingDirectory%/vendor/* | ||
- %currentWorkingDirectory%/Tests/Application/var* | ||
- %currentWorkingDirectory%/Tests/coverage-checker.php |
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,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit colors="true" bootstrap="vendor/autoload.php"> | ||
<testsuites> | ||
<testsuite name="Bundle"> | ||
<directory>./Tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory>.</directory> | ||
<exclude> | ||
<directory>Resources/</directory> | ||
<directory>Tests/</directory> | ||
<directory>vendor/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
|
||
<php> | ||
<server name="SYMFONY_PHPUNIT_VERSION" value="8"/> | ||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/> | ||
<server name="SYMFONY_PHPUNIT_REMOVE" value="symfony/yaml"/> | ||
</php> | ||
</phpunit> |