Skip to content

Commit

Permalink
Update composer and leverage bump-after-update option
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Nov 4, 2024
1 parent 8833dae commit aac8856
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 167 deletions.
9 changes: 9 additions & 0 deletions .castor/qa.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ function install(): void
docker_compose_run('composer install -o', workDir: '/var/www/tools/phpstan');
}

#[AsTask(description: 'Update tooling')]
function update(): void
{
io()->title('Update QA tooling');

docker_compose_run('composer update -o', workDir: '/var/www/tools/php-cs-fixer');
docker_compose_run('composer update -o', workDir: '/var/www/tools/phpstan');
}

// #[AsTask(description: 'Runs PHPUnit', aliases: ['phpunit'])]
// function phpunit(): int
// {
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/docker/services/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ RUN adduser app sudo \
&& phpenmod app-builder

# Composer
COPY --from=composer/composer:2.7.7 /usr/bin/composer /usr/bin/composer
COPY --from=composer/composer:2.8.2 /usr/bin/composer /usr/bin/composer
RUN mkdir -p "/home/app/.composer/cache" \
&& chown app: /home/app/.composer -R

Expand Down
3 changes: 2 additions & 1 deletion tools/php-cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"type": "project",
"require": {
"friendsofphp/php-cs-fixer": "^3.59.3"
"friendsofphp/php-cs-fixer": "^3.64.0"
},
"config": {
"platform": {
"php": "8.1"
},
"bump-after-update": true,
"sort-packages": true
}
}
Loading

0 comments on commit aac8856

Please sign in to comment.