Skip to content

Commit

Permalink
Laravel 11 support was added (#15)
Browse files Browse the repository at this point in the history
* Laravel 11 support was added

* `tests.yml` fix

* Update Dockerfile

* Update CHANGELOG.md

---------

Co-authored-by: Dmitry Peichev <[email protected]>
Co-authored-by: Eldario <[email protected]>
  • Loading branch information
3 people authored May 14, 2024
1 parent 51e1e32 commit 7e36eba
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 41 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs: # Docs: <https://git.io/JvxXE>
setup: [basic, lowest]
laravel: [default]
coverage: [yes]
php: ['8.1', '8.2']
php: ['8.1', '8.2', '8.3']
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 # Action page: <https://github.com/shivammathur/setup-php>
Expand All @@ -37,7 +37,7 @@ jobs: # Docs: <https://git.io/JvxXE>
run: echo "output_dir=dir::$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies # Docs: <https://git.io/JfAKn#php---composer>
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.output_dir }}
key: ${{ runner.os }}-composer-${{ matrix.setup }}-${{ hashFiles('**/composer.json') }}
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs: # Docs: <https://git.io/JvxXE>
XDEBUG_MODE: coverage
run: composer test-cover

- uses: codecov/codecov-action@v3 # Docs: <https://github.com/codecov/codecov-action>
- uses: codecov/codecov-action@v4 # Docs: <https://github.com/codecov/codecov-action>
if: matrix.coverage == 'yes'
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -81,7 +81,7 @@ jobs: # Docs: <https://git.io/JvxXE>
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Lint changelog file
uses: docker://avtodev/markdown-lint:v1 # Action page: <https://github.com/avto-dev/markdown-lint>
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].

## Unreleased

### Added

- Laravel `11.x` support

### Changed

- Minimal Laravel version now is `10.0`
- Version of `composer` in docker container updated up to `2.7.6`
- Updated dev dependencies

## v3.4.1

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM php:8.1-alpine
FROM php:8.3-alpine

ENV COMPOSER_HOME="/tmp/composer"

COPY --from=composer:2.5.5 /usr/bin/composer /usr/bin/composer
COPY --from=composer:2.7.6 /usr/bin/composer /usr/bin/composer

RUN set -x \
&& apk add --no-cache binutils git \
&& apk add --no-cache --virtual .build-deps linux-headers autoconf pkgconf make g++ gcc 1>/dev/null \
&& docker-php-ext-install sockets \
# install xdebug (for testing with code coverage), but do not enable it
&& pecl install xdebug-3.2.0 1>/dev/null \
&& pecl install xdebug-3.3.0 1>/dev/null \
&& apk del .build-deps \
&& mkdir /src ${COMPOSER_HOME} \
&& ln -s /usr/bin/composer /usr/bin/c \
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
"php": "^8.1",
"psr/log": "^3.0",
"monolog/monolog": "^3.0",
"illuminate/log": "^10.0",
"illuminate/config": "^10.0",
"illuminate/events": "^10.0",
"illuminate/contracts": "^10.0"
"illuminate/log": "^10.0 || ^11.0",
"illuminate/config": "^10.0 || ^11.0",
"illuminate/events": "^10.0 || ^11.0",
"illuminate/contracts": "^10.0 || ^11.0"
},
"require-dev": {
"ext-sockets": "*",
"ext-json": "*",
"laravel/laravel": "^10.0",
"mockery/mockery": "^1.5.1",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.0"
"laravel/laravel": "^10.0 || ^11.0",
"mockery/mockery": "^1.6.5",
"phpstan/phpstan": "^1.10.66",
"phpunit/phpunit": "^10.5"
},
"autoload": {
"psr-4": {
Expand Down
49 changes: 24 additions & 25 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
bootstrap="./tests/bootstrap.php"
colors="true"
stopOnFailure="true"
cacheDirectory=".phpunit.cache"
requireCoverageMetadata="true">
<testsuites>
<testsuite name="Unit">
<directory>./tests</directory>
</testsuite>
</testsuites>
<coverage includeUncoveredFiles="false">
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<directory>./vendor</directory>
</exclude>
<report>
<clover outputFile="./coverage/clover.xml"/>
<html outputDirectory="./coverage/html"/>
<text outputFile="php://stdout"/>
<xml outputDirectory="./coverage/xml"/>
</report>
</coverage>
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="./tests/bootstrap.php" colors="true">
<testsuites>
<testsuite name="Unit">
<directory>./tests</directory>
</testsuite>
</testsuites>
<coverage includeUncoveredFiles="false">
<report>
<clover outputFile="./coverage/clover.xml"/>
<html outputDirectory="./coverage/html"/>
<text outputFile="php://stdout"/>
<xml outputDirectory="./coverage/xml"/>
</report>
</coverage>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./tests</directory>
</exclude>
</source>
</phpunit>

0 comments on commit 7e36eba

Please sign in to comment.