Skip to content

Commit fe1ecb2

Browse files
committed
Merge branch 'release/4.1.14'
2 parents fb5b007 + f94b879 commit fe1ecb2

54 files changed

Lines changed: 604 additions & 385 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.docker/Dockerfile

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,44 @@
1-
FROM splitbrain/phpfarm:jessie
1+
FROM debian:trixie-slim
22

3-
RUN apt-get update && apt-get install -y git zip
3+
# Prevent interactive prompts
4+
ENV DEBIAN_FRONTEND=noninteractive
45

6+
# Install dependencies
7+
RUN apt-get update && apt-get install -y \
8+
apt-transport-https \
9+
ca-certificates \
10+
curl \
11+
git \
12+
lsb-release \
13+
unzip \
14+
zip \
15+
&& curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg \
16+
&& echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \
17+
&& apt-get update
18+
19+
# Supported PHP Versions
20+
ENV PHP_VERSIONS="7.4 8.0 8.1 8.2 8.3 8.4 8.5"
21+
22+
# Install all PHP versions using a loop
23+
RUN for ver in $PHP_VERSIONS; do \
24+
apt-get install -y \
25+
php${ver}-cli php${ver}-xml php${ver}-mbstring php${ver}-soap; \
26+
done \
27+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
28+
29+
# Create symlinks (php-X.Y) using the same list
30+
RUN for ver in $PHP_VERSIONS; do \
31+
ln -s /usr/bin/php${ver} /usr/bin/php-${ver}; \
32+
done
33+
34+
# Install Composer
535
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
36+
37+
# Set working directory
38+
WORKDIR /var/www
39+
40+
# Copy project files
641
COPY . /var/www/
742

8-
WORKDIR /var/www/
43+
# Default command
44+
CMD ["bash"]

.github/workflows/sonars.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ on:
88
- release/*
99
pull_request:
1010
types: [ opened, synchronize, reopened ]
11+
concurrency: sonars
1112
jobs:
1213
sonarcloud:
1314
name: Sonars
1415
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
statuses: write
1520
steps:
1621
- name: Checkout code
1722
uses: actions/checkout@v3
@@ -42,7 +47,7 @@ jobs:
4247
run: sed -i 's@'$GITHUB_WORKSPACE/'@''@g' coverage.xml report.xml
4348

4449
- name: SonarCloud Scan
45-
uses: SonarSource/sonarcloud-github-action@master
50+
uses: SonarSource/sonarqube-scan-action@v7
4651
env:
4752
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4853
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ bin
77
tests/resources/generated
88
coverage
99
.phpunit.result.cache
10+
box.phar

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule ".docker"]
2+
path = .docker
3+
url = git@github.com:WsdlToPhp/DockerCommonImage.git

.php-cs-fixer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
->setRules(array(
1111
'@PhpCsFixer' => true,
1212
'phpdoc_separation' => false,
13+
'single_line_empty_body' => false,
14+
'phpdoc_align' => false,
1315
))
1416
->setFinder($finder);

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CHANGELOG
22

3+
## 4.1.14 - 2026-02-21
4+
- issue #332, pr #333 - PHP 8.4: Implicitly nullable parameter deprecated in generator code
5+
36
## 4.1.13 - 2024-06-21
47
- issue #312, pr #313 - Invalid getter and annotation for nullable property
58

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
PHP_VERSION ?= php-7.4
2+
CONTAINER_NAME ?= package_generator
3+
COMPOSER ?= /usr/bin/composer
4+
DOCKER_COMPOSE ?= docker compose
5+
DOCKER_EXEC_CONTAINER ?= docker exec -t $(CONTAINER_NAME)
6+
7+
.PHONY: bash build cs-fixer down install phpstan phpunit rector up update
8+
9+
bash:
10+
$(DOCKER_EXEC_CONTAINER) bash
11+
12+
build:
13+
$(DOCKER_COMPOSE) build
14+
15+
cs-fixer:
16+
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) vendor/bin/php-cs-fixer fix --ansi --diff --verbose
17+
18+
down:
19+
$(DOCKER_COMPOSE) down
20+
21+
install:
22+
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) $(COMPOSER) install
23+
24+
phpstan:
25+
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) vendor/bin/phpstan analyze src --level=2
26+
27+
phpunit:
28+
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) vendor/bin/phpunit --stop-on-failure --stop-on-error $(ARGS)
29+
30+
rector:
31+
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) vendor/bin/rector process
32+
33+
up:
34+
$(DOCKER_COMPOSE) up -d
35+
36+
update:
37+
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) $(COMPOSER) update

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ Thanks to the [Docker image](https://hub.docker.com/r/splitbrain/phpfarm) of [ph
128128

129129
First of all, you need to create your container which you can do using [docker-compose](https://docs.docker.com/compose/) by running the below command line from the root directory of the project:
130130
```bash
131-
$ docker-compose up -d --build
131+
$ make build up
132132
```
133133

134134
You then have a container named `package_generator` in which you can run `composer` commands and `php cli` commands such as:
135135
```bash
136136
# install deps in container (using update ensure it does use the composer.lock file if there is any)
137-
$ docker exec -it package_generator php-7.4 /usr/bin/composer update
137+
$ make update
138138
# run tests in container
139-
$ docker exec -it package_generator php-7.4 -dmemory_limit=-1 vendor/bin/phpunit
139+
$ make phpunit
140140
```
141141

142142
## Contributing
@@ -165,6 +165,7 @@ Developers who helped on this project are listed in the [composer.json](composer
165165
- [tbreuss](https://github.com/tbreuss)
166166
- [Paul Melekhov](https://github.com/gugglegum)
167167
- [Alex Krátký](https://github.com/AlexKratky)
168+
- [Michel Tomas](https://github.com/superbiche)
168169

169170
## FAQ
170171

composer.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,15 @@
9898
"email": "thomasbreuss@gmx.ch",
9999
"role": "Contributor"
100100
},
101-
{
102-
"name": "Alex Krátký",
103-
"role": "Contributor"
104-
}
101+
{
102+
"name": "Alex Krátký",
103+
"role": "Contributor"
104+
},
105+
{
106+
"name": "Michel Tomas",
107+
"email": "michel.p.tomas@gmail.com",
108+
"role": "Contributor"
109+
}
105110
],
106111
"support" : {
107112
"email" : "contact@wsdltophp.com"
@@ -129,9 +134,9 @@
129134
},
130135
"require-dev": {
131136
"friendsofphp/php-cs-fixer": "^3.0",
132-
"phpstan/phpstan": "^1.3",
137+
"phpstan/phpstan": "^2",
133138
"phpunit/phpunit": "^9",
134-
"rector/rector": "^0.15.17"
139+
"rector/rector": "^2"
135140
},
136141
"autoload": {
137142
"psr-4": {

docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.4'
2-
31
services:
42
php:
53
build:
@@ -8,3 +6,4 @@ services:
86
volumes:
97
- .:/var/www:rw
108
container_name: package_generator
9+
tty: true

0 commit comments

Comments
 (0)