Skip to content

Commit c801e21

Browse files
committed
Test against PHP 8.4
1 parent a3d45a2 commit c801e21

15 files changed

+137
-110
lines changed

.editorconfig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@ insert_final_newline = true
88
indent_style = space
99
indent_size = 4
1010

11-
[{*.yaml,*yml,*.neon}]
11+
[{*.yaml,*.yml,*.neon,*.json}]
1212
indent_size = 2
13+
14+
[*.md]
15+
max_line_length = 100
16+
17+
[{Dockerfile,Makefile}]
18+
indent_style = tab

.github/workflows/code-style.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66

77
jobs:
88
phpcs:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313
- name: Install PHP
1414
uses: shivammathur/setup-php@v2
1515
with:

.github/workflows/static-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ on:
77
jobs:
88
phpstan:
99
name: phpstan
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- name: Install PHP
1515
uses: shivammathur/setup-php@v2
1616
with:
1717
php-version: "8.0"
1818
ini-values: memory_limit=-1
1919
tools: composer:v2
2020
- name: Cache dependencies
21-
uses: actions/cache@v2
21+
uses: actions/cache@v4
2222
with:
2323
path: |
2424
~/.composer/cache

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ on:
77
jobs:
88
phpunit:
99
name: phpunit
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
1313
php-version:
1414
- "8.0"
1515
- "8.1"
1616
- "8.2"
17+
- "8.4"
1718
steps:
1819
- name: Checkout
19-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2021
- name: Install PHP
2122
uses: shivammathur/setup-php@v2
2223
with:
@@ -25,7 +26,7 @@ jobs:
2526
ini-values: memory_limit=-1
2627
tools: composer:v2
2728
- name: Cache dependencies
28-
uses: actions/cache@v2
29+
uses: actions/cache@v4
2930
with:
3031
path: |
3132
~/.composer/cache

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.composer-attribute-collector
22
.phpunit.result.cache
3-
vendor
43
composer.lock
4+
vendor

MIGRATION.md renamed to CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Migration
1+
# CHANGELOG
22

33
## v1.2 to v2.0
44

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We accept contributions via Pull Requests.
88

99
- **Code style** — We're following a [Coding Standard][]. Check the code style with `make lint`.
1010
- **Code health** — We're using [PHPStan][] to analyse the code, with maximum scrutiny. Check the code with `make lint`.
11-
- **Add tests!** — Your contribution won't be accepted if it doesn't have tests.
11+
- **Add tests!** — Your contribution won't be accepted if it does not have tests.
1212
- **Document any change in behaviour** — Make sure the `README.md` and any other relevant documentation are kept
1313
up-to-date.
1414
- **Consider our release cycle** — We follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not

Dockerfile

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
11
ARG PHP_VERSION=8.0
2-
FROM php:${PHP_VERSION}-cli-buster
2+
FROM php:${PHP_VERSION}-cli-bookworm
33

4-
RUN apt-get update && \
5-
apt-get install -y autoconf pkg-config && \
6-
pecl channel-update pecl.php.net && \
7-
pecl install xdebug && \
8-
docker-php-ext-enable opcache xdebug
4+
RUN <<-EOF
5+
docker-php-ext-enable opcache
96

10-
RUN echo '\
11-
xdebug.client_host=host.docker.internal\n\
12-
xdebug.mode=develop\n\
13-
xdebug.start_with_request=yes\n\
14-
' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
7+
if [ "$PHP_VERSION" \< "8.4" ]; then
8+
apt-get update
9+
apt-get install -y autoconf pkg-config
10+
pecl channel-update pecl.php.net
11+
pecl install xdebug
12+
docker-php-ext-enable xdebug
13+
fi
14+
EOF
1515

16-
RUN echo '\
17-
display_errors=On\n\
18-
error_reporting=E_ALL\n\
19-
date.timezone=UTC\n\
20-
' >> /usr/local/etc/php/conf.d/php.ini
16+
RUN <<-EOF
17+
cat <<-SHELL >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
18+
xdebug.client_host=host.docker.internal
19+
xdebug.mode=develop
20+
xdebug.start_with_request=yes
21+
SHELL
22+
23+
cat <<-SHELL >> /usr/local/etc/php/conf.d/php.ini
24+
display_errors=On
25+
error_reporting=E_ALL
26+
date.timezone=UTC
27+
SHELL
28+
EOF
2129

2230
ENV COMPOSER_ALLOW_SUPERUSER 1
2331

24-
RUN apt-get update && \
25-
apt-get install unzip && \
26-
curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet && \
27-
mv composer.phar /usr/local/bin/composer && \
28-
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"\n' >> /root/.bashrc
32+
RUN <<-EOF
33+
apt-get update
34+
apt-get install unzip
35+
curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet
36+
mv composer.phar /usr/local/bin/composer
37+
cat <<-SHELL >> /root/.bashrc
38+
export PATH="$HOME/.composer/vendor/bin:$PATH"
39+
SHELL
40+
EOF
2941

