Skip to content

Commit

Permalink
Merge pull request #74 from akeneo/fix-symfony7-compatibility
Browse files Browse the repository at this point in the history
Fix symfony 7 compatibility
  • Loading branch information
MathChevalier authored Jan 23, 2025
2 parents c4568a3 + 7c02ff0 commit ebc6e64
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.PHONY: test

DOCKER_RUN = docker-compose run --rm php
DOCKER_COMPOSE = docker compose
DOCKER_RUN = $(DOCKER_COMPOSE) run --rm php

install:
$(DOCKER_COMPOSE) build --no-cache
${MAKE} vendor -B

vendor:
${DOCKER_RUN} composer install --no-interaction
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ You can develop out of the box thanks to the provided `docker-compose.yml` and `
To install the app:

```bash
$ make install
$ make vendor
```

Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
version: '3'

services:
php:
build:
context: .
image: php:8.1-cli
container_name: coupling_detector
volumes:
- ./:/opt/app
- '${HOST_COMPOSER_CACHE_DIR:-~/.cache/composer}:/home/composer/.cache/composer'
- '${HOST_COMPOSER_HOME:-~/.config/composer}:/home/composer/.config/composer'
working_dir: /opt/app
10 changes: 3 additions & 7 deletions src/Console/Command/DetectCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function configure()
/**
* {@inheritedDoc}.
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->setFormatter(new OutputFormatter($output->isDecorated()));

Expand Down Expand Up @@ -115,10 +115,8 @@ protected function execute(InputInterface $input, OutputInterface $output)

/**
* @param ViolationInterface[] $violations
*
* @return int
*/
private function determineExitCode(array $violations)
private function determineExitCode(array $violations): int
{
if (0 === count($violations)) {
return 0;
Expand All @@ -137,10 +135,8 @@ private function determineExitCode(array $violations)

/**
* @param string $filePath
*
* @return Configuration
*/
private function loadConfiguration($filePath)
private function loadConfiguration($filePath): Configuration
{
if (!is_file($filePath)) {
throw new \InvalidArgumentException(sprintf('The configuration file "%s" does not exit', $filePath));
Expand Down

0 comments on commit ebc6e64

Please sign in to comment.