Skip to content

Commit

Permalink
Laravel 11 support was added
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Peichev committed May 24, 2024
1 parent f8a4d5e commit e36752b
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs: # Docs: <https://git.io/JvxXE>
setup: [basic, lowest]
laravel: [default]
coverage: [yes]
php: ['8.0', '8.1', '8.2']
php: ['8.1', '8.2', '8.3']
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 # Action page: <https://github.com/shivammathur/setup-php>
uses: shivammathur/setup-php@v4 # Action page: <https://github.com/shivammathur/setup-php>
with:
php-version: ${{ matrix.php }}
extensions: mbstring, xdebug
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 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

## v5.7.0

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

ENV COMPOSER_HOME="/tmp/composer"

COPY --from=composer:2.6.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 \
# 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 --parents --mode=777 /src ${COMPOSER_HOME}/cache/repo ${COMPOSER_HOME}/cache/files \
&& 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 @@ -14,21 +14,21 @@
}
],
"require": {
"php": "^8.0.2",
"php": "^8.1",
"ext-mbstring": "*",
"ext-json": "*",
"avto-dev/extended-laravel-validator": "^3.7",
"avto-dev/static-references-laravel": "^4.5",
"illuminate/support": "~9.0 || ~10.0",
"illuminate/config": "~9.0 || ~10.0",
"illuminate/contracts": "~9.0 || ~10.0",
"illuminate/container": "~9.0 || ~10.0",
"illuminate/support": "~10.0 || ~11.0",
"illuminate/config": "~10.0 || ~11.0",
"illuminate/contracts": "~10.0 || ~11.0",
"illuminate/container": "~10.0 || ~11.0",
"danielstjules/stringy": "~3.1.0"
},
"require-dev": {
"laravel/laravel": "~9.0 || ~10.0",
"phpstan/phpstan": "~1.10",
"phpunit/phpunit": "^9.6 || ^10.4"
"laravel/laravel": "~10.0 || ~11.0",
"phpstan/phpstan": "^1.10.66",
"phpunit/phpunit": "^10.5"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
parameters:
level: 'max'
checkGenericClassInNonGenericObjectType: false
paths:
- src
50 changes: 23 additions & 27 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="./tests/bootstrap.php"
colors="true"
forceCoversAnnotation="true">

<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>

<coverage includeUncoveredFiles="false" processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./tests</directory>
</exclude>
<report>
<clover outputFile="./coverage/clover.xml"/>
<html outputDirectory="./coverage/html"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
<xml outputDirectory="./coverage/xml"/>
</report>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="./tests/bootstrap.php" colors="true" cacheDirectory=".phpunit.cache" requireCoverageMetadata="true">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage includeUncoveredFiles="false">
<report>
<clover outputFile="./coverage/clover.xml"/>
<html outputDirectory="./coverage/html"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
<xml outputDirectory="./coverage/xml"/>
</report>
</coverage>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./tests</directory>
</exclude>
</source>
</phpunit>
3 changes: 3 additions & 0 deletions src/Types/TypedIDEntityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;

/**
* @extends Arrayable<string, mixed>
*/
interface TypedIDEntityInterface extends Arrayable, Jsonable
{
/**
Expand Down

0 comments on commit e36752b

Please sign in to comment.