Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into ci/markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Nov 22, 2023
2 parents 870243e + b17f5ee commit c569230
Show file tree
Hide file tree
Showing 67 changed files with 967 additions and 869 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1-cli-alpine
FROM php:8.2-cli-alpine

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions zlib phar sodium tokenizer filter
Expand Down
8 changes: 4 additions & 4 deletions .docker/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ if [[ "$(docker images -q ghcr.io/box-project/box_php725 2> /dev/null)" == "" ]]
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php725 --file "${SCRIPT_DIR}/php725" .
fi

if [[ "$(docker images -q ghcr.io/box-project/box_php81 2> /dev/null)" == "" ]]; then
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php81 --file "${SCRIPT_DIR}/php81" .
if [[ "$(docker images -q ghcr.io/box-project/box_php82 2> /dev/null)" == "" ]]; then
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php82 --file "${SCRIPT_DIR}/php82" .
fi

if [[ "$(docker images -q ghcr.io/box-project/box_php81_xdebug 2> /dev/null)" == "" ]]; then
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php81_xdebug --file "${SCRIPT_DIR}/php81_xdebug" .
if [[ "$(docker images -q ghcr.io/box-project/box_php82_xdebug 2> /dev/null)" == "" ]]; then
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php82_xdebug --file "${SCRIPT_DIR}/php82_xdebug" .
fi
2 changes: 1 addition & 1 deletion .docker/php81 → .docker/php82
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1-cli
FROM php:8.2-cli

RUN echo '' | \
apt-get -y update; \
Expand Down
4 changes: 2 additions & 2 deletions .docker/php81_build_phar → .docker/php82_build_phar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1-cli-alpine as build-stage
FROM php:8.2-cli-alpine as build-stage

RUN apk add --update make git

Expand All @@ -10,7 +10,7 @@ ADD . /opt/box-project/box
RUN cd /opt/box-project/box && \
make compile

FROM php:8.1-cli-alpine
FROM php:8.2-cli-alpine

COPY --from=build-stage /opt/box-project/box/bin/box.phar /usr/bin/box

Expand Down
2 changes: 1 addition & 1 deletion .docker/php81_xdebug → .docker/php82_xdebug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1-cli
FROM php:8.2-cli

RUN echo '' | \
apt-get -y update; \
Expand Down
15 changes: 14 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
directory: "."
schedule:
interval: "weekly"
groups:
dependencies:
patterns:
- "*"

- package-ecosystem: "composer"
directory: "requirement-checker"
schedule:
interval: "weekly"
groups:
Expand All @@ -13,3 +22,7 @@ updates:
directory: ".github/workflows"
schedule:
interval: "weekly"
groups:
dependencies:
patterns:
- "*"
8 changes: 4 additions & 4 deletions .github/workflows/auto-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer
coverage: none

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer
coverage: none

Expand All @@ -73,7 +73,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer
coverage: none

Expand All @@ -95,7 +95,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer
coverage: none

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ jobs:
- name: PHP 7.2.5
docker-file: .docker/php725
image-tag: ghcr.io/box-project/box_php725
- name: PHP 8.1
docker-file: .docker/php81
image-tag: ghcr.io/box-project/box_php81
- name: PHP 8.1 (Xdebug)
docker-file: .docker/php81_xdebug
image-tag: ghcr.io/box-project/box_php81_xdebug
- name: PHP 8.2
docker-file: .docker/php82
image-tag: ghcr.io/box-project/box_php82
- name: PHP 8.2 (Xdebug)
docker-file: .docker/php82_xdebug
image-tag: ghcr.io/box-project/box_php82_xdebug
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- e2e_dockerfile_no_extension
- e2e_custom_composer_bin
- e2e_reproducible_build
php: [ '8.1', '8.2', '8.3' ]
php: [ '8.2', '8.3' ]
tools:
- 'composer:2.2'
- 'composer:2.3'
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
ini-values: phar.readonly=0, display_errors=On, error_reporting=-1
tools: composer
coverage: pcov
Expand Down Expand Up @@ -181,8 +181,8 @@ jobs:

- name: Pull the docker image
run: |
docker pull ghcr.io/box-project/box_php81
docker pull ghcr.io/box-project/box_php81_xdebug
docker pull ghcr.io/box-project/box_php82
docker pull ghcr.io/box-project/box_php82_xdebug
- run: make ${{ matrix.e2e }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.8'

Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
ini-values: phar.readonly=0
tools: composer
coverage: none
Expand All @@ -56,7 +56,7 @@ jobs:

- name: Import GPG key
if: github.event_name == 'release'
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_KEY_41539BBD4020945DB378F98B2DF45277AEF09A2F }}
passphrase: ${{ secrets.GPG_KEY_41539BBD4020945DB378F98B2DF45277AEF09A2F_PASSPHRASE }}
Expand Down Expand Up @@ -86,6 +86,8 @@ jobs:
needs:
- build-phar
if: github.event_name == 'release'
permissions:
contents: write
steps:
- uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -127,6 +129,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- uses: actions/download-artifact@v3
with:
name: box-phar
Expand All @@ -141,10 +148,10 @@ jobs:
./bin/box.phar --ansi --version
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to Docker Container Registry
if: github.event_name == 'release'
Expand Down
31 changes: 15 additions & 16 deletions .github/workflows/requirement-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer
coverage: none

Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer
coverage: none

