Skip to content

Commit df21ec2

Browse files
committed
chore: update dev tools and allow Symfony 8
Updates Symfony version to allow v8. Replaces the PHPUnit bridge with plain PHPUnit dependency, updates it to v13 and fixes tests. Updates workflows to test on latests PHP & Symfony versions. Update PHPStan with its extensions to v2 and fix errors: also removes a check + test guaranteed by an interface.
1 parent caaab58 commit df21ec2

17 files changed

Lines changed: 126 additions & 111 deletions

.github/workflows/coding_standards.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: PHP setup
1515
uses: shivammathur/setup-php@v2
1616
with:
17-
php-version: 8.1
17+
php-version: 8.4
1818
extensions: mbstring, xml, ctype, iconv, intl
1919
coverage: xdebug
2020

.github/workflows/installation.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
name: Bundle installation
2-
on: push
2+
on: [push, pull_request]
33

44
jobs:
55
integration-tests:
66
name: Installation in Symfony ${{ matrix.symfony }} with PHP ${{ matrix.php }}
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
php: ['8.1', '8.2', '8.3']
11-
symfony: ['5.4', '6.4', '7.0']
12-
exclude:
13-
- php: '8.1'
14-
symfony: '7.0'
10+
php: ['8.4', '8.5']
11+
symfony: ['6.4', '7.4', '8.0']
1512

1613
steps:
1714
# Setup
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Static Analysis
2+
on: [push, pull_request]
3+
4+
jobs:
5+
unit-tests:
6+
name: PHP ${{ matrix.php }} - PHPStan
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php: ['8.4', '8.5']
11+
12+
steps:
13+
# Setup
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: PHP setup
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php }}
21+
extensions: mbstring, xml, ctype, iconv, intl
22+
coverage: xdebug
23+
24+
# Cache Composer dependencies
25+
- name: Get composer cache directory
26+
id: composer-cache
27+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
28+
29+
- name: Cache dependencies
30+
uses: actions/cache@v4
31+
with:
32+
path: ${{ steps.composer-cache.outputs.dir }}
33+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
34+
restore-keys: ${{ runner.os }}-composer-
35+
36+
- name: Install dependencies
37+
run: composer install --prefer-dist
38+
39+
# Run PHPStan
40+
- name: Run PHPStan
41+
run: php vendor/bin/phpstan

.github/workflows/testing.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ on: [push, pull_request]
33

44
jobs:
55
unit-tests:
6-
name: PHP ${{ matrix.php }} - PHPUnit & PHPStan
6+
name: PHPUnit
77
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
php: ['8.1', '8.2', '8.3']
118

129
steps:
1310
# Setup
@@ -17,7 +14,7 @@ jobs:
1714
- name: PHP setup
1815
uses: shivammathur/setup-php@v2
1916
with:
20-
php-version: ${{ matrix.php }}
17+
php-version: 8.4
2118
extensions: mbstring, xml, ctype, iconv, intl
2219
coverage: xdebug
2320

@@ -38,8 +35,4 @@ jobs:
3835

3936
# Run tests suite
4037
- name: Run test suite
41-
run: php vendor/bin/simple-phpunit --coverage-text
42-
43-
# Run PHPStan
44-
- name: Run PHPStan
45-
run: php vendor/bin/phpstan
38+
run: php vendor/bin/phpunit

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ 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+
- Symfony 8 support
10+
11+
### Fixed
12+
- changed TimeToLive broker property to a float: [PR #20](https://github.com/AymDev/MessengerAzureBundle/pull/20)
13+
14+
### Changed
15+
- upgraded minimum supported version to **PHP 8.4** and **Symfony 6.4**
816

917
## [2.0.0] - 2024-02-14
1018
### Removed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: tests
22
tests:
3-
php ./vendor/bin/simple-phpunit
3+
php ./vendor/bin/phpunit
44

55
.PHONY: analysis
66
analysis:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Messenger Azure Service Bus Bundle
2-
A **PHP 8.1+** & **Symfony 5 / 6 / 7** bundle providing a **Symfony Messenger** *transport* for **Azure Service Bus** using the *Azure REST API*.
2+
A **PHP 8.4+** & **Symfony 6 / 7 / 8** bundle providing a **Symfony Messenger** *transport* for **Azure Service Bus** using the *Azure REST API*.
33

44
![Testing](https://github.com/AymDev/MessengerAzureBundle/workflows/Testing/badge.svg)
55
![Coding Standards](https://github.com/AymDev/MessengerAzureBundle/workflows/Coding%20Standards/badge.svg)

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
"description": "Symfony Messenger bundle for Azure Service Bus",
44
"type": "symfony-bundle",
55
"require": {
6-
"php": "^8.1",
6+
"php": "^8.4",
77
"ext-json": "*",
8-
"symfony/messenger": "^5.4|^6.4|^7.0",
9-
"symfony/http-kernel": "^5.4|^6.4|^7.0",
10-
"symfony/dependency-injection": "^5.4|^6.4|^7.0",
11-
"symfony/http-client": "^5.4|^6.4|^7.0"
8+
"symfony/messenger": "^6.4|^7.4|^8.0",
9+
"symfony/http-kernel": "^6.4|^7.4|^8.0",
10+
"symfony/dependency-injection": "^6.4|^7.4|^8.0",
11+
"symfony/http-client": "^6.4|^7.4|^8.0"
1212
},
1313
"require-dev": {
1414
"squizlabs/php_codesniffer": "^3.6",
15-
"phpstan/phpstan": "^1.4",
16-
"symfony/phpunit-bridge": "^5.4|^6.4|^7.0",
15+
"phpstan/phpstan": "^2.1",
1716
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
1817
"phpcompatibility/php-compatibility": "^9.3",
1918
"phpstan/extension-installer": "^1.1",
20-
"phpstan/phpstan-strict-rules": "^1.1",
21-
"phpstan/phpstan-phpunit": "^1.0"
19+
"phpstan/phpstan-strict-rules": "^2.0",
20+
"phpstan/phpstan-phpunit": "^2.0",
21+
"phpunit/phpunit": "^13.0"
2222
},
2323
"license": "MIT",
2424
"authors": [

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ parameters:
44
- src
55
- tests
66
bootstrapFiles:
7-
- vendor/bin/.phpunit/phpunit-9.5-0/vendor/autoload.php
7+
- vendor/autoload.php
88
ignoreErrors:
99
- message: '#^Class AymDev\\MessengerAzureBundle\\Messenger\\Transport\\AzureTransportFactory implements generic interface Symfony\\Component\\Messenger\\Transport\\TransportFactoryInterface but does not specify its types\: TTransport$#'
1010
path: src/Messenger/Transport/AzureTransportFactory.php

phpunit.xml.dist

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
33
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/13.0/phpunit.xsd"
55
backupGlobals="false"
66
colors="true"
7-
bootstrap="vendor/autoload.php">
7+
bootstrap="vendor/autoload.php"
8+
>
89

910
<php>
1011
<ini name="error_reporting" value="-1"/>
1112
<server name="APP_ENV" value="test" force="true"/>
1213
<server name="SHELL_VERBOSITY" value="-1"/>
13-
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5"/>
14-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0" />
1514
</php>
1615

1716
<testsuites>
1817
<testsuite name="Project Test Suite">
1918
<directory>tests</directory>
2019
</testsuite>
2120
</testsuites>
22-
23-
<coverage>
24-
<include>
25-
<directory suffix=".php">src</directory>
26-
</include>
27-
</coverage>
2821
</phpunit>

0 commit comments

Comments
 (0)