-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
24 changed files
with
401 additions
and
363 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,29 @@ | ||
* text=auto | ||
|
||
/.docker export-ignore | ||
/config.subsplit-publish.json export-ignore | ||
/.editorconfig export-ignore | ||
/.php-cs-fixer.dist.php export-ignore | ||
/phpstan.neon export-ignore | ||
/phpunit.php export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/.travis.yml export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/CHANGELOG.md export-ignore | ||
/CODE_OF_CONDUCT.md export-ignore | ||
/deprecations.md export-ignore | ||
/docker-composer.yml export-ignore | ||
/README.md export-ignore | ||
/CODE_OF_CONDUCT.md export-ignore | ||
/.github export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/bin/ export-ignore | ||
/mocked-functions.php export-ignore | ||
/test_files/ export-ignore | ||
/Tests export-ignore | ||
/**/*Test.php export-ignore | ||
/**/*Stub.php export-ignore | ||
/**/Stub*.php export-ignore | ||
Dockerfile export-ignore | ||
Docker-compose.yaml 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,51 @@ | ||
name: Coverage-badge | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Generate Coverage Badge | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- name: composer | ||
uses: php-actions/composer@v6 | ||
with: | ||
php_version: 8.2 | ||
php_extensions: xdebug gd | ||
|
||
- name: PHPUnit Tests | ||
uses: php-actions/phpunit@v3 | ||
with: | ||
version: 10.2 | ||
php_version: 8.2 | ||
php_extensions: xdebug gd | ||
bootstrap: vendor/autoload.php | ||
configuration: phpunit.xml.dist | ||
args: --coverage-clover coverage.xml | ||
env: | ||
XDEBUG_MODE: coverage | ||
|
||
|
||
- name: Generate PHPUnit coverage badge | ||
uses: timkrase/phpunit-coverage-badge@v1.2.0 | ||
with: | ||
report: 'coverage.xml' | ||
coverage_badge_path: 'plugin/.coverage/badge.svg' | ||
|
||
- name: Commit PHPUnit coverage badge | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: 'badge.svg' | ||
cwd: './plugin/.coverage' | ||
message: 'Update PHPUnit coverage badge' | ||
new_branch: develop |
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,42 @@ | ||
name: CI-coverage | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
jobs: | ||
test: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ ubuntu-latest ] | ||
php-versions: [ '8.1', '8.2' ] | ||
php-unit-versions: [ '9.5', '10.2' ] | ||
symfony-versions: [ '6.1', '6.3' ] | ||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} - PHPUnit ${{ matrix.php-unit-versions }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ matrix.symfony-versions }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- name: Install Symfony | ||
run: composer require symfony/framework-bundle:${{ matrix.symfony-versions }} | ||
|
||
- name: composer | ||
uses: php-actions/composer@v6 | ||
with: | ||
php_version: ${{ matrix.php-versions }} | ||
php_extensions: xdebug gd | ||
|
||
- name: PHPUnit Tests | ||
uses: php-actions/phpunit@v3 | ||
with: | ||
version: ${{ matrix.php-unit-versions }} | ||
php_version: ${{ matrix.php-versions }} | ||
php_extensions: xdebug gd | ||
bootstrap: vendor/autoload.php | ||
configuration: phpunit.xml.dist |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
{"php":"8.2.5","version":"3.15.0","indent":" ","lineEnding":"\n","rules":{"full_opening_tag":true,"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":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_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"array_syntax":{"syntax":"short"},"class_attributes_separation":{"elements":{"method":"one","property":"one","trait_import":"one"}}},"hashes":{"src\/Twig\/WebPConversionExtension.php":"5b27e61c20b71ac1ad4b51d03be8578a","src\/WebPConversionBundle.php":"f67051d8b195c82d4053058e4c2ed2c0","src\/DependencyInjection\/Configuration.php":"d2a31e6b9d27855c295f7acc4222aa43","src\/DependencyInjection\/WebPConversionExtension.php":"7026ed23d01d3d9f8e64251d80954d09","src\/Tests\/Test.php":"020eade5bff4c08cd65bf135da69d404","src\/Tests\/TestKernel.php":"7c0a0bd721e3594b5b8987ede896d03f","src\/Traits\/ConvertibleImageTrait.php":"eb95b8c03eb94f3b1d1bfaea1712169b","src\/Model\/Image.php":"8068c3e54387784f49d4eaab77ce4a13","src\/Model\/WebPInformation.php":"8b9bb970c727d110a83abbac28c23345","src\/WebPConversion.php":"02ca14bcda5814580195cf9e5492d222","src\/Service\/ImageConverter.php":"fd779fc8ad26ba859e184c8bd45d11a7","src\/Service\/ImageUploadHelper.php":"34cd835d0b0f9133d6d304b058d6f695","src\/Command\/WebPConversionCommand.php":"c317b3d7d47d8504237d5a7d4a5d9de6"}} |
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 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__ . '/src'); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
return $config->setRules([ | ||
'full_opening_tag' => false, | ||
'@PSR12' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'yoda_style' => false, | ||
'class_attributes_separation' => [ | ||
'elements' => ['method' => 'one', 'property' => 'one', 'trait_import' => 'one'] | ||
] | ||
]) | ||
->setFinder($finder); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
services: | ||
# Command | ||
CodeBuds\WebPConversionBundle\Command\WebPConversionCommand: | ||
public: true | ||
arguments: | ||
- '%webp_conversion.quality%' | ||
- '%kernel.project_dir%' | ||
tags: | ||
- { name: 'console.command', command: 'codebuds:webp:convert', alias: 'webp:conv' } | ||
|
||
# Twig Extension | ||
CodeBuds\WebPConversionBundle\Twig\WebPConversionExtension: | ||
public: true | ||
arguments: | ||
- '%webp_conversion.quality%' | ||
- '%kernel.project_dir%' | ||
tags: | ||
- { name: 'twig.extension', alias: 'codebuds' } | ||
|
||
# Bundle Extension | ||
CodeBuds\WebPConversionBundle\WebPConversion: | ||
public: true | ||
arguments: | ||
- '%webp_conversion.quality%' | ||
- 'CodeBuds\WebPConversionBundle\Service\ImageConverter' | ||
|
||
# Services | ||
CodeBuds\WebPConversionBundle\Service\ImageConverter: | ||
public: true | ||
|
||
CodeBuds\WebPConversionBundle\Service\ImageUploadHelper: | ||
public: true | ||
arguments: | ||
- '%webp_conversion.upload_path%' | ||
- '%kernel.project_dir%' | ||
|
||
# Traits | ||
CodeBuds\WebPConversionBundle\Traits\ConvertibleImageTrait: | ||
public: true |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; | ||
use Rector\Config\RectorConfig; | ||
use Rector\Set\ValueObject\LevelSetList; | ||
use Rector\Symfony\Set\SymfonySetList; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->paths([ | ||
__DIR__ . '/src', | ||
]); | ||
|
||
// register a single rule | ||
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); | ||
|
||
// define sets of rules | ||
$rectorConfig->sets([ | ||
SymfonySetList::SYMFONY_61, | ||
LevelSetList::UP_TO_PHP_81, | ||
]); | ||
}; |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.