Files
portal/app/phpstan-baseline.neon
T
Дмитрий 1d4738dfa2 phase1(infra): partitions:create-months — Artisan-команда (замена pg_partman)
Закрыт пункт «pg_partman replacement» из project_phase1_strategy.md
(расширение pg_partman недоступно на native Windows-стеке без сборки
из исходников).

Реализация:
  - app/app/Console/Commands/PartitionsCreateMonths.php
    - signature: partitions:create-months {--ahead=2}
    - создаёт партиции для deals + supplier_lead_costs (обе по received_at)
    - идемпотентна (проверка через pg_class WHERE relkind='r' перед CREATE)
    - запускать ежесуточно через Windows Task Scheduler / cron

Smoke-test на dev: --ahead=8 создал 6 партиций (Nov 2026 - Jan 2027) +
12 skipped. После migrate:fresh партиции возвращаются к initial 6.

4 новых Pest-теста в PartitionsCreateMonthsTest:
  - создание партиций на 8 месяцев вперёд для обеих таблиц
  - идемпотентность (повторный --ahead=5 → 0 created, 12 skipped)
  - --ahead=0 создаёт только текущий месяц
  - INSERT в deals с received_at в новой партиции корректно роутится

Тесты используют beforeEach/afterEach для cleanup'а через
DROP TABLE ... CASCADE (FK webhook_dedup_keys на партицию propagates).

Pest 45/45 зелёные за 4.9 сек. Pint + Larastan чисто (phpstan-baseline
регенерирован для динамических свойств $this в Pest closure'ах).

CLAUDE.md v1.14 → v1.15. Реестр Открытые_вопросы v1.23 → v1.24.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:46:41 +03:00

74 lines
3.0 KiB
Plaintext

parameters:
ignoreErrors:
-
message: '#^Strict comparison using \!\=\= between int and null will always evaluate to true\.$#'
identifier: notIdentical.alwaysTrue
count: 1
path: app/Http/Middleware/SetTenantContext.php
-
message: '#^Return type \(array\<string, mixed\>\) of method Database\\Factories\\ProjectFactory\:\:definition\(\) should be compatible with return type \(array\<model property of App\\Models\\Project, mixed\>\) of method Illuminate\\Database\\Eloquent\\Factories\\Factory\<App\\Models\\Project\>\:\:definition\(\)$#'
identifier: method.childReturnType
count: 1
path: database/factories/ProjectFactory.php
-
message: '#^Return type \(array\<string, mixed\>\) of method Database\\Factories\\TenantFactory\:\:definition\(\) should be compatible with return type \(array\<model property of App\\Models\\Tenant, mixed\>\) of method Illuminate\\Database\\Eloquent\\Factories\\Factory\<App\\Models\\Tenant\>\:\:definition\(\)$#'
identifier: method.childReturnType
count: 1
path: database/factories/TenantFactory.php
-
message: '#^Return type \(array\<string, mixed\>\) of method Database\\Factories\\UserFactory\:\:definition\(\) should be compatible with return type \(array\<model property of App\\Models\\User, mixed\>\) of method Illuminate\\Database\\Eloquent\\Factories\\Factory\<App\\Models\\User\>\:\:definition\(\)$#'
identifier: method.childReturnType
count: 1
path: database/factories/UserFactory.php
-
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$partitionsBefore\.$#'
identifier: property.notFound
count: 2
path: tests/Feature/PartitionsCreateMonthsTest.php
-
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$project1Id\.$#'
identifier: property.notFound
count: 1
path: tests/Feature/RlsSmokeTest.php
-
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$project2Id\.$#'
identifier: property.notFound
count: 1
path: tests/Feature/RlsSmokeTest.php
-
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant1Id\.$#'
identifier: property.notFound
count: 5
path: tests/Feature/RlsSmokeTest.php
-
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant2Id\.$#'
identifier: property.notFound
count: 5
path: tests/Feature/RlsSmokeTest.php
-
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:get\(\)\.$#'
identifier: method.notFound
count: 2
path: tests/Feature/SetTenantContextTest.php
-
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:withHeaders\(\)\.$#'
identifier: method.notFound
count: 3
path: tests/Feature/SetTenantContextTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/Unit/ExampleTest.php