Expand All @@ -93,19 +93,16 @@ jobs:
# The lowest dependency is tested via an e2e test rather than by executing the tests like so.
# The reason being using tools such as PHPUnit for a version as low as the lowest supported version
# is a serious strain for close to no benefits: the e2e test is simpler.
php: [ '8.1' ]
php: [ '8.2' ]
dependency: [ locked ]
composer-options: [ null ]
composer-options: [ '' ]
include:
- php: '8.1'
- php: '8.2'
dependency: lowest
composer-options: ~
- php: '8.1'
dependency: highest
composer-options: ~
composer-options: ''
- php: '8.2'
dependency: highest
composer-options: ~
composer-options: ''
- php: '8.3'
dependency: highest
composer-options: --ignore-platform-req=php+
Expand Down Expand Up @@ -192,29 +189,29 @@ jobs:
- command: _test_e2e_pass_no_config_min_composer_php
docker-image: ghcr.io/box-project/box_php725
- command: _test_e2e_pass_no_config_min_box_php
docker-image: ghcr.io/box-project/box_php81
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_pass_complete_min_composer_php
docker-image: ghcr.io/box-project/box_php725
- command: _test_e2e_pass_complete_min_box_php
docker-image: ghcr.io/box-project/box_php81
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_fail_complete_min_composer_php
docker-image: ghcr.io/box-project/box_php725
- command: _test_e2e_fail_complete_min_box_php
docker-image: ghcr.io/box-project/box_php81
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_skip_min_composer_php
docker-image: ghcr.io/box-project/box_php725
- command: _test_e2e_pass_complete_requirement_checker_not_disabled
docker-image: ghcr.io/box-project/box_php725
- command: _test_e2e_fail_conflict
docker-image: ghcr.io/box-project/box_php81
docker-image: ghcr.io/box-project/box_php82
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer
coverage: none

Expand Down Expand Up @@ -282,6 +279,8 @@ jobs:
name: Update the RequirementChecker
if: ${{ github.repository == 'box-project/box' && github.ref_name == 'main' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -293,7 +292,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer
coverage: none

Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,15 @@ jobs:
fail-fast: false
matrix:
php:
- version: '8.1'
- version: '8.2'
dependency: locked
composer-options: ~
- version: '8.1'
composer-options: ''
- version: '8.2'
dependency: lowest
composer-options: ~
- version: '8.1'
dependency: highest
composer-options: ~
composer-options: ''
- version: '8.2'
dependency: highest
composer-options: ~
composer-options: ''
- version: '8.3'
dependency: highest
composer-options: --ignore-platform-req=php+
Expand All @@ -52,7 +49,7 @@ jobs:
include:
- label: '; bz2 disabled'
php:
version: '8.1'
version: '8.2'
dependency: locked
composer-options: ''
tools: composer
Expand Down Expand Up @@ -94,7 +91,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.1' ]
php: [ '8.2' ]
if: github.event_name == 'pull_request' || github.event_name == 'push'
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
],
];

$config = new FidryConfig('', 81_000);
$config = new FidryConfig('', 82_000);
$config->addRules($overriddenRules);
$config->setCacheFile(__DIR__.'/dist/.php-cs-fixer.cache');
$config->setFinder($finder);
Expand Down
4 changes: 2 additions & 2 deletions Makefile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ MAKEFLAGS += --no-builtin-rules
DOCKER_RUN = docker run --interactive --platform=linux/amd64 --rm --workdir=/opt/box
DOCKER_RUN_NO_PULL = docker run --interactive --platform=linux/amd64 --rm --pull=never
# Matches the minimum PHP version supported by Box.
DOCKER_MIN_BOX_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php81
DOCKER_MIN_BOX_XDEBUG_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php81_xdebug
DOCKER_MIN_BOX_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php82
DOCKER_MIN_BOX_XDEBUG_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php82_xdebug

E2E_SCOPER_EXPOSE_SYMBOLS_DIR = fixtures/build/dir011
E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR = dist/dir011
Expand Down
2 changes: 1 addition & 1 deletion bin/box
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare(strict_types=1);
namespace KevinGH\Box;

use Fidry\Console\Application\ApplicationRunner;
use Fidry\Console\Input\IO;
use Fidry\Console\IO;
use KevinGH\Box\Console\Application;
use KevinGH\Box\Console\OutputFormatterConfigurator;
use RuntimeException;
Expand Down
Loading

0 comments on commit c569230

Please sign in to comment.