Skip to content

Commit

Permalink
Merge pull request #44 from Runroom/feature/add-linter-checks
Browse files Browse the repository at this point in the history
Add linter checks
  • Loading branch information
jordisala1991 committed Mar 1, 2022
2 parents 0e1d384 + a5745d1 commit f37debb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -1,4 +1,5 @@
.* export-ignore
*.md export-ignore
bin export-ignore
tests export-ignore
docs export-ignore
4 changes: 4 additions & 0 deletions .github/workflows/qa.yaml
Expand Up @@ -25,3 +25,7 @@ jobs:
- run: composer psalm -- --php-version=${{ matrix.php }} --threads=$(nproc) --output-format=github --shepherd
- run: composer normalize --no-check-lock --no-update-lock --dry-run --diff
- run: composer validate --strict
- run: bin/console lint:container
- run: bin/console lint:twig src
- run: bin/console lint:xliff src
- run: bin/console lint:yaml src
29 changes: 29 additions & 0 deletions bin/console
@@ -0,0 +1,29 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

/*
* This file is part of the Runroom package.
*
* (c) Runroom <runroom@runroom.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

use Runroom\SamplesBundle\Tests\App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;

if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the ' . PHP_SAPI . ' SAPI' . PHP_EOL;
}

set_time_limit(0);

require dirname(__DIR__) . '/vendor/autoload.php';

$kernel = new Kernel('test', false);
$application = new Application($kernel);
$application->run(new ArgvInput());
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -28,6 +28,7 @@
"runroom-packages/form-handler-bundle": "^0.15",
"runroom-packages/render-event-bundle": "^0.15",
"runroom-packages/sortable-behavior-bundle": "^0.15",
"runroom-packages/translation-bundle": "^0.15",
"sonata-project/admin-bundle": "^3.103 || ^4.9",
"sonata-project/doctrine-extensions": "^1.13",
"sonata-project/doctrine-orm-admin-bundle": "^3.34 || ^4.0",
Expand Down
3 changes: 3 additions & 0 deletions tests/App/Kernel.php
Expand Up @@ -24,6 +24,7 @@
use Runroom\SamplesBundle\RunroomSamplesBundle;
use Runroom\SamplesBundle\Tests\App\Entity\Media;
use Runroom\SortableBehaviorBundle\RunroomSortableBehaviorBundle;
use Runroom\TranslationBundle\RunroomTranslationBundle;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
Expand Down Expand Up @@ -63,6 +64,8 @@ public function registerBundles(): iterable
new RunroomFormHandlerBundle(),
new RunroomRenderEventBundle(),
new RunroomSortableBehaviorBundle(),
new RunroomTranslationBundle(),

new RunroomSamplesBundle(),
];
}
Expand Down

0 comments on commit f37debb

Please sign in to comment.