Skip to content

Commit 50ef4af

Browse files
authored
Merge pull request #23 from antistatique/featur/upgrade-februrary-2026
Upgrade all dependencies - February 2026
2 parents c4045ab + a1d6ad2 commit 50ef4af

15 files changed

+164
-206
lines changed

.github/workflows/styles.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
- name: Setup PHP
1313
uses: shivammathur/setup-php@v2
1414
with:
15-
php-version: '8.3'
15+
php-version: '8.5'
1616
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
1717
tools: php-cs-fixer, cs2pr
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
- run: composer install --prefer-dist
2020
- run: ./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
2121

@@ -26,36 +26,23 @@ jobs:
2626
- name: Setup PHP
2727
uses: shivammathur/setup-php@v2
2828
with:
29-
php-version: '8.3'
29+
php-version: '8.5'
3030
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v4
3232
- run: composer install --prefer-dist
3333
- run: ./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests
3434

35-
phpcpd:
36-
name: phpcpd
37-
runs-on: ubuntu-latest
38-
steps:
39-
- name: Setup PHP
40-
uses: shivammathur/setup-php@v2
41-
with:
42-
php-version: '8.3'
43-
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
44-
- uses: actions/checkout@v2
45-
- run: composer install --prefer-dist
46-
- run: ./vendor/bin/phpcpd ./ --suffix .php --suffix .inc --suffix .test --exclude vendor --exclude bin --exclude tests
47-
4835
phpstan:
4936
name: phpstan
5037
runs-on: ubuntu-latest
5138
steps:
5239
- name: Setup PHP
5340
uses: shivammathur/setup-php@v2
5441
with:
55-
php-version: '8.3'
42+
php-version: '8.5'
5643
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
5744
tools: phpstan, cs2pr
58-
- uses: actions/checkout@v2
45+
- uses: actions/checkout@v4
5946
- run: composer install --prefer-dist
6047
- run: ./vendor/bin/phpstan analyse ./src ./tests --error-format=checkstyle | cs2pr
6148

@@ -66,9 +53,9 @@ jobs:
6653
- name: Setup PHP
6754
uses: shivammathur/setup-php@v2
6855
with:
69-
php-version: '8.3'
56+
php-version: '8.5'
7057
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
71-
- uses: actions/checkout@v2
58+
- uses: actions/checkout@v4
7259
- run: composer install --prefer-dist
7360
- run: ./vendor/bin/psalm --output-format=github
7461

@@ -80,6 +67,6 @@ jobs:
8067
uses: shivammathur/setup-php@v2
8168
with:
8269
tools: composer:v2
83-
- uses: actions/checkout@v2
70+
- uses: actions/checkout@v4
8471
- run: composer install --prefer-dist
8572
- uses: symfonycorp/security-checker-action@v3

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
php-versions: ['8.0', '8.1', '8.2', '8.3', '8.4']
13+
php-versions: ['8.3', '8.4', '8.5']
1414
steps:
1515
- name: Setup PHP
1616
uses: shivammathur/setup-php@v2

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Added
9+
- add tests coverage for PHP 8.5
10+
- upgrade vimeo/psalm (4.30.0 = => 6.15.1)
11+
12+
### Removed
13+
- removed support PHP 8.0
14+
- removed support PHP 8.1
15+
- removed support PHP 8.2
16+
- remove phpcpd as abandoned
17+
- remove unused php-mock/php-mock-phpunit
18+
19+
### Security
20+
- upgrade phpstan/phpstan (0.12.100 => 2.1.39)
21+
- upgrade phpunit/php-code-coverage (9.2.32 => 12.5.3)
22+
- upgrade phpunit/phpunit (9.6.34 => 12.5.14)
23+
24+
### Changed
25+
- remove deprecated usage of ReflectionProperty::setAccessible since PHP8.1
826

927
## [1.0.2] - 2025-06-03
1028
### Added

