Skip to content

Commit 5ccfde1

Browse files
authored
Merge pull request #68 from danielme85/update-testing-84
Update testing for php 8.4 and Laravel 12
2 parents c9da498 + b527bfd commit 5ccfde1

File tree

9 files changed

+18
-31
lines changed

9 files changed

+18
-31
lines changed

.github/workflows/unittest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
laravel: [ ^10.0, ^11.0 ]
33-
php: ['8.2', '8.3']
32+
laravel: [^11.0, ^12.0]
33+
php: [8.3, 8.4]
3434
include:
35-
- laravel: ^10.0
36-
testbench: ^8.0
3735
- laravel: ^11.0
3836
testbench: ^9.0
37+
- laravel: ^12.0
38+
testbench: ^10.0
3939
steps:
4040
- name: Checkout
4141
uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ coverage.xml
1616
_ide_helper.php
1717
_ide_helper_models.php.php
1818
.phpunit.result.cache
19-
.phpunit.cache
19+
.phpunit.cache/*

.phpunit.cache/test-results

Lines changed: 0 additions & 1 deletion
This file was deleted.

buildDockerImages.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^8.1",
24-
"illuminate/support": "^10.0|^11.0"
23+
"php": ">=8.1",
24+
"illuminate/support": ">=10.0"
2525
},
2626
"require-dev": {
2727
"ext-mongodb": "*",
28-
"phpunit/phpunit": "^10.0",
29-
"orchestra/testbench": "^8.0|^9.0",
30-
"mockery/mockery": "^1.5",
31-
"nunomaduro/collision": "^7.0|^8.0",
32-
"mongodb/laravel-mongodb": "^4"
28+
"phpunit/phpunit": ">=10.0",
29+
"orchestra/testbench": ">=8.0",
30+
"mockery/mockery": ">=1.5",
31+
"nunomaduro/collision": ">=7.0",
32+
"mongodb/laravel-mongodb": ">=4"
3333
},
3434
"suggest": {
3535
"jenssegers/mongodb": "Adds support for MongoDB in Laravel/Eloquent"

docker-compose.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
version: "3.0"
32
services:
4-
53
logto-mariadb:
64
image: mariadb:latest
75
container_name: logto-mariadb
@@ -20,7 +18,7 @@ services:
2018

2119
php8:
2220
build:
23-
dockerfile: ./docker/php8/Dockerfile
21+
context: docker/php8
2422
container_name: laravel-log-to-db-php8
2523
tty: true
2624
networks:

docker/php8/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN apt update && apt install -y lsb-release gnupg2 ca-certificates apt-transpor
1313
RUN apt update && add-apt-repository ppa:ondrej/php
1414
RUN apt update && apt upgrade -y
1515
RUN apt install -y curl git openssl openssh-client mysql-client bash libzip-dev zip wget
16-
RUN apt install -y php8.2 php8.2-dev php8.2-mysql php8.2-mongodb php8.2-curl php8.2-mbstring php8.2-pcov php8.2-cli
16+
RUN apt install -y php8.3 php8.3-dev php8.3-mysql php8.3-mongodb php8.3-curl php8.3-mbstring php8.3-pcov php8.3-cli
1717

1818
RUN pecl install pcov
1919
RUN pecl install mongodb
@@ -30,8 +30,3 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
3030

3131
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait
3232
RUN chmod +x /wait
33-
34-
COPY entrypoint.sh /entrypoint.sh
35-
RUN chmod +x /entrypoint.sh
36-
37-
ENTRYPOINT ["/entrypoint.sh"]

docker/php8/entrypoint.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/LogToDbTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,11 @@ public function testModelInteraction()
452452
public function testStandAloneModels()
453453
{
454454
Log::info("This is a info log message...");
455+
456+
$modelMongo = LogToDB::model(null, 'mongodb');
457+
455458
$this->assertNotEmpty(LogSql::get()->toArray());
456-
$this->assertNotEmpty(LogMongo::get()->toArray());
459+
$this->assertNotEmpty($modelMongo->get()->toArray());
457460
}
458461

459462
/**

0 commit comments

Comments
 (0)