4d38f75826
Триггер фазы 1 запущен 08.05.2026 (вечер): composer create-project laravel/laravel app Стек подтверждён native (без Docker/WSL2/Sail): - PostgreSQL 16.13 (Chocolatey, Windows-сервис, port 5432) - Memurai Developer 4.1.8 (Redis 7-совм., port 6379) — TCP +PONG OK - PHP 8.3.31 + 11/11 Laravel-required ext (pdo_pgsql, mbstring, openssl, tokenizer, xml, ctype, json, bcmath, fileinfo, curl, pgsql) - Composer 2.9.7 Что в коммите (59 файлов, 11059 строк скаффолда Laravel 11 + правки): - composer require predis/predis (v3.4.2) — PHP-only Redis-клиент, т.к. php_redis ext не установлен (см. project_phase1_strategy.md) - app/.env (gitignored) — APP_NAME=Liderra, APP_LOCALE=ru, APP_TIMEZONE=Europe/Moscow, DB_CONNECTION=pgsql → liderra@localhost, REDIS_CLIENT=predis - app/.env.example — те же правки без секретов (для команды) Smoke-test PG ↔ Laravel ↔ pdo_pgsql прошёл: 3/3 default-миграций → 9 таблиц в liderra (cache, cache_locks, failed_jobs, job_batches, jobs, migrations, password_reset_tokens, sessions, users). Артефакт стартера app/database/database.sqlite (0 B) удалён — sqlite не используется. Что НЕ в этом коммите (следующие шаги фазы 1): - Pest 3 swap (CTO-12) — composer remove phpunit + require pest - Laravel Boost MCP + 9 guidelines disable по CLAUDE.md §5/§7 - Pint, Larastan, Roave/SecurityAdvisories, IDE Helper, squawk, pgFormatter (Прил. Н #11–18) - resources/boost/guidelines/vuetify.blade.php Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
185 lines
6.8 KiB
PHP
185 lines
6.8 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Str;
|
|
use Pdo\Mysql;
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Default Database Connection Name
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you may specify which of the database connections below you wish
|
|
| to use as your default connection for database operations. This is
|
|
| the connection which will be utilized unless another connection
|
|
| is explicitly specified when you execute a query / statement.
|
|
|
|
|
*/
|
|
|
|
'default' => env('DB_CONNECTION', 'sqlite'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Database Connections
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Below are all of the database connections defined for your application.
|
|
| An example configuration is provided for each database system which
|
|
| is supported by Laravel. You're free to add / remove connections.
|
|
|
|
|
*/
|
|
|
|
'connections' => [
|
|
|
|
'sqlite' => [
|
|
'driver' => 'sqlite',
|
|
'url' => env('DB_URL'),
|
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
|
'prefix' => '',
|
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
|
'busy_timeout' => null,
|
|
'journal_mode' => null,
|
|
'synchronous' => null,
|
|
'transaction_mode' => 'DEFERRED',
|
|
],
|
|
|
|
'mysql' => [
|
|
'driver' => 'mysql',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
'port' => env('DB_PORT', '3306'),
|
|
'database' => env('DB_DATABASE', 'laravel'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', ''),
|
|
'unix_socket' => env('DB_SOCKET', ''),
|
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
'strict' => true,
|
|
'engine' => null,
|
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
|
(PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
|
|
]) : [],
|
|
],
|
|
|
|
'mariadb' => [
|
|
'driver' => 'mariadb',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
'port' => env('DB_PORT', '3306'),
|
|
'database' => env('DB_DATABASE', 'laravel'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', ''),
|
|
'unix_socket' => env('DB_SOCKET', ''),
|
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
'strict' => true,
|
|
'engine' => null,
|
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
|
(PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
|
|
]) : [],
|
|
],
|
|
|
|
'pgsql' => [
|
|
'driver' => 'pgsql',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
'port' => env('DB_PORT', '5432'),
|
|
'database' => env('DB_DATABASE', 'laravel'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', ''),
|
|
'charset' => env('DB_CHARSET', 'utf8'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
'search_path' => 'public',
|
|
'sslmode' => env('DB_SSLMODE', 'prefer'),
|
|
],
|
|
|
|
'sqlsrv' => [
|
|
'driver' => 'sqlsrv',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', 'localhost'),
|
|
'port' => env('DB_PORT', '1433'),
|
|
'database' => env('DB_DATABASE', 'laravel'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', ''),
|
|
'charset' => env('DB_CHARSET', 'utf8'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
|
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
|
],
|
|
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Migration Repository Table
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This table keeps track of all the migrations that have already run for
|
|
| your application. Using this information, we can determine which of
|
|
| the migrations on disk haven't actually been run on the database.
|
|
|
|
|
*/
|
|
|
|
'migrations' => [
|
|
'table' => 'migrations',
|
|
'update_date_on_publish' => true,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Redis Databases
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Redis is an open source, fast, and advanced key-value store that also
|
|
| provides a richer body of commands than a typical key-value system
|
|
| such as Memcached. You may define your connection settings here.
|
|
|
|
|
*/
|
|
|
|
'redis' => [
|
|
|
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
|
|
|
'options' => [
|
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
|
'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'),
|
|
'persistent' => env('REDIS_PERSISTENT', false),
|
|
],
|
|
|
|
'default' => [
|
|
'url' => env('REDIS_URL'),
|
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
|
'username' => env('REDIS_USERNAME'),
|
|
'password' => env('REDIS_PASSWORD'),
|
|
'port' => env('REDIS_PORT', '6379'),
|
|
'database' => env('REDIS_DB', '0'),
|
|
'max_retries' => env('REDIS_MAX_RETRIES', 3),
|
|
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
|
|
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
|
|
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
|
|
],
|
|
|
|
'cache' => [
|
|
'url' => env('REDIS_URL'),
|
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
|
'username' => env('REDIS_USERNAME'),
|
|
'password' => env('REDIS_PASSWORD'),
|
|
'port' => env('REDIS_PORT', '6379'),
|
|
'database' => env('REDIS_CACHE_DB', '1'),
|
|
'max_retries' => env('REDIS_MAX_RETRIES', 3),
|
|
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
|
|
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
|
|
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
|
|
],
|
|
|
|
],
|
|
|
|
];
|