3042
RUN composer global require squizlabs/php_codesniffer

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# customization
22

3-
PACKAGE_NAME = olvlvl/composer-attribute-collector
43
PHPUNIT = vendor/bin/phpunit
54

65
# do not edit the following lines
@@ -37,8 +36,8 @@ test-container: test-container80
3736

3837
.PHONY: test-container80
3938
test-container80:
40-
@-docker-compose run --rm app80 bash
41-
@docker-compose down -v
39+
@-docker compose run --rm app80 bash
40+
@docker compose down -v
4241

4342
.PHONY: test-container81
4443
test-container81:
@@ -47,8 +46,13 @@ test-container81:
4746

4847
.PHONY: test-container82
4948
test-container82:
50-
@-docker-compose run --rm app82 bash
51-
@docker-compose down -v
49+
@-docker compose run --rm app82 bash
50+
@docker compose down -v
51+
52+
.PHONY: test-container84
53+
test-container84:
54+
@-docker compose run --rm app84 bash
55+
@docker compose down -v
5256

5357
.PHONY: lint
5458
lint:

README.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# composer-attribute-collector
22

3-
[![Packagist](https://img.shields.io/packagist/v/olvlvl/composer-attribute-collector.svg)](https://packagist.org/packages/olvlvl/composer-attribute-collector)
4-
[![Code Quality](https://img.shields.io/scrutinizer/g/olvlvl/composer-attribute-collector.svg)](https://scrutinizer-ci.com/g/olvlvl/composer-attribute-collector)
5-
[![Code Coverage](https://img.shields.io/coveralls/olvlvl/composer-attribute-collector.svg)](https://coveralls.io/r/olvlvl/composer-attribute-collector)
3+
[![Release](https://img.shields.io/packagist/v/olvlvl/composer-attribute-collector.svg)](https://packagist.org/packages/olvlvl/composer-attribute-collector)
4+
[![Code Coverage](https://coveralls.io/repos/github/olvlvl/composer-attribute-collector/badge.svg?branch=main)](https://coveralls.io/r/olvlvl/composer-attribute-collector?branch=main)
65
[![Downloads](https://img.shields.io/packagist/dt/olvlvl/composer-attribute-collector.svg)](https://packagist.org/packages/olvlvl/composer-attribute-collector)
76

87
composer-attribute-collector is a plugin for [Composer][]. Its ambition is to provide a convenient
@@ -282,28 +281,22 @@ enable caching and speed up consecutive runs.
282281

283282
The project is continuously tested by [GitHub actions](https://github.com/olvlvl/composer-attribute-collector/actions).
284283

285-
[![Tests](https://github.com/olvlvl/composer-attribute-collector/workflows/test/badge.svg?branch=main)](https://github.com/olvlvl/composer-attribute-collector/actions?query=workflow%3Atest)
286-
[![Static Analysis](https://github.com/olvlvl/composer-attribute-collector/workflows/static-analysis/badge.svg?branch=main)](https://github.com/olvlvl/composer-attribute-collector/actions?query=workflow%3Astatic-analysis)
287-
[![Code Style](https://github.com/olvlvl/composer-attribute-collector/workflows/code-style/badge.svg?branch=main)](https://github.com/olvlvl/composer-attribute-collector/actions?query=workflow%3Acode-style)
284+
[![Tests](https://github.com/olvlvl/composer-attribute-collector/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/olvlvl/composer-attribute-collector/actions/workflows/test.yml)
285+
[![Static Analysis](https://github.com/olvlvl/composer-attribute-collector/actions/workflows/static-analysis.yml/badge.svg?branch=main)](https://github.com/olvlvl/composer-attribute-collector/actions/workflows/static-analysis.yml)
286+
[![Code Style](https://github.com/olvlvl/composer-attribute-collector/actions/workflows/code-style.yml/badge.svg?branch=main)](https://github.com/olvlvl/composer-attribute-collector/actions/workflows/code-style.yml)
288287

289288

290289

291290
## Code of Conduct
292291

293292
This project adheres to a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in
294-
this project and its community, you are expected to uphold this code.
293+
this project and its community, you're expected to uphold this code.
295294

296295

297296

298297
## Contributing
299298

300-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
301-
302-
303-
304-
## License
305-
306-
**olvlvl/composer-attribute-collector** is released under the [BSD-3-Clause](LICENSE).
299+
See [CONTRIBUTING](CONTRIBUTING.md) for details.
307300

308301

309302

0 commit comments

Comments
 (0)