Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
472 commits
Select commit Hold shift + click to select a range
8441022
Fix pagination PHPStan errors and add global generics.variance ignore
binaryfire Jan 22, 2026
e4830a3
Add stub methods and fix PHPStan errors in database package
binaryfire Jan 22, 2026
d4849eb
Fix PHPStan errors: type mismatches and inline ignores
binaryfire Jan 22, 2026
8b09861
Fix return type mismatches and PHPDoc issues in Migrations
binaryfire Jan 22, 2026
28d377b
Fix Relation::buildMorphMapFromModels PHPDoc types
binaryfire Jan 22, 2026
4cd8778
Add inline PHPStan ignores for polymorphic Relation methods
binaryfire Jan 22, 2026
ef13b97
Fix Collection PHPDoc and add inline ignores
binaryfire Jan 22, 2026
a96e3fd
Add inline ignores for Collection template type issues
binaryfire Jan 22, 2026
f795b75
Add inline ignores for Collection method chain and static type issues
binaryfire Jan 22, 2026
8a8a6e9
Add global PHPStan ignores for Eloquent patterns
binaryfire Jan 22, 2026
c5a2e9a
Add inline ignores for DatabaseManager and Cast classes
binaryfire Jan 22, 2026
4d072d3
Fix Builder and Collection PHPStan issues
binaryfire Jan 22, 2026
497c1a5
Fix PHPStan errors: type hints and bug fixes
binaryfire Jan 22, 2026
54e2f70
Fix PHPStan: defensive code ignores and explicit returns
binaryfire Jan 22, 2026
761b9c2
Fix PHPStan: mixin method forwarding type issues
binaryfire Jan 22, 2026
4b1cca4
Fix PHPStan: dynamic property and type inference issues
binaryfire Jan 22, 2026
b9e84dc
Modernize Eloquent Model with PHP 8.4 native type hints
binaryfire Jan 22, 2026
6c7edd7
Fix Model.php: use Hypervel contract and add PHPStan ignores
binaryfire Jan 22, 2026
7c49e37
Fix PHPStan: type inference issues in Builder and InteractsWithPivotT…
binaryfire Jan 22, 2026
7dacde7
Fix PHPStan: position ignores correctly and add missing ignores
binaryfire Jan 22, 2026
a3350c4
Fix PHPStan: more inline ignores for template/generic covariance issues
binaryfire Jan 22, 2026
f89b559
Fix PHPStan: template type mismatches in relation methods
binaryfire Jan 22, 2026
8b9e854
Fix PHPStan: correct ignore placement for method.notFound and argumen…
binaryfire Jan 22, 2026
8a6ec6f
Modernize ModelInspector with PHP 8.4 native type hints
binaryfire Jan 22, 2026
8786e45
Modernize Eloquent traits with PHP 8.4 native type hints
binaryfire Jan 22, 2026
c5934c9
Fix PHPStan errors: real bugs and targeted ignores for generic limita…
binaryfire Jan 22, 2026
e7c2213
Resolve remaining PHPStan errors in database package
binaryfire Jan 22, 2026
05f94c4
Port Arr and Pluralizer from Laravel, add dependencies
binaryfire Jan 22, 2026
c377391
Complete type modernization of Arr.php
binaryfire Jan 22, 2026
938fba7
Fix PHPStan errors in Arr.php
binaryfire Jan 22, 2026
5859a14
Fix PHPStan errors in Str.php and SoftDeletes.php
binaryfire Jan 22, 2026
9408a87
Fix PHPStan errors in Stringable.php
binaryfire Jan 22, 2026
5a0fe47
Move string caching from Str to StrCache for Swoole safety
binaryfire Jan 22, 2026
5f0d9e5
Add StrCache for Swoole-optimized string caching in database package
binaryfire Jan 22, 2026
5ea7b25
Add StrCache to QueriesRelationships for Swoole optimization
binaryfire Jan 22, 2026
93362b7
Add Symfony polyfill packages for PHP 8.3-8.5 compatibility
binaryfire Jan 22, 2026
58d9871
Add coroutine safety for Model state and task worker cleanup
binaryfire Jan 22, 2026
cb6fc03
Add coroutine-safe withoutEvents() and comprehensive tests
binaryfire Jan 22, 2026
3932f01
Add temp coroutiune safety test
binaryfire Jan 22, 2026
07d3bba
Add coroutine safety for database components
binaryfire Jan 22, 2026
7c13eec
Add StrCache caching for plural/singular/pluralStudly
binaryfire Jan 22, 2026
f0bb47d
Fix usingConnection() to actually affect connection resolution
binaryfire Jan 22, 2026
99fb677
Fix Schema:: to respect usingConnection() override
binaryfire Jan 22, 2026
85ce540
Add tests for usingConnection() affecting DB and Schema facades
binaryfire Jan 22, 2026
fd7826f
Ensure ConnectionResolver respects usingConnection() override
binaryfire Jan 22, 2026
0381a04
Add failing tests for pooled connection state leaks
binaryfire Jan 22, 2026
8d8684f
Add Connection::resetForPool() to prevent state leaks between coroutines
binaryfire Jan 22, 2026
dff74e5
Migrate test imports from Hyperf\Database to Hypervel\Database
binaryfire Jan 22, 2026
eb84ed3
Continue migrating test imports from Hyperf\Database to Hypervel\Data…
binaryfire Jan 22, 2026
e48a607
Complete migration of test imports from Hyperf\Database to Hypervel\D…
binaryfire Jan 22, 2026
f16900b
Fix type compatibility issues in tests and source files
binaryfire Jan 22, 2026
2c56a93
Fix static method conflicts in PersonalAccessToken
binaryfire Jan 22, 2026
bfb80f9
Replace registerCallback() with Laravel-style event methods
binaryfire Jan 22, 2026
1f0b4c4
Fix method signature compatibility in nested-set BaseRelation
binaryfire Jan 22, 2026
c07176d
Fix test imports and constructor calls
binaryfire Jan 22, 2026
cbe8041
Fix mock return types in Auth tests
binaryfire Jan 22, 2026
5eae49d
Add hypervel/contracts package with collection-related contracts
binaryfire Jan 23, 2026
5a36c54
Add hypervel/collections package scaffolding
binaryfire Jan 23, 2026
783a9b5
Move Arr.php from support to collections package
binaryfire Jan 23, 2026
3dad8ad
Add Collection.php from Laravel with namespace updates
binaryfire Jan 23, 2026
59876b6
Add LazyCollection.php from Laravel with namespace updates
binaryfire Jan 23, 2026
35c2350
Add Enumerable.php interface from Laravel with namespace updates
binaryfire Jan 23, 2026
be054ea
Add helper classes from Laravel with namespace updates
binaryfire Jan 23, 2026
d5e74cb
Add collection traits
binaryfire Jan 23, 2026
867bc8d
Replace TransformsToResourceCollection with Laravel version
binaryfire Jan 23, 2026
0e88c56
Add functions.php and helpers.php from Laravel
binaryfire Jan 23, 2026
a40a363
Update composer.json files and clean up support package
binaryfire Jan 23, 2026
54af20e
Update Arr.php imports to use Hypervel classes
binaryfire Jan 23, 2026
3f1c230
Modernize Collection.php types (part 1)
binaryfire Jan 23, 2026
fe6c32b
Modernize Collection.php types (part 2)
binaryfire Jan 23, 2026
f42b771
Modernize Collection.php types (part 3)
binaryfire Jan 23, 2026
0d42283
Modernize Collection.php types (part 4)
binaryfire Jan 23, 2026
e98b594
Modernize Collection.php types (part 5 - final)
binaryfire Jan 23, 2026
6f8f3a6
Modernize LazyCollection.php types (part 1)
binaryfire Jan 23, 2026
e6aa7e6
Modernize LazyCollection.php types (part 2)
binaryfire Jan 23, 2026
c852779
Modernize LazyCollection.php types (part 3)
binaryfire Jan 23, 2026
f985ecc
Modernize LazyCollection.php types (part 4)
binaryfire Jan 23, 2026
3a63448
Modernize LazyCollection.php types (part 5)
binaryfire Jan 23, 2026
22f5a6f
Modernize Enumerable.php types (part 1)
binaryfire Jan 23, 2026
5c37be8
Modernize Enumerable.php types (part 2)
binaryfire Jan 23, 2026
fb0be73
Modernize Enumerable.php types (part 3)
binaryfire Jan 23, 2026
b673666
Modernize Enumerable.php types (part 4 - final)
binaryfire Jan 23, 2026
0f6de28
Modernize EnumeratesValues.php types (part 1)
binaryfire Jan 23, 2026
b6a605f
Modernize EnumeratesValues.php types (part 2)
binaryfire Jan 23, 2026
1923a7c
Reset LazyCollection.php and Enumerable.php from Laravel
binaryfire Jan 23, 2026
b02a117
Modernize LazyCollection.php types (lines 1-1122)
binaryfire Jan 23, 2026
56faf49
Complete LazyCollection.php type modernization
binaryfire Jan 23, 2026
deac322
Modernize Enumerable.php types (partial progress)
binaryfire Jan 23, 2026
fb0f344
Continue Enumerable.php type modernization
binaryfire Jan 23, 2026
3fdd289
Fix Enumerable.php - restore generic @param docblocks
binaryfire Jan 23, 2026
3581426
Complete Enumerable.php type modernization
binaryfire Jan 23, 2026
8d28e6f
Modernize EnumeratesValues.php with PHP 8.2+ types
binaryfire Jan 23, 2026
bfc5476
Fix LazyCollection to return Iterator from getIterator/makeIterator
binaryfire Jan 23, 2026
c4aa34b
Fix PHPDoc callable syntax in eachSpread()
binaryfire Jan 23, 2026
26d9587
Fix PHPDoc callable return type parsing in avg/average
binaryfire Jan 23, 2026
8a99715
Fix Collection::zip() signature to match interface
binaryfire Jan 23, 2026
cc8023a
Fix Collection::join() return type to match interface
binaryfire Jan 23, 2026
dd8d4a1
Fix combine() parameter signature to match interface
binaryfire Jan 23, 2026
0ed3e54
Fix chunkWhile() PHPDoc to match interface signature
binaryfire Jan 23, 2026
d8e2576
Cast floor() results to int for type-safe function calls
binaryfire Jan 23, 2026
284f16c
Fix PHPDoc generic key types to use array-key
binaryfire Jan 23, 2026
ad81241
Remove dead code and fix PHPDoc after type modernization
binaryfire Jan 23, 2026
8fab67c
Remove redundant is_callable check in makeIterator()
binaryfire Jan 23, 2026
901e799
Remove redundant is_string checks in TransformsToResourceCollection
binaryfire Jan 23, 2026
dbac7c8
Fix PHPDoc bugs in collections
binaryfire Jan 23, 2026
175f565
Add inline PHPStan ignores for unfixable type limitations
binaryfire Jan 23, 2026
1100eca
Replace Hyperf\Collection with Hypervel\Support throughout codebase
binaryfire Jan 23, 2026
598c633
Fix collection port issues
binaryfire Jan 23, 2026
d7940b1
Fix Eloquent Collection method signatures to match base Collection
binaryfire Jan 23, 2026
dc373f2
Fix operatorForWhere parameter type to accept mixed
binaryfire Jan 23, 2026
f1677ae
Remove `: static` return types from collection transformation methods
binaryfire Jan 23, 2026
a92d927
Fix Model increment/decrement visibility and remove dead code
binaryfire Jan 23, 2026
4fe52e4
Fix type issues in ported Laravel database code
binaryfire Jan 23, 2026
6447eb1
Merge pull request #343 from hypervel/feature/workflows
albertcht Jan 23, 2026
005dfbc
wip
binaryfire Jan 23, 2026
3e406db
Fix NewBaseQueryBuilderTest to pass Connection to Grammar constructor
binaryfire Jan 23, 2026
6e7111f
Restore $resolvedBuilderClasses cache and fix UseEloquentBuilderTest
binaryfire Jan 23, 2026
e11ad7e
Update HasGlobalScopesTest to match Laravel behavior (no ScopedBy inh…
binaryfire Jan 23, 2026
be1489e
Fix Factory::appNamespace() to use container get() instead of make()
binaryfire Jan 23, 2026
09e934c
Use container get() instead of make() for singleton services
binaryfire Jan 23, 2026
d3a3ceb
Skip observer registration when no observers are declared
binaryfire Jan 23, 2026
59bfd10
Fix EventFake to implement Dispatcher contract and update Broadcaster…
binaryfire Jan 23, 2026
cb6de06
Port support helpers.php from Laravel, fix env() to use namespaced fu…
binaryfire Jan 23, 2026
47d9035
Replace Hyperf\Contract\Arrayable and Jsonable with Hypervel equivalents
binaryfire Jan 23, 2026
ae7e505
Add model class validation to ModelListener and update tests
binaryfire Jan 23, 2026
7b2b8fb
Add TmpIntegrationTestCase base class for Tmp integration tests
binaryfire Jan 23, 2026
04401de
Fix Event tests for Laravel-style halt behavior
binaryfire Jan 23, 2026
8332ea2
Add self-contained test fixtures for InteractsWithDatabaseTest
binaryfire Jan 23, 2026
3152ce2
Fix ConnectionInterface import in RefreshDatabaseTest
binaryfire Jan 23, 2026
885e4ec
Fix various test failures and port Fluent from Laravel
binaryfire Jan 23, 2026
3cb4710
Fix NestedSet compatibility with new Eloquent and Postgres
binaryfire Jan 23, 2026
1b0ae32
Remove hyperf/database-sqlite to use Hypervel's SQLiteConnector
binaryfire Jan 23, 2026
6d23c8c
Fix Queue test failures
binaryfire Jan 23, 2026
efb6fbf
Fix MigrationRepository::setSource to accept nullable string
binaryfire Jan 23, 2026
3512070
Fix Sanctum tests and use enum_value for BackedEnum support
binaryfire Jan 23, 2026
52a0980
wip
binaryfire Jan 23, 2026
a1e5d55
Fix failing Sentry test
binaryfire Jan 23, 2026
9b83d80
Allow null in Arr::get() first parameter
binaryfire Jan 23, 2026
c46ae15
Merge remote-tracking branch 'origin/main' into feature/database-impr…
binaryfire Jan 23, 2026
3bcd8a7
Exclude tests/Tmp from default test suite
binaryfire Jan 23, 2026
64018e8
Merge pull request #345 from binaryfire/port-missing-validation-rules
albertcht Jan 24, 2026
fa9f80c
Move contracts to contracts package wip
binaryfire Jan 24, 2026
850a824
Fix phpstan errors and update contract usages
binaryfire Jan 24, 2026
d6ace2a
Fix PHPStan errors
binaryfire Jan 24, 2026
f3d3659
Fix PHPStan errors
binaryfire Jan 24, 2026
57144b0
Fix PHPStan errors and update tests for database port
binaryfire Jan 24, 2026
2d2cc76
Update QueueWorkerTest for Worker EventDispatcher type change
binaryfire Jan 24, 2026
174b287
Fix PHPStan errors
binaryfire Jan 24, 2026
da137c9
Fix PHPStan errors
binaryfire Jan 24, 2026
9ce1c3a
Fix test suite hang caused by static afterSettingCallback
binaryfire Jan 24, 2026
41ca36a
Merge remote-tracking branch 'origin/main' into feature/database-impr…
binaryfire Jan 24, 2026
7a0e28d
Fix validation type errors from decoupled Arrayable and strict Str types
binaryfire Jan 24, 2026
236261a
Move Broadcasting contracts to contracts package
binaryfire Jan 24, 2026
dc354cd
Move Queue contracts to contracts package
binaryfire Jan 24, 2026
efbaca5
Move Auth contracts to contracts package
binaryfire Jan 24, 2026
17a944d
Move Bus contracts to contracts package
binaryfire Jan 24, 2026
5ea0d08
Move Cache contracts to contracts package
binaryfire Jan 25, 2026
a1b516b
Move Cookie contracts to contracts package
binaryfire Jan 25, 2026
474e5d1
Move Config contracts to contracts package
binaryfire Jan 25, 2026
69a92ce
Move Console contracts to contracts package
binaryfire Jan 25, 2026
a43c222
Move Database contracts to contracts package
binaryfire Jan 25, 2026
8c28d6e
Move Filesystem contracts to contracts package
binaryfire Jan 25, 2026
1c54475
Move Encryption contracts to contracts package
binaryfire Jan 25, 2026
628a973
Move cross-cutting exceptions to contracts package
binaryfire Jan 25, 2026
66b9a7c
Move Cache InvalidArgumentException to contracts package
binaryfire Jan 25, 2026
236c8c0
Move Router contracts to contracts package
binaryfire Jan 25, 2026
2619459
Move Session contracts to contracts package
binaryfire Jan 25, 2026
e2d48fc
Move Translation contracts to contracts package
binaryfire Jan 25, 2026
f603663
Move Validation contracts to contracts package
binaryfire Jan 25, 2026
d17a846
Move Hashing contracts to contracts package
binaryfire Jan 25, 2026
134225e
Move Foundation and Debug contracts to contracts package
binaryfire Jan 25, 2026
7040b90
Move Container, Mail, and Notifications contracts to contracts package
binaryfire Jan 25, 2026
b2c185d
Move Console Kernel contract to contracts package
binaryfire Jan 25, 2026
be5ba52
Move internal Console contracts back to console package
binaryfire Jan 25, 2026
84f8c7d
Move Event contracts to contracts package
binaryfire Jan 25, 2026
64ddf7d
Move Http Request and Response contracts to centralized contracts pac…
binaryfire Jan 25, 2026
fe73816
Move Pagination contracts to centralized contracts package
binaryfire Jan 25, 2026
06d660a
Tidy up Contracts
binaryfire Jan 25, 2026
e839977
Replace Hyperf\Stringable with Hypervel\Support\Str
binaryfire Jan 25, 2026
2dd3749
Remove hyperf/stringable dependency from package composer.json files
binaryfire Jan 25, 2026
ce7c3c2
Port Laravel's Env class and modernize support functions
binaryfire Jan 25, 2026
8cc7b06
Rename collections functions.php to Functions.php and remove guard
binaryfire Jan 25, 2026
99cb1a9
Add Json helper class and remove hyperf/codec dependency
binaryfire Jan 25, 2026
2120afd
Add enum support to auth package
binaryfire Jan 25, 2026
08ea1ad
Add enum support to broadcasting package
binaryfire Jan 25, 2026
908dc2d
Fix broadcasting test imports to use centralized contracts
binaryfire Jan 25, 2026
8996388
Add enum support to bus package
binaryfire Jan 25, 2026
d39bae1
Add enum support to cache package
binaryfire Jan 25, 2026
72a72b6
Add enum support to console scheduling
binaryfire Jan 25, 2026
fe38f88
Add enum support to cookie package
binaryfire Jan 25, 2026
1d300c8
Add enum support to event package
binaryfire Jan 25, 2026
29876f5
Add enum support to filesystem package
binaryfire Jan 25, 2026
0dc405a
Add enum support to foundation package
binaryfire Jan 25, 2026
32775ca
Simplify enum types in permission package
binaryfire Jan 25, 2026
13aa7bf
Simplify enum types in queue RateLimited middleware
binaryfire Jan 25, 2026
81106e6
Add enum support to redis package
binaryfire Jan 25, 2026
aa62063
Add enum support to router ThrottleRequests middleware
binaryfire Jan 25, 2026
06aaeac
Simplify enum types in sanctum package
binaryfire Jan 25, 2026
fcf2d3a
Add enum support to session package
binaryfire Jan 25, 2026
d1a818f
Add UnitEnum support to support package
binaryfire Jan 25, 2026
87e78d3
Add Collection and LazyCollection enum tests
binaryfire Jan 25, 2026
704e97a
Add enum support to Translator replacements
binaryfire Jan 25, 2026
88ba650
Simplify validation Rule type hints to use UnitEnum
binaryfire Jan 25, 2026
e17874a
Add UnitEnum support to Context class
binaryfire Jan 25, 2026
5a526bb
Reorganize Tmp tests into Database/Integration
binaryfire Jan 25, 2026
b7cc70e
Add SQLite in-memory connection pooling support and reorganize databa…
binaryfire Jan 25, 2026
96bef06
Add SQLite file-based pooling integration tests
binaryfire Jan 25, 2026
85bad0f
Rewrite SQLite file pooling tests with proper coroutine-based verific…
binaryfire Jan 25, 2026
8fa986e
Remove misleading clearPersistentPdos() method from listener tests
binaryfire Jan 25, 2026
bc980db
Fix pool connection management and add pooled-aware DatabaseManager m…
binaryfire Jan 25, 2026
a82a7bb
Add hypervel/pool package ported from hyperf/pool
binaryfire Jan 25, 2026
8886657
Update database package to use internal hypervel/pool package
binaryfire Jan 25, 2026
7c658f4
Fix disconnect() to use concrete Connection class instead of interface
binaryfire Jan 25, 2026
04b0c3e
Add regression tests for pool connection management fixes (DB-01 to D…
binaryfire Jan 25, 2026
027b593
Replace remaining Hyperf\Pool references with Hypervel\Pool
binaryfire Jan 25, 2026
6797629
Replace Hyperf\Paginator\ConfigProvider with Hypervel\Pagination\Conf…
binaryfire Jan 25, 2026
9d95104
Return NullDispatcher from getEventDispatcher() when events disabled
binaryfire Jan 25, 2026
57aa81f
Decouple Eloquent casts from Hyperf dependencies
binaryfire Jan 25, 2026
c8642d7
Use Hypervel\Context\ApplicationContext in SchemaProxy
binaryfire Jan 25, 2026
4610a82
Add hypervel/macroable package and remove hyperf/macroable dependency
binaryfire Jan 25, 2026
bdd1e0c
Replace Hyperf listener with Laravel-style PaginationServiceProvider
binaryfire Jan 25, 2026
0ca33af
Remove empty Pool ConfigProvider
binaryfire Jan 25, 2026
be1dc1c
Remove empty Pagination ConfigProvider
binaryfire Jan 25, 2026
5466902
Decouple support package from Hyperf dependencies
binaryfire Jan 25, 2026
7a1dac9
Fix duplicate --path option in devtool generator commands
binaryfire Jan 25, 2026
1c661bb
Merge branch '0.4' (changes already applied manually)
binaryfire Jan 26, 2026
bc2fb2d
Run CS fixer and fix PHPStan errors
binaryfire Jan 26, 2026
a309b2a
Fix CS fixer issues from CI
binaryfire Jan 26, 2026
fd1b2d7
Add PHPStan ignore for PHP 8.4 ReflectionProperty::hasHooks()
binaryfire Jan 26, 2026
327df71
Replace types/Database with Laravel's type assertions
binaryfire Jan 26, 2026
1300840
Add Collections and Pagination type assertions from Laravel
binaryfire Jan 26, 2026
14d5288
Apply code style fixes to type stubs
binaryfire Jan 26, 2026
bf38635
Add PHPUnit extension for automatic Mockery cleanup
binaryfire Jan 26, 2026
8a17062
Add PHPUnit attribute-based testing infrastructure
binaryfire Jan 26, 2026
e682ea1
Add defineEnvironment hook to InteractsWithContainer
binaryfire Jan 26, 2026
b163b93
Wire up testbench TestCase with testing feature traits
binaryfire Jan 26, 2026
37f7157
Refactor AuthenticateRequestsTest to use testbench hooks
binaryfire Jan 26, 2026
286f63d
Add ApplicationContract type hint to LogFeatureTest::defineEnvironment()
binaryfire Jan 26, 2026
bacd42d
Update Application contract import to Hypervel\Contracts namespace
binaryfire Jan 26, 2026
a53ade1
refactor: match Laravel database integration testing pattern
binaryfire Jan 26, 2026
96c5b10
refactor: replace hyperf/database with hypervel/database
binaryfire Jan 26, 2026
6841486
refactor: follow Laravel test patterns for database seeding
binaryfire Jan 26, 2026
bc6f1fb
chore: remove unused test migrations
binaryfire Jan 26, 2026
cda72c6
fix: align database workflows with Laravel patterns
binaryfire Jan 26, 2026
f057f8a
refactor: remove run() wrapper from coroutine safety tests
binaryfire Jan 26, 2026
a157f11
style: fix code style issues
binaryfire Jan 26, 2026
61be347
fix: run database tests on all pushes, not just main
binaryfire Jan 26, 2026
ec13004
refactor: remove run() wrapper from PooledConnectionStateTest
binaryfire Jan 26, 2026
12ce232
fix: use sqlite as alternate connection in usingConnection tests
binaryfire Jan 26, 2026
2e205d2
fix: move QueryBuilderTest seeding from setUp to test methods
binaryfire Jan 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Integration tests environment example
# Copy this file to .env and configure to run integration tests locally.
#
# Set DB_CONNECTION to the database you want to test against.
# Tests in tests/Integration/Database will run against this connection.

DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=testing
DB_USERNAME=root
DB_PASSWORD=
287 changes: 287 additions & 0 deletions .github/workflows/databases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
name: databases

on:
push:
pull_request:

jobs:
mysql_8:
runs-on: ubuntu-latest
timeout-minutes: 5

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-interval 10s
--health-timeout 5s
--health-retries 5

container:
image: phpswoole/swoole:6.0.2-php8.4

strategy:
fail-fast: true

name: MySQL 8.0

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Composer dependencies
uses: actions/cache@v4
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_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database

mysql_9:
runs-on: ubuntu-latest
timeout-minutes: 5

services:
mysql:
image: mysql:9.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-interval 10s
--health-timeout 5s
--health-retries 5

container:
image: phpswoole/swoole:6.0.2-php8.4

strategy:
fail-fast: true

name: MySQL 9.0

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Composer dependencies
uses: actions/cache@v4
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_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database

mariadb_10:
runs-on: ubuntu-latest
timeout-minutes: 5

services:
mariadb:
image: mariadb:10
env:
MARIADB_ROOT_PASSWORD: password
MARIADB_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 5

container:
image: phpswoole/swoole:6.0.2-php8.4

strategy:
fail-fast: true

name: MariaDB 10

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Composer dependencies
uses: actions/cache@v4
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_CONNECTION: mariadb
DB_HOST: mariadb
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database

pgsql_17:
runs-on: ubuntu-latest
timeout-minutes: 5

services:
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: testing
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5

container:
image: phpswoole/swoole:6.0.2-php8.4

strategy:
fail-fast: true

name: PostgreSQL 17

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Composer dependencies
uses: actions/cache@v4
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_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: testing
DB_USERNAME: postgres
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database

pgsql_18:
runs-on: ubuntu-latest
timeout-minutes: 5

services:
postgres:
image: postgres:18
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: testing
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5

container:
image: phpswoole/swoole:6.0.2-php8.4

strategy:
fail-fast: true

name: PostgreSQL 18

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Composer dependencies
uses: actions/cache@v4
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_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: testing
DB_USERNAME: postgres
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database

sqlite:
runs-on: ubuntu-latest
timeout-minutes: 5

container:
image: phpswoole/swoole:6.0.2-php8.4

strategy:
fail-fast: true

name: SQLite

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Composer dependencies
uses: actions/cache@v4
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_CONNECTION: sqlite
run: vendor/bin/phpunit tests/Integration/Database/Sqlite
4 changes: 3 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ jobs:
COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o

- name: Execute static analysis
run: vendor/bin/phpstan --configuration="phpstan.neon.dist" --memory-limit=-1
run: |
vendor/bin/phpstan --configuration="phpstan.neon.dist" --memory-limit=-1
vendor/bin/phpstan --configuration="phpstan.types.neon.dist" --memory-limit=-1
9 changes: 8 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

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

- name: Install dependencies
run: |
Expand Down
Loading