diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index bf3e1ff..88bfc37 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -29,13 +29,13 @@ jobs: strategy: fail-fast: false matrix: - laravel: [ ^10.0, ^11.0 ] - php: ['8.2', '8.3'] + laravel: [^11.0, ^12.0] + php: [8.3, 8.4] include: - - laravel: ^10.0 - testbench: ^8.0 - laravel: ^11.0 testbench: ^9.0 + - laravel: ^12.0 + testbench: ^10.0 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index c929011..11ca2f5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ coverage.xml _ide_helper.php _ide_helper_models.php.php .phpunit.result.cache -.phpunit.cache \ No newline at end of file +.phpunit.cache/* \ No newline at end of file diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results deleted file mode 100644 index 7fb7668..0000000 --- a/.phpunit.cache/test-results +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"defects":{"LogToDbTest::testClassInit":8,"LogToDbTest::testLogLevels":8,"LogToDbTest::testContext":8,"LogToDbTest::testProcessors":8,"LogToDbTest::testLoggingToChannels":8,"LogToDbTest::testException":8,"LogToDbTest::testExceptionWrongFormat":8,"LogToDbTest::testExceptionIgnore":8,"LogToDbTest::testQueue":8,"LogToDbTest::testSaveNewLogEventJob":8,"LogToDbTest::testModelInteraction":8,"LogToDbTest::testStandAloneModels":8,"LogToDbTest::testCustomModel":8,"LogToDbTest::testRemoves":8,"LogToDbTest::testCleanerUpper":8,"LogToDbTest::testFinalCleanup":8},"times":{"FailureTest::testEmergencyFailure":0.062,"LogToDbTest::testClassInit":0.022,"LogToDbTest::testLogLevels":0.026,"LogToDbTest::testContext":0.011,"LogToDbTest::testProcessors":0.009,"LogToDbTest::testLoggingToChannels":0.009,"LogToDbTest::testException":0.016,"LogToDbTest::testExceptionWrongFormat":0.009,"LogToDbTest::testExceptionIgnore":0.006,"LogToDbTest::testQueue":0.015,"LogToDbTest::testSaveNewLogEventJob":0.007,"LogToDbTest::testModelInteraction":0.055,"LogToDbTest::testStandAloneModels":0.011,"LogToDbTest::testCustomModel":0.008,"LogToDbTest::testRemoves":2.09,"LogToDbTest::testCleanerUpper":0.055,"LogToDbTest::testFinalCleanup":0.012}} \ No newline at end of file diff --git a/buildDockerImages.sh b/buildDockerImages.sh deleted file mode 100755 index 629e88b..0000000 --- a/buildDockerImages.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Building PHP8 image..." && -cd ./docker/php8 && docker buildx build --push . -t ghcr.io/danielme85/lltdb-testbench:latest diff --git a/composer.json b/composer.json index 2cc3d5f..a349a1c 100644 --- a/composer.json +++ b/composer.json @@ -20,16 +20,16 @@ } ], "require": { - "php": "^8.1", - "illuminate/support": "^10.0|^11.0" + "php": ">=8.1", + "illuminate/support": ">=10.0" }, "require-dev": { "ext-mongodb": "*", - "phpunit/phpunit": "^10.0", - "orchestra/testbench": "^8.0|^9.0", - "mockery/mockery": "^1.5", - "nunomaduro/collision": "^7.0|^8.0", - "mongodb/laravel-mongodb": "^4" + "phpunit/phpunit": ">=10.0", + "orchestra/testbench": ">=8.0", + "mockery/mockery": ">=1.5", + "nunomaduro/collision": ">=7.0", + "mongodb/laravel-mongodb": ">=4" }, "suggest": { "jenssegers/mongodb": "Adds support for MongoDB in Laravel/Eloquent" diff --git a/docker-compose.yaml b/docker-compose.yaml index 8a66171..9eb78e0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,5 @@ --- -version: "3.0" services: - logto-mariadb: image: mariadb:latest container_name: logto-mariadb @@ -20,7 +18,7 @@ services: php8: build: - dockerfile: ./docker/php8/Dockerfile + context: docker/php8 container_name: laravel-log-to-db-php8 tty: true networks: diff --git a/docker/php8/Dockerfile b/docker/php8/Dockerfile index 370e866..658582e 100644 --- a/docker/php8/Dockerfile +++ b/docker/php8/Dockerfile @@ -13,7 +13,7 @@ RUN apt update && apt install -y lsb-release gnupg2 ca-certificates apt-transpor RUN apt update && add-apt-repository ppa:ondrej/php RUN apt update && apt upgrade -y RUN apt install -y curl git openssl openssh-client mysql-client bash libzip-dev zip wget -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 +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 RUN pecl install pcov RUN pecl install mongodb @@ -30,8 +30,3 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait RUN chmod +x /wait - -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/docker/php8/entrypoint.sh b/docker/php8/entrypoint.sh deleted file mode 100644 index 80f54bf..0000000 --- a/docker/php8/entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -export DEBIAN_FRONTEND=noninteractive -bash <(cat /etc/os-release; echo 'echo ${VERSION/*, /}') -php -v -echo "Entrypoint/Boot actions completed..." \ No newline at end of file diff --git a/tests/LogToDbTest.php b/tests/LogToDbTest.php index 56979bc..1a14590 100644 --- a/tests/LogToDbTest.php +++ b/tests/LogToDbTest.php @@ -452,8 +452,11 @@ public function testModelInteraction() public function testStandAloneModels() { Log::info("This is a info log message..."); + + $modelMongo = LogToDB::model(null, 'mongodb'); + $this->assertNotEmpty(LogSql::get()->toArray()); - $this->assertNotEmpty(LogMongo::get()->toArray()); + $this->assertNotEmpty($modelMongo->get()->toArray()); } /**