lukinovec
c89c2938fe
Improve method name
2025-05-29 13:28:56 +02:00
lukinovec
bfe62611e0
Improve comment
2025-05-29 13:15:35 +02:00
lukinovec
a1e8324fb5
Use consistent shortest path terminology
2025-05-29 13:13:41 +02:00
lukinovec
c867ecec44
Update the tree terminology
2025-05-29 13:06:54 +02:00
github-actions[bot]
82f9138666
Fix code style (php-cs-fixer)
2025-05-29 10:52:24 +00:00
lukinovec
233dbd0184
Improve readability
2025-05-29 12:51:37 +02:00
lukinovec
973f7994c3
Improve code for determining the shortest path
2025-05-29 12:51:37 +02:00
lukinovec
1bfac014ab
Test uncovered edge cases
2025-05-29 12:51:36 +02:00
lukinovec
3e8cb02981
Improve TableRLSManager comments
2025-05-29 12:51:36 +02:00
github-actions[bot]
759931394c
Fix code style (php-cs-fixer)
2025-05-28 13:56:50 +00:00
lukinovec
a3b925b362
Refactor TableRLSManagerr (dynamic programming, deal with recursive relationships, determine shortest paths while generating the paths)
2025-05-28 15:56:25 +02:00
lukinovec
37edba8dbc
Improve comments
2025-05-21 14:10:46 +02:00
github-actions[bot]
3d6be96f7d
Fix code style (php-cs-fixer)
2025-05-21 12:05:11 +00:00
lukinovec
640ba9e7f1
Correct terminology, add test for throwing exceptions
2025-05-21 14:03:51 +02:00
lukinovec
adfddab951
Make path skipping logic more explicit
2025-05-21 14:03:51 +02:00
lukinovec
349ac6e9fc
Simplify and clarify comment-related TableRLSManager code
2025-05-21 14:03:51 +02:00
lukinovec
f65c64c9c7
Correct comment functionality, add comment constraint exception
2025-05-21 14:03:51 +02:00
github-actions[bot]
a52745704e
Fix code style (php-cs-fixer)
2025-05-20 11:59:09 +00:00
lukinovec
c80b28cf00
Add option to provide constraint information in column comment
2025-05-20 13:58:33 +02:00
lukinovec
588d1fcc0d
[4.x] Make TableRLSManager skip foreign keys with 'no-rls' comment right away ( #1352 )
...
* When a foreign key has no-rls comment (or no comment when scopeByDefault is false), skip path generation earlier
* Fix column definitions
2025-05-15 14:54:04 +02:00
27685ffe5a
improve sample RootUrlBootstrapper config
2025-05-09 15:15:22 +02:00
lukinovec
dc90e60a2f
[4.x] Make ScopeSessions usable on universal routes ( #1342 )
...
* Skip ScopeSessions MW if the current context is central and the route is universal
* Add regressiont test
* Simplify code
---------
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2025-04-04 03:15:37 +02:00
lukinovec
8cd15db1fc
[4.x] Make RemoveStorageSymlinksAction able to delete broken symlinks ( #1323 )
...
* Add regression test for removing invalid symlinks
* Move commented RemoveStorageSymlinks job to the DeletingTenant pipeline (better default - the symlinks will be removed *before* deleting tenant storage)
* Remove symlink validity check from symlinkExists() (only check for the symlink's existence)
* Delete complete todo0
* Make the symlink assertions more explicit
* update test name
---------
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2025-03-18 21:27:27 +01:00
Alexandru Bucur
8d87ee9dfc
[4.x] Add ULIDGenerator ( #1332 )
...
* feat: introduce a simple ULID generator
* add test
---------
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2025-03-18 19:00:35 +01:00
Sergio Peris
84a2863d2d
[4.x] Fix fully qualified name at TenancyServiceProvider.stub.php ( #1334 )
2025-03-18 18:56:29 +01:00
95dd906de2
[4.x] Make the ImpersonationToken model configurable ( #1335 )
...
* Make the ImpersonationToken model configurable, resolve #1315
* Add type definition
* Make phpstan happy
2025-03-18 18:42:08 +01:00
37a0f1a713
[4.x] Invalidate resolver cache on delete ( #1329 )
...
* Invalidate resolver cache on delete
* Fix code style (php-cs-fixer)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-13 17:03:49 +01:00
8960a83047
[4.x] Laravel 12 support ( #1321 )
...
* Add Laravel 12 support, drop Laravel 11 support
* Fix RLS tree generation (specify schema name in generateTrees())
* ci fixes, use stable virtualcolumn version
---------
Co-authored-by: lukinovec <lukinovec@gmail.com>
2025-02-25 16:26:18 +01:00
657e165cc8
[4.x] Cleanup ( #1317 )
...
* cleanup, resolve todos, add immediate todos
* Improve path_identification_middleware docblock
* rename leave() method in tests
* wip fix hardcoded values making assumptions about the parameters used in routing
* defaultParameterNames
* fix CreatesDatabaseUsers return values
* $tenant -> tenant()
* resolve more todos
* make comment block a complete block
* Correct useTenantRoutesInFortify(), delete unused import
* test fixes
* remove todos
* remove JobPipeline todo
* simplify comment example
* remove todo
* fix VERSION_PREFIX in queue.yml
---------
Co-authored-by: lukinovec <lukinovec@gmail.com>
2025-02-20 20:49:09 +01:00
eac88dcc2a
contributing note about mssql on Apple Silicon
2025-02-19 12:38:35 +01:00
ffad2db103
fix regression in previous commit: consume PendingDispatch *before* reverting context
2025-02-19 12:28:38 +01:00
b9cc63feed
handle exceptions in Tenancy:run()
2025-02-19 12:02:58 +01:00
7bc2bb6f6a
Revert "Add laravel/framework:dev-master to CI matrix"
...
This reverts commit 29bfe532fa .
2025-02-14 14:35:34 +01:00
29bfe532fa
Add laravel/framework:dev-master to CI matrix
2025-02-14 14:20:41 +01:00
lukinovec
cecf07a8c9
[4.x] Add tenant parameter to defaults() in UrlGeneratorBootstrapper ( #1311 )
...
* Pass tenant parameter using defaults in UrlGeneratorBootstrapper, update tests accordingly (wip)
* Fix code style (php-cs-fixer)
* Update bootstrapper
* Improve TenancyUrlGenerator docblocks
* Improve bootstrapper/TenancyUrlGenerator tests (WIP)
* Improve route() name prefixing test
* Keep `UrlGeneratorBootstrapper::$addTenantParameterToDefaults` disabled by default
* Add `$override` functionality to TenancyUrlGenerator
* Test $override functionality, update new defaults in the bootstrapper tests
* Fix code style (php-cs-fixer)
* Update comments
* Update routeNameOverride()
* cleanup
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2025-02-14 13:57:29 +01:00
lukinovec
fffaf7c58c
Test ecnrypted casts ( #1284 )
2025-02-14 08:48:16 +01:00
30ee4e9529
[4.x] Fix 1267: early return in runForMultiple if an empty array is passed ( #1286 )
...
* fix 1267: early return in runForMultiple if an empty array is passed
* Test that runForMulltiple runs the passed closure for the right tenants
* Correct comment
---------
Co-authored-by: lukinovec <lukinovec@gmail.com>
2025-02-14 08:19:02 +01:00
25360f6b6a
[4.x] Improve id generators ( #1300 )
...
* add RandomIntGenerator
* remove string assertions
* make int ranges configurable
* update test to use min & max
2025-01-21 17:06:15 +01:00
7ce7629864
use mysql:8 in docker
2025-01-21 15:23:17 +01:00
8f2cb894ce
phpstan fixes for spatie invader
2025-01-21 14:35:00 +01:00
c239239972
fix #1297 - require spatie/invade:*
2025-01-21 14:19:22 +01:00
lukinovec
8b131ed647
Allow overriding root URL in tests by default ( #1296 )
...
* Allow overriding root URL in tests by default
* Add todo@revisit
2025-01-17 10:20:40 +01:00
Samuel Štancl
5d3b3d3c21
[4.x] Improve RootUrl and UrlGenerator bootstrappers ( #1294 )
...
* Make RootUrlBootstrapper run ONLY in CLI by default (add $rootUrlOverrideInTests), work with resolved UrlGenerator
* Make resolving 'url' return a pre-created generator instance instead of creating it on every app('url') call
* Take care of doubling tenant keys in TenancyUrlGenerator, add regression test for using UrlGenerator and RootUrl bootstrappers together
* Fix code style (php-cs-fixer)
* refactor RootUrlBootstrapper
* add docblock
* clarify docblock
* simplify test: use concrete values instead of overly dynamic code
* Fix bootstrapper order in test, add url('/') assertion
* Use $this->app instead of app()
* Improve TenancyUrlGenerator and RootUrlBootstrapperTest clarity
* Revert attempt to maintain compatibility between the two bootstrappers
* Delete bootstrapper combining test
* Fix code style (php-cs-fixer)
---------
Co-authored-by: lukinovec <lukinovec@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2025-01-16 10:30:06 +01:00
Samuel Štancl
8f958d5779
[4.x] Queue logic refactor ( #1289 )
...
* simplify QueueTenancyBootstrapper
* wip: add persistent queue bootstrapper, minor testcase refactor
* ci: run persistent queue tests
* simplify persistent queue bootstrapper
* Fix code style (php-cs-fixer)
* phpstan fixes, clarify previousTenant use
* remove false positive regression test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-14 13:49:16 +01:00
lukinovec
0e223e0484
[4.x] Fix tenants:run argument parsing ( #1287 )
...
* Use StringInput instead of ArgvInput so that tenants:run accepts args properly
* Test that tenants:run parses the arguments correctly
* Fix code style (php-cs-fixer)
* Fix PHPStan issue
* remove unnecessary ()
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2025-01-11 12:03:09 +01:00
f955b38e2b
phpstan fixes
2025-01-05 15:50:30 +01:00
3c183e45d9
fix #1277 : consume PendingDispatch return values in Tenancy::run()
2025-01-04 15:57:01 +01:00
99357d94df
ci: make phpcsfixer job use GH bot account
2025-01-04 15:37:20 +01:00
Samuel Štancl
a88a42fbbf
[4.x] Add DisallowSqliteAttach feature ( #1283 )
...
* queue.yml: remove TENANCY_VERSION env var from test.sh
* add DisallowSqliteAttach feature
* Fix code style (php-cs-fixer)
* ci: add cd to each step
* ci: simpler solution to race conditions, proper os/arch matrix
* ci: fix runs-on matrix
* ci: fix workflow on windows, fix makefile
* Auto-build: Update extensions [skip ci]
* Auto-build: Update extensions [skip ci]
* ci: try fixing retry logic, make makefile use cl on Windows
* ci: use the current branch for rebase
* ci: try calling vcvars64
* ci: misc minor fixes
* ci: try fixing c compiler on windows
* ci: misc minor fixes
* ci: add debug steps
* ci: try to fix windows build
* ci: try using clang on windows
* ci: windows fixes, makefile fix
* Auto-build: Update extensions [skip ci]
* ci: dont produce .exp .lib on Windows
* ci: try forcing shell: bash on commit step
* ci: try to get linux cross-compilation working
* ci: reformulate condition
* ci: fix syntax error
* ci: correct debian image name
* Auto-build: Update extensions [skip ci]
* ci: try to set up macOS cross-compilation
* ci: add ARCH variable to makefile, override it during cross-compilation
* Auto-build: Update extensions [skip ci]
* ci: X64 -> x64
* ci: only trigger extensions.yml on pushes to extensions/
* fix tests on x64
* ci: try using bash for pushing on windows; ignore phpstan error
* fix test failing in ci but passing locally
* bump php version in composer.json, trigger extensions.yml build
* remove comment
* noattach: more explicit return values, avoid potential non-bool return values
* makefile: use -Os on Windows
* ci: use make -B
* ci: try triggering extensions build on extensions.yml file changes
* Auto-build: Update extensions [skip ci]
* Auto-build: Update extensions [skip ci]
* ci: remove windows linker flag, use a whitelist for git add
* Auto-build: Update extensions [skip ci]
* Auto-build: Update extensions [skip ci]
* Auto-build: Update extensions [skip ci]
* fix path in feature class, minor refactor
* Fix code style (php-cs-fixer)
---------
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-04 15:34:37 +01:00
Michael Kampmann Petræus
6b38a356cb
fix: drop tenant databases on migrate fresh without domains ( #1282 )
2025-01-01 20:31:47 +01:00