Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions .github/workflows/databases-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: databases-nightly

on:
schedule:
- cron: '17 0 * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
mysql_innovation:
if: github.repository == 'hypervel/components'

runs-on: ubuntu-latest
timeout-minutes: 10

services:
mysql:
image: mysql:innovation
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-start-period 30s
--health-interval 10s
--health-timeout 5s
--health-retries 5

container:
image: ghcr.io/hypervel/components-ci:php8.4-swoole6.2.2

name: MySQL Innovation

steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Log trigger context
uses: ./.github/actions/log-trigger-context

- name: Cache Composer dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-

- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o

- name: Execute integration tests
env:
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: bin/run-database-tests.sh mysql

mariadb:
if: github.repository == 'hypervel/components'

runs-on: ubuntu-latest
timeout-minutes: 10

services:
mariadb:
image: quay.io/mariadb-foundation/mariadb-devel:verylatest
env:
MARIADB_ROOT_PASSWORD: password
MARIADB_DATABASE: testing
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 5

container:
image: ghcr.io/hypervel/components-ci:php8.4-swoole6.2.2

name: MariaDB Very Latest

steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Log trigger context
uses: ./.github/actions/log-trigger-context

- name: Cache Composer dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-

- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o

- name: Execute integration tests
env:
DB_HOST: mariadb
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: bin/run-database-tests.sh mariadb
72 changes: 63 additions & 9 deletions .github/workflows/databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,75 @@ on:
permissions:
contents: read

env:
RUN_BLOCKING_TESTS: true

jobs:
mysql_8:
mysql_57:
runs-on: ubuntu-latest
timeout-minutes: 10

services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-start-period 30s
--health-interval 10s
--health-timeout 5s
--health-retries 5

container:
image: ghcr.io/hypervel/components-ci:php${{ matrix.php }}-swoole6.2.2

strategy:
fail-fast: false
matrix:
php: ["8.4", "8.5"]

name: MySQL 5.7 (PHP ${{ matrix.php }})

steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Log trigger context
uses: ./.github/actions/log-trigger-context

- name: Cache Composer dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /root/.composer/cache
key: composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }}
restore-keys: composer-${{ matrix.php }}-

- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o

- name: Execute integration tests
env:
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: bin/run-database-tests.sh mysql

mysql_84:
runs-on: ubuntu-latest
timeout-minutes: 10

services:
mysql:
image: mysql:8.0
image: mysql:8.4
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-start-period 30s
--health-interval 10s
--health-timeout 5s
--health-retries 5
Expand All @@ -37,7 +90,7 @@ jobs:
matrix:
php: ["8.4", "8.5"]

name: MySQL 8.0 (PHP ${{ matrix.php }})
name: MySQL 8.4 (PHP ${{ matrix.php }})

steps:
- name: Checkout code
Expand Down Expand Up @@ -67,18 +120,19 @@ jobs:
DB_PASSWORD: password
run: bin/run-database-tests.sh mysql

mysql_9:
mysql_97:
runs-on: ubuntu-latest
timeout-minutes: 10

services:
mysql:
image: mysql:9.0
image: mysql:9.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-start-period 30s
--health-interval 10s
--health-timeout 5s
--health-retries 5
Expand All @@ -91,7 +145,7 @@ jobs:
matrix:
php: ["8.4", "8.5"]

name: MySQL 9.0 (PHP ${{ matrix.php }})
name: MySQL 9.7 (PHP ${{ matrix.php }})

steps:
- name: Checkout code
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
permissions:
contents: read

env:
RUN_BLOCKING_TESTS: true

jobs:
engine:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
permissions:
contents: read

env:
RUN_BLOCKING_TESTS: true

jobs:
grpc:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: install-nightly

on:
schedule:
- cron: '0 0 * * *'
- cron: '37 0 * * *'
workflow_dispatch:

permissions:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
permissions:
contents: read

env:
RUN_BLOCKING_TESTS: true

jobs:
redis_8:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/reverb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
permissions:
contents: read

env:
RUN_BLOCKING_TESTS: true

jobs:
reverb:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/scout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
permissions:
contents: read

env:
RUN_BLOCKING_TESTS: true

jobs:
meilisearch:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-grpc-health-protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: synchronize gRPC health protocol

on:
schedule:
- cron: "0 1 * * 1"
- cron: "47 1 * * 1"
workflow_dispatch:

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-passkeys-aaguids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: synchronize Passkeys AAGUIDs

on:
schedule:
- cron: "0 0 * * 1"
- cron: "47 0 * * 1"
workflow_dispatch:

permissions:
Expand Down
4 changes: 3 additions & 1 deletion src/contracts/src/Debug/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Hypervel\Contracts\Debug;

use Hypervel\Http\Request;
use Psr\Log\LogLevel;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpFoundation\Response;
use Throwable;
Expand All @@ -18,10 +19,11 @@ interface ExceptionHandler
* Report or log an exception.
*
* @param array<array-key, mixed> $context
* @param null|LogLevel::* $level
*
* @throws Throwable
*/
public function report(Throwable $e, array $context = []): void;
public function report(Throwable $e, array $context = [], ?string $level = null): void;

/**
* Determine if the exception should be reported.
Expand Down
10 changes: 5 additions & 5 deletions src/contracts/src/Process/InvokedProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ public function command(): string;
*/
public function signal(int $signal): static;

/**
* Stop the process if it is still running.
*/
public function stop(float $timeout = 10, ?int $signal = null): ?int;

/**
* Determine if the process is still running.
*/
Expand Down Expand Up @@ -65,4 +60,9 @@ public function wait(?callable $output = null): ProcessResult;
* Wait until the given callback returns true.
*/
public function waitUntil(?callable $output = null): ProcessResult;

/**
* Stop the process if it is still running.
*/
public function stop(float $timeout = 10, ?int $signal = null): ?int;
}
1 change: 1 addition & 0 deletions src/database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ Documentation: https://hypervel.org/docs/database
- Eloquent models that override `CREATED_AT` or `UPDATED_AT` must declare the compatible `?string` constant type, such as `public const ?string UPDATED_AT = null;`. Laravel's constants are untyped, but omitting the type from an override in Hypervel causes a fatal error.
- Eloquent expression plucks use `Query\Builder::pluckWithColumn()` to retain the returned field name for casts and accessors. Custom query builders overriding `pluck()` must also override `pluckWithColumn()` to customize this path. String-based Eloquent plucks still call `pluck()`.
- Eloquent `updateFrom()` maintains the model's `updated_at` timestamp, like `update()`. Laravel forwards this method without adding a timestamp.
- `BelongsToMany` records pivot filters in an ordered `$pivotConstraints` list instead of Laravel's `$pivotWheres`, `$pivotWhereIns`, and `$pivotWhereNulls` properties. Relationship extensions should use the `wherePivot*` methods instead of accessing those arrays.

Ported from: https://github.com/laravel/framework
Loading
Loading