Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/symfony.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php-versions: ['8.2', '8.3']
php-versions: ['8.3']
runs-on: ubuntu-latest

# Setup ————————————————————————————————————————————————————————————————
Expand Down Expand Up @@ -122,5 +122,7 @@ jobs:
run: castor lint:php
- name: PHPStan static analysis
run: castor stan
- name: Lint Twig templates with twigstan
run: castor lint:twigstan

# The end. 🙃
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@
.phpunit.result.cache
.phpunit.cache
###< phpunit/phpunit ###

###> twigstan/twigstan ###
.twigstan
###< twigstan/twigstan ###
Comment thread
COil marked this conversation as resolved.
11 changes: 10 additions & 1 deletion castor.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ function lint_twig(): int
return exit_code('bin/console lint:twig templates/');
}

#[AsTask(name: 'twigstan', namespace: 'lint', description: 'Lint Twig files with twigstan', aliases: ['lint-twigstan'])]
function lint_twigstan(): int
{
title('lint:twigstan');

return exit_code('vendor/bin/twigstan');
}

#[AsTask(name: 'yaml', namespace: 'lint', description: 'Lint Yaml files', aliases: ['lint-yaml'])]
function lint_yaml(): int
{
Expand All @@ -220,7 +228,8 @@ function lint_all(): int
$ec1 = lint_php();
$ec2 = lint_container();
$ec3 = lint_twig();
$ec4 = lint_yaml();
$ec4 = lint_twigstan();
$ec5 = lint_yaml();

return success($ec1 + $ec2 + $ec3 + $ec4);

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-symfony": "^2.0",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^11.0",
"roave/security-advisories": "dev-latest",
"symfony/browser-kit": "~7.1.0",
"symfony/css-selector": "~7.1.0",
"symfony/maker-bundle": "^1.61",
"symfony/requirements-checker": "^2.0",
"symfony/stopwatch": "~7.1.0",
"symfony/web-profiler-bundle": "~7.1.0"
"symfony/web-profiler-bundle": "~7.1.0",
"twigstan/twigstan": "dev-main"
},
"replace": {
"symfony/polyfill-ctype": "*",
Expand Down
Loading