Skip to content

Commit

Permalink
Merge pull request #35 from worksome/l10
Browse files Browse the repository at this point in the history
chore(deps): Laravel 10 support
  • Loading branch information
lukeraymonddowning committed Feb 1, 2023
2 parents 60b7975 + 326526f commit da15bbf
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2]
laravel: [9.*]
laravel: [9.*, 10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand All @@ -40,6 +45,7 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
],
"require": {
"php": "^8.2",
"illuminate/contracts": "^9.46"
"illuminate/contracts": "^9.46|^10.0"
},
"require-dev": {
"nunomaduro/collision": "^6.0",
"nunomaduro/larastan": "^2.0",
"orchestra/testbench": "^7.0",
"orchestra/testbench": "^7.0|^8.0",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"worksome/pest-plugin-silence": "^0.1",
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
build: ./docker
volumes:
- .:/var/www/html
environment:
- XDEBUG_MODE=${XDEBUG_MODE:-off}
- XDEBUG_CONFIG=${XDEBUG_CONFIG:-client_host=host.docker.internal}
pest:
build: ./docker
entrypoint: ["php", "./vendor/bin/pest"]
Expand Down
13 changes: 8 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM php:8.2-cli

RUN pecl install pcov
RUN pecl install xdebug

RUN apt-get update \
&& apt-get install -y libpng-dev libjpeg-dev
&& apt-get install -y libpng-dev libjpeg-dev libzip-dev zip

RUN docker-php-ext-configure gd --with-jpeg \
&& docker-php-ext-install gd \
&& docker-php-ext-enable pcov
RUN docker-php-ext-configure gd --with-jpeg
RUN docker-php-ext-install gd

RUN docker-php-ext-install zip

RUN docker-php-ext-enable xdebug

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

Expand Down
3 changes: 1 addition & 2 deletions src/Commands/MakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

final class MakeCommand extends GeneratorCommand
{
public $signature = 'make:request-factory
{name : The name of the request or request factory.}';
public $signature = 'make:request-factory {name : The name of the request or request factory.}';

public $description = 'Generate a new FormRequest Factory.';

Expand Down
6 changes: 4 additions & 2 deletions src/RequestFactoriesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ public function register(): void

public function boot(): void
{
$this->commands(MakeCommand::class);
$this->publishes($this->filesToPublish(), 'request-factories');
if ($this->app->runningInConsole()) {
$this->commands([MakeCommand::class]);
$this->publishes($this->filesToPublish(), 'request-factories');
}

$this->mergeConfigFrom(__DIR__ . '/../config/request-factories.php', 'request-factories');

Expand Down

0 comments on commit da15bbf

Please sign in to comment.