Skip to content

Commit

Permalink
Merge pull request #9 from AgencyPMG/ALLI-7568-php82
Browse files Browse the repository at this point in the history
[ALLI-7568] Drop PHP 7.4 Support
  • Loading branch information
chrisguitarguy authored Jan 12, 2023
2 parents 82c87cc + 093a9d2 commit bd4cbcf
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 18 deletions.
37 changes: 37 additions & 0 deletions .github/actions/setup-php/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Setup PHP

description: Set up PHP & Composer

inputs:
php-version:
required: false
type: string
description: the php version to use, defaults to 8.2
default: '8.2'

runs:
using: composite
steps:
- name: PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ inputs.php-version }}"
tools: composer
coverage: xdebug
ini-values: zend.assertions=1,assert.exception=1,xdebug.mode=coverage

- name: composer cache
id: composercache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: cache php dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ inputs.php-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ inputs.php-version }}-

- name: install php dependencies
shell: bash
run: composer install --no-interaction --no-progress
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci

on:
push:
branches:
- "**"

jobs:
test:
name: test
runs-on: "ubuntu-20.04"

strategy:
matrix:
include:
- php-version: 8.0
- php-version: 8.1
- php-version: 8.2

steps:
- name: checkout
uses: actions/checkout@v3
- name: PHP
uses: ./.github/actions/setup-php
with:
php-version: "${{ matrix.php-version }}"
- name: tests
run: make test
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## 6.0

### Changed

- Dropped support for PHP 7.4

## 5.1.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test

test:
php vendor/bin/phpunit
php vendor/bin/phpunit -v
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"keywords": ["commandbus", "queue"],
"license": "Apache-2.0",
"require": {
"php": "^7.4 || ^8.0",
"pmg/queue": "^5.0",
"php": "^8.0",
"pmg/queue": "^6.0",
"league/tactician": "^1.0"
},
"require-dev": {
"pmg/queue": "^5.0@beta",
"phpunit/phpunit": "^9.5"
"pmg/queue": "^6.0@beta",
"phpunit/phpunit": "^9.5",
"symfony/phpunit-bridge": "^5.4"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 4 additions & 1 deletion src/Handler/CreatingTacticianHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@
final class CreatingTacticianHandler implements MessageHandler
{
/**
* @var callable
* @var callable(): CommandBus
*/
private $factory;

/**
* @param callable(): CommandBus $factory
*/
public function __construct(callable $factory)
{
$this->factory = $factory;
Expand Down

0 comments on commit bd4cbcf

Please sign in to comment.