CONTRIBUTING.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ Pull requests for bugs are more than welcome - please explain the bug you're try
1313

1414
## Developing
1515

16+
## 🧪 Running tests
17+
18+
Run the test suite without code coverage (no Xdebug required):
19+
20+
```bash
21+
./vendor/bin/phpunit --no-coverage
22+
```
23+
24+
Run the test suite with code coverage (requires [Xdebug](https://xdebug.org/) or [PCOV](https://github.com/krakjoe/pcov)):
25+
26+
```bash
27+
XDEBUG_MODE=coverage ./vendor/bin/phpunit
28+
```
29+
30+
> **Note:** Running `./vendor/bin/phpunit` without `--no-coverage` and without a coverage driver will fail with _"No code coverage driver available"_. Use `--no-coverage` for day-to-day local development.
31+
1632
## 🚔 Check Symfony 4 coding standards & best practices
1733

1834
You need to run composer before using [FriendsOfPHP/PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).
@@ -37,20 +53,14 @@ It can modernize your code (like converting the pow function to the ** operator
3753
./vendor/bin/phpstan analyse ./ --error-format=checkstyle
3854
```
3955

40-
### Improve global code quality using PHPCPD (Code duplication) & PHPMD (PHP Mess Detector)
56+
### Improve global code quality using PHPMD (PHP Mess Detector)
4157

4258
Detect overcomplicated expressions & Unused parameters, methods, properties
4359

4460
```bash
4561
./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests
4662
```
4763

48-
Copy/Paste Detector
49-
50-
```bash
51-
./vendor/bin/phpcpd ./ --names=*.php,*.inc,*.test --names-exclude=*.md --ansi --exclude=vendor --exclude=bin --exclude=tests
52-
```
53-
5464
### Checks compatibility with PHP interpreter versions
5565

5666
```bash

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Convert World Coordinates to Swiss Coordinates - and vice versa
55
[![Build](https://github.com/antistatique/swisstopo/actions/workflows/tests.yml/badge.svg)](https://github.com/antistatique/swisstopo/actions/workflows/tests.yml)
66
[![Packagist](https://img.shields.io/packagist/dt/antistatique/swisstopo.svg?maxAge=2592000)](https://packagist.org/packages/antistatique/swisstopo)
77
[![License](https://poser.pugx.org/antistatique/swisstopo/license)](https://packagist.org/packages/antistatique/swisstopo)
8-
[![PHP Versions Supported](https://img.shields.io/badge/php-%3E%3D%208.0-8892BF.svg)](https://packagist.org/packages/antistatique/swisstopo)
8+
[![PHP Versions Supported](https://img.shields.io/badge/php-%3E%3D%208.3-8892BF.svg)](https://packagist.org/packages/antistatique/swisstopo)
99

1010
Super-simple PHP library to transpose GPS (WGS84) coordinates to/from the Swiss military and civilian coordinate
1111
systems CH1903/LV03 (MN03) or CH1995/LV95 (MN95).

bin/post-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ echo "\n🚔 \033[0;32mRunning Code Sniffer Symfony for /public ...\033[0m"
44
echo "\n💩 \033[0;32mRunning PHP Mess Detector ...\033[0m"
55
./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests
66

7-
echo "\n🛂 \033[0;32mRunning PHP Copy/Paste Detector ...\033[0m"
8-
./vendor/bin/phpcpd ./ --names=*.php,*.inc,*.test --names-exclude=*.md --ansi --exclude=vendor --exclude=bin --exclude=tests
9-
107
echo "\n🍫 \033[0;32mRunning PhpCodeFixer ...\033[0m"
118
./vendor/bin/phpcf --target 7.3 --file-extensions php,inc,test ./
129

composer.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
"description": "Convert GPS (WGS84) to Swiss (LV03 and LV95) coordinates (and vice versa)",
44
"license": "MIT",
55
"require": {
6-
"php": ">=8.0"
6+
"php": ">=8.3"
77
},
88
"require-dev": {
9-
"phpunit/phpunit": "^9.0.0",
10-
"phpunit/php-code-coverage": "^9.2.0",
9+
"phpunit/phpunit": "^12",
10+
"phpunit/php-code-coverage": "^12",
1111
"friendsofphp/php-cs-fixer": "^3.21",
1212
"phpmd/phpmd": "^2.8",
13-
"sebastian/phpcpd": "^6.0",
1413
"php-coveralls/php-coveralls": "^2.1",
15-
"php-mock/php-mock-phpunit": "^2.4",
16-
"vimeo/psalm": "^4.29",
17-
"phpstan/phpstan-deprecation-rules": "^0.12.2"
14+
"vimeo/psalm": "^6.0",
15+
"phpstan/phpstan-deprecation-rules": "^2.0"
1816
},
1917
"autoload": {
2018
"psr-4": {

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
# Ignore tests
3-
excludes_analyse:
3+
excludePaths:
44
- *Test.php
55
- *TestBase.php
66
# PHPStan Level 1

phpunit.xml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" failOnRisky="true" failOnWarning="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage processUncoveredFiles="true">
2+
<phpunit colors="true"
3+
failOnRisky="true"
4+
failOnWarning="true"
5+
stopOnFailure="false"
6+
displayDetailsOnTestsThatTriggerDeprecations="true"
7+
displayDetailsOnPhpunitDeprecations="true"
8+
displayDetailsOnPhpunitNotices="true"
9+
displayDetailsOnTestsThatTriggerNotices="true"
10+
displayDetailsOnTestsThatTriggerWarnings="true">
11+
<testsuites>
12+
<testsuite name="Swisstopo Test Suite">
13+
<directory suffix=".php">./tests/</directory>
14+
<exclude>./tests/Traits/</exclude>
15+
</testsuite>
16+
</testsuites>
17+
<source>
418
<include>
519
<directory suffix=".php">src</directory>
620
</include>
21+
</source>
22+
<coverage>
723
<report>
824
<clover outputFile="./build/logs/clover.xml"/>
925
<html outputDirectory="./build/logs/coverage-html"/>
1026
</report>
1127
</coverage>
12-
<testsuites>
13-
<testsuite name="Swisstopo Test Suite">
14-
<directory suffix=".php">./tests/</directory>
15-
</testsuite>
16-
</testsuites>
17-
<logging/>
18-
<php>
19-
<!-- Temporarily preventing https://github.com/xdebug/xdebug/pull/699 -->
20-
<const name="XDEBUG_CC_UNUSED" value=""/>
21-
<const name="XDEBUG_CC_DEAD_CODE" value="-1"/>
22-
</php>
2328
</phpunit>

psalm.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
<?xml version="1.0"?>
22
<psalm
33
errorLevel="1"
4-
autoloader="vendor/autoload.php"
5-
requireVoidReturnType="false"
4+
resolveFromConfigFile="true"
5+
findUnusedBaselineEntry="true"
6+
findUnusedCode="true"
67
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
78
xmlns="https://getpsalm.org/schema/config"
8-
xsi:schemaLocation="https://getpsalm.org/schema/config file:///app/vendor/vimeo/psalm/config.xsd">
9-
9+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
10+
>
1011
<projectFiles>
1112
<directory name="src" />
12-
1313
<ignoreFiles>
1414
<directory name="vendor" />
15+
<directory name="bin" />
1516
</ignoreFiles>
1617
</projectFiles>
17-
18-
<fileExtensions>
19-
<extension name="php" />
20-
<extension name="inc" />
21-
</fileExtensions>
22-
23-
<issueHandlers>
24-
<!-- Suppress some errors -->
25-
<!-- @see https://github.com/vimeo/psalm/blob/master/docs/dealing_with_code_issues.md -->
26-
</issueHandlers>
27-
2818
</psalm>

0 commit comments

Comments
 (0)