Skip to content

Commit e6df90a

Browse files
committed
v2.0.4
1 parent 005702c commit e6df90a

File tree

10 files changed

+57
-19
lines changed

10 files changed

+57
-19
lines changed

.gitattributes

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/.gitignore export-ignore
22
/.gitattributes export-ignore
33
/phpunit.xml export-ignore
4+
/phpunit.legacy.xml export-ignore
45
/workenv export-ignore
56
/tests export-ignore
67
/.github export-ignore
7-
/phpcs.php export-ignore
8+
/.php-cs-fixer.php export-ignore

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- 8.1
2323
- 8.2
2424
- 8.3
25+
- 8.4
2526
include:
2627
- phpunit: phpunit.xml
2728
- php: 5.6

phpcs.php renamed to .php-cs-fixer.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Configuration of code style fixer and checker for this library.
7-
* This configuration compatible with friendsofphp/php-cs-fixer "^3.43.0".
7+
* This configuration compatible with friendsofphp/php-cs-fixer "^3.65.0".
88
*/
99

1010
use PhpCsFixer\Finder;
@@ -16,7 +16,11 @@
1616

1717
$config = new Config();
1818
$config->setRules([
19-
'@PSR12' => true,
19+
'@PER-CS' => true,
20+
'cast_spaces' => [
21+
'space' => 'none',
22+
],
23+
'single_line_empty_body' => false,
2024
]);
2125
$config->setFinder($finder);
2226

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
xml-constrcutor
22
===
33

4+
v2.0.4 [2024-12-21]
5+
---
6+
7+
- Supporting of PHP 8.4.
8+
- Code style fixes.
9+
410
v2.0.3 [2023-12-29]
511
---
612

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023, Vasily Belosloodcev
1+
Copyright (c) 2024, Vasily Belosloodcev
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ xml-constructor
99

1010
The array-like constructor of XML document structure.
1111

12-
Supporting PHP from 5.6 up to 8.3.
12+
Supporting PHP from 5.6 up to newest.
1313

1414
Install
1515
---
@@ -125,7 +125,7 @@ Code style
125125
To fix code style, run:
126126

127127
```
128-
~/.composer/vendor/bin/php-cs-fixer fix --config=./phpcs.php --verbose
128+
~/.composer/vendor/bin/php-cs-fixer fix --verbose
129129
```
130130

131131
You have to install [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) at first, if you

workenv/50_xdebug.ini

-2
This file was deleted.

workenv/Dockerfile

+32-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,42 @@
1-
FROM php:8.3-cli-alpine
1+
FROM php:8.4-cli-alpine
22

3+
ARG GITHUB_OAUTH_TOKEN=""
4+
ARG USER_UID=""
5+
ARG USER_GID=""
6+
7+
# common
8+
# ---
39
RUN apk add --no-cache $PHPIZE_DEPS && apk add --update --no-cache linux-headers
410

511
RUN pecl install xdebug && docker-php-ext-enable xdebug
6-
RUN rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
7-
COPY 50_xdebug.ini /usr/local/etc/php/conf.d/
812

9-
RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/bin --filename=composer
10-
ARG GITHUB_OAUTH_TOKEN=false
11-
RUN if [ ${GITHUB_OAUTH_TOKEN} != false ]; then \
13+
COPY xdebug.ini /usr/local/etc/php/conf.d/zxy-50_xdebug.ini
14+
15+
# new user
16+
# ---
17+
RUN addgroup -g $USER_GID php-cli \
18+
&& adduser -u $USER_UID -G php-cli -s /bin/sh -D php-cli
19+
20+
# login as new user
21+
# ---
22+
USER php-cli
23+
24+
# env's
25+
# ---
26+
ENV PATH="/home/php-cli/.local/bin:/home/php-cli/.composer/vendor/bin:${PATH}"
27+
28+
RUN mkdir -p /home/php-cli/.local/bin && \
29+
curl -sS https://getcomposer.org/installer | \
30+
/usr/local/bin/php -- --2 --install-dir=/home/php-cli/.local/bin --filename=composer
31+
32+
# composer
33+
# ---
34+
RUN if [ -n ${GITHUB_OAUTH_TOKEN} ]; then \
1235
composer config -g github-oauth.github.com ${GITHUB_OAUTH_TOKEN} \
1336
;fi
14-
RUN export COMPOSER_DISABLE_XDEBUG_WARN=1
1537

16-
RUN composer global require friendsofphp/php-cs-fixer "^3.43.1"
38+
# other tools
39+
# ---
40+
RUN composer global require --dev friendsofphp/php-cs-fixer "^3.65.0"
1741

1842
CMD ["php", "-a"]

workenv/docker-compose.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
version: '3'
2-
31
services:
42
php-cli:
53
build:
64
context: workenv
75
args:
8-
- GITHUB_OAUTH_TOKEN=<YOUR_TOKEN>
6+
- "GITHUB_OAUTH_TOKEN="
7+
# If you are don't using Docker Desktop, but Docker Engine with Compose plugin, you should uncomment lines
8+
# below and set-up "uid" and "gid" of your system user (see man of "id"). Try run command "id -u" and "id -g".
9+
# - "USER_UID=1000"
10+
# - "USER_GID=1000"
911
working_dir: /app
1012
tty: true
1113
volumes:

workenv/xdebug.ini

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
xdebug.mode=debug,develop
2+
xdebug.log=/home/php-cli/php-xdebug.log

0 commit comments

Comments
 (0)