Skip to content

Commit

Permalink
Merge pull request #959 from wirDesign-communication-AG/wip/php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
pmdevelopment authored Jun 18, 2024
2 parents e5e6731 + a8de622 commit 0d23e9e
Show file tree
Hide file tree
Showing 10 changed files with 3,989 additions and 352 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ jobs:
sudo mkdir /var/www/wirhub
sudo mv /home/runner/work/wirhub-app/wirhub-app/* /var/www/wirhub
sudo mv /home/runner/work/wirhub-app/wirhub-app/.env* /var/www/wirhub
sudo mv /home/runner/work/wirhub-app/wirhub-app/.php-* /var/www/wirhub
sudo chown -R www-data:www-data /var/www
- name: Composer install
run: sudo -u www-data composer install --prefer-dist --no-progress --no-scripts --working-dir /var/www/wirhub

- name: PHP CS Fixer
run: /var/www/wirhub/vendor/bin/php-cs-fixer check --stop-on-violation --config=/var/www/wirhub/.php-cs-fixer.dist.php

- name: Prepare symfony
run: |
sudo -u www-data composer install --prefer-dist --no-progress --no-scripts --working-dir /var/www/wirhub
sudo -u www-data composer dump-env test --working-dir /var/www/wirhub
sudo -u www-data php /var/www/wirhub/bin/console cache:clear
sudo -u www-data php /var/www/wirhub/bin/console assets:install public/
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@
!files/.gitkeep
/public/asset
/public/file
/tools/php-cs-fixer/vendor
/composer.phar
/composer
###< wirdesign-communication-ag/wirhub ###

/secret/*
/secret/*
###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###
41 changes: 41 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in([
__DIR__ . '/migrations',
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Command',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Component',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Controller',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/DataFixtures',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/DependencyInjection',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Domain',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Entity',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/EventListener',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/EventSubscriber',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Form',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Migrations',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Repository',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Router',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Security',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Services',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Tests',
__DIR__ . '/vendor/wirdesign-communication-ag/wirhub/Twig',
])
->exclude('var');

return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'phpdoc_to_comment' => [
'ignored_tags' => ['var']
],
])
->setFinder($finder)
->setLineEnding("\n");
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"symfony/framework-bundle": "6.4.*",
"symfony/runtime": "6.4.*",
"symfony/yaml": "6.4.*",
"wirdesign-communication-ag/wirhub": "^3.0.28"
"wirdesign-communication-ag/wirhub": "v3.0.29.x-dev"
},
"scripts": {
"auto-scripts": {
Expand All @@ -94,6 +94,7 @@
"ext-sqlite3": "*",
"dg/bypass-finals": "^1.4",
"doctrine/doctrine-fixtures-bundle": "^3.4",
"friendsofphp/php-cs-fixer": "^3.59",
"liip/test-fixtures-bundle": "^2.6",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5",
Expand Down
Loading

0 comments on commit 0d23e9e

Please sign in to comment.