Skip to content

Commit

Permalink
Merge pull request #337 from jolicode/build/upgrade-deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
pyrech authored Dec 26, 2024
2 parents 857a26a + 5e3763a commit e3776c0
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 118 deletions.
12 changes: 8 additions & 4 deletions .castor/qa.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace qa;

// use Castor\Attribute\AsRawTokens;
use Castor\Attribute\AsTask;

use function Castor\io;
Expand Down Expand Up @@ -29,19 +30,22 @@ function install(): void
docker_compose_run('composer install -o', workDir: '/var/www/tools/phpstan');
}

#[AsTask(description: 'Update tooling')]
#[AsTask(description: 'Updates tooling')]
function update(): void
{
io()->title('Update QA tooling');
io()->title('Updating 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');
}

// /**
// * @param string[] $rawTokens
// */
// #[AsTask(description: 'Runs PHPUnit', aliases: ['phpunit'])]
// function phpunit(): int
// function phpunit(#[AsRawTokens] array $rawTokens = []): int
// {
// return docker_exit_code('phpunit');
// return docker_exit_code('bin/phpunit ' . implode(' ', $rawTokens));
// }

#[AsTask(description: 'Runs PHPStan', aliases: ['phpstan'])]
Expand Down
12 changes: 6 additions & 6 deletions README.dist.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A Docker environment is provided and requires you to have these tools available:

#### Castor

Once castor is installed, in order to improve your usage of castor scripts, you
Once `castor` is installed, in order to improve your usage of `castor` scripts, you
can install console autocompletion script.

If you are using bash:
Expand All @@ -24,7 +24,7 @@ castor completion | sudo tee /etc/bash_completion.d/castor
If you are using something else, please refer to your shell documentation. You
may need to use `castor completion > /to/somewhere`.

Castor supports completion for `bash`, `zsh` & `fish` shells.
`castor` supports completion for `bash`, `zsh` & `fish` shells.

### Docker environment

Expand Down Expand Up @@ -63,8 +63,8 @@ castor start
> [!NOTE]
> the first start of the stack should take a few minutes.
The site is now accessible at the hostnames your have configured over HTTPS
(you may need to accept self-signed SSL certificate if you do not have mkcert
The site is now accessible at the hostnames you have configured over HTTPS
(you may need to accept self-signed SSL certificate if you do not have `mkcert`
installed on your computer - see below).

### SSL certificates
Expand All @@ -75,11 +75,11 @@ you run `castor docker:generate-certificates`.

If you have `mkcert` installed on your computer, it will be used to generate
locally trusted certificates. See [`mkcert` documentation](https://github.com/FiloSottile/mkcert#installation)
to understand how to install it. Do not forget to install CA root from mkcert
to understand how to install it. Do not forget to install CA root from `mkcert`
by running `mkcert -install`.

If you don't have `mkcert`, then self-signed certificates will instead be
generated with openssl. You can configure [infrastructure/docker/services/router/openssl.cnf](infrastructure/docker/services/router/openssl.cnf)
generated with `openssl`. You can configure [infrastructure/docker/services/router/openssl.cnf](infrastructure/docker/services/router/openssl.cnf)
to tweak certificates.

You can run `castor docker:generate-certificates --force` to recreate new certificates
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/docker/services/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hadolint global ignore=DL3008

FROM debian:12.6-slim AS php-base
FROM debian:12.8-slim AS php-base

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand Down Expand Up @@ -115,7 +115,7 @@ RUN adduser app sudo \
&& phpenmod app-builder

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

Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ parameters:
inferPrivatePropertyTypeFromConstructor: true

# symfony:
# container_xml_path: 'application/var/cache/dev/App_KernelDevDebugContainer.xml'
# containerXmlPath: 'application/var/cache/dev/App_KernelDevDebugContainer.xml'

typeAliases:
ContextData: '''
Expand Down
2 changes: 1 addition & 1 deletion tools/php-cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "project",
"require": {
"friendsofphp/php-cs-fixer": "^3.64.0"
"friendsofphp/php-cs-fixer": "^3.65.0"
},
"config": {
"platform": {
Expand Down
Loading

0 comments on commit e3776c0

Please sign in to comment.