Skip to content

Commit

Permalink
feat(runners): added symfony/requirements-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
COil committed Nov 28, 2023
1 parent 94f3132 commit 28bcee1
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SHELL = sh
help: ## Outputs this help screen
@grep -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
.PHONY: help start stop go-prod go-dev purge test coverage cov-report stan fix-php lint-php lint-container lint-twig lint-yaml cs lint ci deploy
.PHONY: version-php version-composer version-symfony version-phpunit version-phpstan version-php-cs-fixer
.PHONY: version-php version-composer version-symfony version-phpunit version-phpstan version-php-cs-fixer check-requirements

## —— Symfony binary 💻 ————————————————————————————————————————————————————————
start: ## Serve the application with the Symfony binary
Expand Down Expand Up @@ -93,6 +93,9 @@ version-php-cs-fixer:
@vendor/bin/php-cs-fixer --version
@echo

check-requirements: ## Checks requirements for running Symfony
@vendor/bin/requirements-checker


## —— Deploy & Prod 🚀 —————————————————————————————————————————————————————————
deploy: ## Simple manual deploy on VPS (this is to update the demo site https://microsymfony.ovh/)
Expand Down
8 changes: 8 additions & 0 deletions castor.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,11 @@ function versions(): void

success();
}

#[AsTask(name: 'check-requirements', namespace: 'helpers', description: 'Checks requirements for running Symfony')]
function check_requirements(): void
{
title(__FUNCTION__, get_command());
run('vendor/bin/requirements-checker', quiet: false);
success();
}
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"symfony/browser-kit": "~6.3.0",
"symfony/css-selector": "~6.3.0",
"symfony/phpunit-bridge": "^6.3",
"symfony/requirements-checker": "^2.0",
"symfony/stopwatch": "6.3.*",
"symfony/web-profiler-bundle": "6.3.*"
},
Expand Down Expand Up @@ -103,7 +104,8 @@
],
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"requirements-checker": "script"
}
},
"scripts-descriptions": {
Expand Down
70 changes: 68 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@
"tests/bootstrap.php"
]
},
"symfony/requirements-checker": {
"version": "2.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "2.0",
"ref": "02c6e4b9b117c39e8a23eab7f3840ef6e62293b9"
}
},
"symfony/routing": {
"version": "6.2",
"recipe": {
Expand Down

0 comments on commit 28bcee1

Please sign in to comment.