Update Kernel.php for writable base handling, add .htaccess for routing, and modify manifest.json and liara.json
- Refactored Kernel.php to ensure writable base directory is set correctly for production on Liara. - Added .htaccess file to forward requests to the public directory, addressing the limitation of Liara's PHP platform. - Updated manifest.json with new modification times and AST hashes for affected files. - Minor formatting change in liara.json to ensure proper file structure.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Liara's generic PHP platform serves the project root as DocumentRoot and offers
|
||||
# no way to point it at public/ (only the dedicated "laravel" platform does that
|
||||
# automatically, but that would run artisan/npm — wrong for Symfony). Symfony's
|
||||
# recommended setup is DocumentRoot=public/; since that's unavailable here, forward
|
||||
# every request into public/ and let public/.htaccess route to index.php.
|
||||
DirectoryIndex public/index.php
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# Block direct external access to the public/ prefix (e.g. /public/index.php).
|
||||
# Real assets are referenced as /build/... not /public/... . THE_REQUEST holds
|
||||
# the ORIGINAL request line, so this does NOT match the internal rewrite below.
|
||||
RewriteCond %{THE_REQUEST} \s/+public/ [NC]
|
||||
RewriteRule ^ - [R=404,L]
|
||||
|
||||
# Forward everything into public/. The negative lookahead (?!public/) stops the
|
||||
# internal rewrite from looping (public/ -> public/public/...). Anything outside
|
||||
# public/ (e.g. /.env, /src/...) maps to a non-existent public/<path> and falls
|
||||
# through to the front controller as a 404 — root files are never served.
|
||||
RewriteRule ^(?!public/)(.*)$ public/$1 [L]
|
||||
</IfModule>
|
||||
@@ -669,5 +669,6 @@
|
||||
"667": "Community 667",
|
||||
"668": "Community 668",
|
||||
"669": "Community 669",
|
||||
"670": "Community 670"
|
||||
"670": "Community 670",
|
||||
"671": "Community 671"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# Graph Report - clinicpro (2026-06-29)
|
||||
|
||||
## Corpus Check
|
||||
- 646 files · ~446,773 words
|
||||
- 646 files · ~446,822 words
|
||||
- Verdict: corpus is large enough that graph structure adds value.
|
||||
|
||||
## Summary
|
||||
- 8211 nodes · 11320 edges · 671 communities (548 shown, 123 thin omitted)
|
||||
- 8212 nodes · 11323 edges · 672 communities (551 shown, 121 thin omitted)
|
||||
- Extraction: 98% EXTRACTED · 2% INFERRED · 0% AMBIGUOUS · INFERRED: 261 edges (avg confidence: 0.8)
|
||||
- Token cost: 0 input · 0 output
|
||||
|
||||
## Graph Freshness
|
||||
- Built from commit: `9bff63bf`
|
||||
- Built from commit: `c71d674d`
|
||||
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
|
||||
- Run `graphify update .` after code changes (no API cost).
|
||||
|
||||
@@ -671,6 +671,7 @@
|
||||
- [[_COMMUNITY_Community 667|Community 667]]
|
||||
- [[_COMMUNITY_Community 668|Community 668]]
|
||||
- [[_COMMUNITY_Community 669|Community 669]]
|
||||
- [[_COMMUNITY_Community 671|Community 671]]
|
||||
|
||||
## God Nodes (most connected - your core abstractions)
|
||||
1. `BaseController` - 74 edges
|
||||
@@ -699,7 +700,7 @@
|
||||
## Import Cycles
|
||||
- None detected.
|
||||
|
||||
## Communities (671 total, 123 thin omitted)
|
||||
## Communities (672 total, 121 thin omitted)
|
||||
|
||||
### Community 0 - "Community 0"
|
||||
Cohesion: 0.05
|
||||
@@ -718,8 +719,8 @@ Cohesion: 0.05
|
||||
Nodes (42): PaginatedResponse, formatDate(), STATUS_FILTERS, FILTERS, Breakdown, SOURCE_LABEL, Summary, STATUS_FILTERS (+34 more)
|
||||
|
||||
### Community 4 - "Community 4"
|
||||
Cohesion: 0.06
|
||||
Nodes (8): DoctorService, Doctor, DoctorServiceRepository, Collection, self, User, WeeklySchedule, ManagerRegistry
|
||||
Cohesion: 0.05
|
||||
Nodes (11): DoctorServiceController, DoctorService, Doctor, DoctorServiceRepository, Collection, self, User, WeeklySchedule (+3 more)
|
||||
|
||||
### Community 5 - "Community 5"
|
||||
Cohesion: 0.07
|
||||
@@ -766,8 +767,8 @@ Cohesion: 0.10
|
||||
Nodes (13): PaymentController, MockGateway, SepGateway, JsonResponse, Payment, PaymentGatewayInterface, Request, Response (+5 more)
|
||||
|
||||
### Community 16 - "Community 16"
|
||||
Cohesion: 0.07
|
||||
Nodes (7): PatientSession, SmsWallet, Appointment, Collection, PatientRecord, self, SessionService
|
||||
Cohesion: 0.09
|
||||
Nodes (6): PatientSession, Appointment, Collection, PatientRecord, self, SessionService
|
||||
|
||||
### Community 17 - "Community 17"
|
||||
Cohesion: 0.05
|
||||
@@ -782,16 +783,16 @@ Cohesion: 0.07
|
||||
Nodes (21): Contract, InsuranceOption, KIND_LABEL, Claim, ClaimItem, DebtRow, InsuranceOption, KIND_LABEL (+13 more)
|
||||
|
||||
### Community 20 - "Community 20"
|
||||
Cohesion: 0.12
|
||||
Nodes (4): AdminApiController, InputValidator, JsonResponse, Request
|
||||
Cohesion: 0.15
|
||||
Nodes (3): AdminApiController, JsonResponse, Request
|
||||
|
||||
### Community 21 - "Community 21"
|
||||
Cohesion: 0.05
|
||||
Nodes (34): formatNumber(), ClinicDetailPage(), AdminCharts, AdminDashboard(), AdminRecent, AdminStats, APPT_CLS, APPT_COLOR (+26 more)
|
||||
|
||||
### Community 22 - "Community 22"
|
||||
Cohesion: 0.11
|
||||
Nodes (14): RatingController, Like, Rate, LikeRepository, RateRepository, JsonResponse, Request, User (+6 more)
|
||||
Cohesion: 0.12
|
||||
Nodes (10): RatingController, Like, CommentListNPlusOneTest, LikeRepository, JsonResponse, Request, User, Comment (+2 more)
|
||||
|
||||
### Community 23 - "Community 23"
|
||||
Cohesion: 0.05
|
||||
@@ -914,8 +915,8 @@ Cohesion: 0.07
|
||||
Nodes (26): الزامات UI, باگفیکس صفحه نوبتها, باگ ۱ — کرش تقویم, باگ ۲ — روز هفته در DateNavigator, باگ ۳ — پیام «slot نیست», باگ ۴ — نوبت جدید: نام اجباری + find-or-create patient, باگ ۵ — patient_mobile نشان میدهد موبایل پزشک, باگ ۶ — نوبتهای رزرو شده در نمایش زمانبندی (+18 more)
|
||||
|
||||
### Community 53 - "Community 53"
|
||||
Cohesion: 0.10
|
||||
Nodes (14): ClaimItemRepository, DoctorInsuranceRepository, PreRegistrationRepository, SessionServiceRepository, SmsSettingsRepository, ServiceEntityRepository, SmsSettings, ManagerRegistry (+6 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (13): ClaimItemRepository, ClinicStaffRepository, PreRegistrationRepository, SessionServiceRepository, SiteConfigRepository, ServiceEntityRepository, ManagerRegistry, ManagerRegistry (+5 more)
|
||||
|
||||
### Community 54 - "Community 54"
|
||||
Cohesion: 0.10
|
||||
@@ -934,8 +935,8 @@ Cohesion: 0.08
|
||||
Nodes (24): Blog API, DELETE `/api/v1/blog/{uuid}`, Errors, Errors, Errors, Errors, Errors, GET `/api/v1/blog/{slug}` (+16 more)
|
||||
|
||||
### Community 58 - "Community 58"
|
||||
Cohesion: 0.28
|
||||
Nodes (4): Blog, BlogRepository, ManagerRegistry, QueryBuilder
|
||||
Cohesion: 0.15
|
||||
Nodes (8): Blog, BlogController, BlogRepository, JsonResponse, Request, User, ManagerRegistry, QueryBuilder
|
||||
|
||||
### Community 59 - "Community 59"
|
||||
Cohesion: 0.22
|
||||
@@ -965,6 +966,10 @@ Nodes (4): SmsWalletController, JsonResponse, Request, User
|
||||
Cohesion: 0.08
|
||||
Nodes (24): 2. کاربر (User), 4. 🔵 `POST` verify code, 5. 🔵 `POST` send code, 6. 🔵 `POST` register, 7. 🔴 `DELETE` delete user, 8. 🟡 `PATCH` patch, 9. 🟢 `GET` list secretary, Request Body (+16 more)
|
||||
|
||||
### Community 66 - "Community 66"
|
||||
Cohesion: 0.07
|
||||
Nodes (4): ClinicStaff, SmsWallet, AppointmentExpiryService, self
|
||||
|
||||
### Community 67 - "Community 67"
|
||||
Cohesion: 0.11
|
||||
Nodes (4): Invoice, Collection, InvoiceItem, self
|
||||
@@ -1014,8 +1019,8 @@ Cohesion: 0.09
|
||||
Nodes (22): dependencies, @ckeditor/ckeditor5-build-classic, @ckeditor/ckeditor5-react, @fontsource/vazirmatn, @heroicons/react, @hookform/resolvers, jalaali-js, leaflet (+14 more)
|
||||
|
||||
### Community 82 - "Community 82"
|
||||
Cohesion: 0.08
|
||||
Nodes (9): KavehNegarProvider, RanginehProvider, SmsLogRepository, OtpService, SmsService, SmsLog, ManagerRegistry, SendSmsMessage (+1 more)
|
||||
Cohesion: 0.12
|
||||
Nodes (5): KavehNegarProvider, RanginehProvider, SmsService, SendSmsMessage, SmsProviderInterface
|
||||
|
||||
### Community 83 - "Community 83"
|
||||
Cohesion: 0.09
|
||||
@@ -1031,7 +1036,7 @@ Nodes (29): devDependencies, @babel/core, @babel/preset-env, @babel/preset-react
|
||||
|
||||
### Community 86 - "Community 86"
|
||||
Cohesion: 0.07
|
||||
Nodes (14): AppointmentExpiryServiceTest, LowTierFixesTest, SendCodeMobileRateLimitTest, ClaimsListPaginationTest, ServiceItemStaffOwnershipTest, EntityManagerInterface, KernelBrowser, CommentListNPlusOneTest (+6 more)
|
||||
Nodes (13): AppointmentExpiryServiceTest, LowTierFixesTest, SendCodeMobileRateLimitTest, ClaimsListPaginationTest, ServiceItemStaffOwnershipTest, EntityManagerInterface, KernelBrowser, CommentPaginationTest (+5 more)
|
||||
|
||||
### Community 87 - "Community 87"
|
||||
Cohesion: 0.10
|
||||
@@ -1102,8 +1107,8 @@ Cohesion: 0.35
|
||||
Nodes (5): PatientController, JsonResponse, PatientSession, Request, User
|
||||
|
||||
### Community 104 - "Community 104"
|
||||
Cohesion: 0.18
|
||||
Nodes (6): TagController, TagRepository, JsonResponse, Request, ManagerRegistry, Tag
|
||||
Cohesion: 0.35
|
||||
Nodes (3): TagController, JsonResponse, Request
|
||||
|
||||
### Community 105 - "Community 105"
|
||||
Cohesion: 0.11
|
||||
@@ -1650,8 +1655,8 @@ Cohesion: 0.18
|
||||
Nodes (11): Appointment Management, Error Responses, GET `/api/v1/admin/appointments`, GET `/api/v1/admin/appointments/today-stats`, POST `/api/v1/admin/appointment`, Query Parameters, Query Parameters, Request Body (+3 more)
|
||||
|
||||
### Community 251 - "Community 251"
|
||||
Cohesion: 0.36
|
||||
Nodes (3): DoctorServiceController, JsonResponse, Request
|
||||
Cohesion: 0.21
|
||||
Nodes (4): SmsLogRepository, OtpService, SmsLog, ManagerRegistry
|
||||
|
||||
### Community 252 - "Community 252"
|
||||
Cohesion: 0.45
|
||||
@@ -1851,7 +1856,7 @@ Nodes (16): آمادهسازی پروژه ClinicPro برای دیپلوی ر
|
||||
|
||||
### Community 304 - "Community 304"
|
||||
Cohesion: 0.22
|
||||
Nodes (9): 30. 🟢 `GET` get 🆕, 33. 🔵 `POST` image_clinic, 34. 🔵 `POST` image logo, 6. کلینیک (Clinic), هدرهای اضافی, هدرهای اضافی, پاسخها, پاسخها (+1 more)
|
||||
Nodes (9): 30. 🟢 `GET` get 🆕, 33. 🔵 `POST` image_clinic, 36. 🟢 `GET` get my rate, 6. کلینیک (Clinic), هدرهای اضافی, هدرهای اضافی, پاسخها, پاسخها (+1 more)
|
||||
|
||||
### Community 306 - "Community 306"
|
||||
Cohesion: 0.07
|
||||
@@ -2197,14 +2202,18 @@ Nodes (6): ClaimAmountBoundsTest, ClaimsListNPlusOneTest, ClaimItem, Claim, Doct
|
||||
Cohesion: 0.33
|
||||
Nodes (4): initiate(), verify(), PaymentInitResult, PaymentVerifyResult
|
||||
|
||||
### Community 399 - "Community 399"
|
||||
Cohesion: 0.23
|
||||
Nodes (5): AbstractMigration, Schema, Version20260609130407, Schema, Version20260609132009
|
||||
|
||||
### Community 401 - "Community 401"
|
||||
Cohesion: 0.38
|
||||
Nodes (5): Rate, RateRepository, Doctor, ManagerRegistry, User
|
||||
|
||||
### Community 418 - "Community 418"
|
||||
Cohesion: 0.17
|
||||
Nodes (11): دیپلوی ClinicPro روی Coolify (Docker Compose), رفع اشکال, مراحل دیپلوی, معماری دیپلوی, نکات عملیاتی, چند دامنه فرانتاند (مهم), ۱. ساخت Resource در Coolify, ۲. اختصاص دامنه (+3 more)
|
||||
|
||||
### Community 423 - "Community 423"
|
||||
Cohesion: 0.23
|
||||
Nodes (5): AbstractMigration, Schema, Version20260610183655, Schema, Version20260624030339
|
||||
|
||||
### Community 452 - "Community 452"
|
||||
Cohesion: 0.10
|
||||
Nodes (12): ClinicAddress, ClinicDoctorItem, ClinicInvitation, EditForm, editSchema, HUES_LIST, INV_STATUS_MAP, IRAN_CENTER (+4 more)
|
||||
@@ -2233,6 +2242,10 @@ Nodes (6): ادمین — همه لینکهای فعلی (بدون تغییر
|
||||
Cohesion: 0.33
|
||||
Nodes (6): سناریوهای چند-context, قانون انتخاب context:, مفاهیم کلیدی معماری Multi-Context (مهم — قبل از پیادهسازی بخوان), مفهوم `available_contexts`, مفهوم `db_key`, مفهوم `db_uuid`
|
||||
|
||||
### Community 463 - "Community 463"
|
||||
Cohesion: 0.39
|
||||
Nodes (3): TagRepository, ManagerRegistry, Tag
|
||||
|
||||
### Community 465 - "Community 465"
|
||||
Cohesion: 0.12
|
||||
Nodes (16): راهاندازی تست و نوشتن تستسوئیت کامل برای Admin SPA, زمینه, فایلهای مرتبط, مشکل / هدف, نکات مهم, وضعیت فعلی, وظایف, پروژه (+8 more)
|
||||
@@ -2582,7 +2595,7 @@ Cohesion: 0.50
|
||||
Nodes (4): GET /api/v1/sms/wallet/balance, GET /api/v1/sms/wallet/logs, POST /api/v1/sms/wallet/charge, SMS Wallet
|
||||
|
||||
### Community 561 - "Community 561"
|
||||
Cohesion: 0.40
|
||||
Cohesion: 0.43
|
||||
Nodes (3): BaseKernel, MicroKernelTrait, Kernel
|
||||
|
||||
### Community 563 - "Community 563"
|
||||
@@ -2678,8 +2691,8 @@ Cohesion: 0.67
|
||||
Nodes (3): POST `/api/v1/admin/sms/template/{uuid}/approve`, Request Body (`application/json`), Response `200`
|
||||
|
||||
### Community 602 - "Community 602"
|
||||
Cohesion: 0.33
|
||||
Nodes (4): BlogController, JsonResponse, Request, User
|
||||
Cohesion: 0.48
|
||||
Nodes (3): DoctorInsuranceRepository, DoctorInsurance, ManagerRegistry
|
||||
|
||||
### Community 603 - "Community 603"
|
||||
Cohesion: 0.67
|
||||
@@ -2714,8 +2727,8 @@ Cohesion: 0.25
|
||||
Nodes (4): SmsMessageTemplateRepository, SmsTextResolver, SmsMessageTemplate, ManagerRegistry
|
||||
|
||||
### Community 625 - "Community 625"
|
||||
Cohesion: 0.39
|
||||
Nodes (3): ClinicStaffRepository, ClinicStaff, ManagerRegistry
|
||||
Cohesion: 0.48
|
||||
Nodes (3): SmsSettingsRepository, SmsSettings, ManagerRegistry
|
||||
|
||||
### Community 631 - "Community 631"
|
||||
Cohesion: 0.50
|
||||
@@ -2817,10 +2830,6 @@ Nodes (4): ۲.۱۳ نظرات، لایک و امتیازدهی, ۲.۱۳.۱ نظ
|
||||
Cohesion: 0.50
|
||||
Nodes (4): GET `/api/v1/admin/settlements`, Query Parameters, Response `200`, Settlement Management
|
||||
|
||||
### Community 663 - "Community 663"
|
||||
Cohesion: 0.67
|
||||
Nodes (3): 36. 🟢 `GET` get my rate, هدرهای اضافی, پاسخها
|
||||
|
||||
### Community 664 - "Community 664"
|
||||
Cohesion: 0.67
|
||||
Nodes (3): 42. 🔴 `DELETE` delete, هدرهای اضافی, پاسخها
|
||||
@@ -2833,20 +2842,24 @@ Nodes (3): 43. 🟢 `GET` get, هدرهای اضافی, پاسخها
|
||||
Cohesion: 0.67
|
||||
Nodes (3): 29. 🟢 `GET` clinic list 🆕, پارامترهای Query, پاسخها
|
||||
|
||||
### Community 671 - "Community 671"
|
||||
Cohesion: 0.67
|
||||
Nodes (3): 34. 🔵 `POST` image logo, هدرهای اضافی, پاسخها
|
||||
|
||||
## Knowledge Gaps
|
||||
- **3533 isolated node(s):** `ALLOWED_ROLES`, `Pricing`, `TenantInsurance`, `CoverageRow`, `Draft` (+3528 more)
|
||||
These have ≤1 connection - possible missing edges or undocumented components.
|
||||
- **123 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
|
||||
- **121 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
|
||||
|
||||
## Suggested Questions
|
||||
_Questions this graph is uniquely positioned to answer:_
|
||||
|
||||
- **Why does `BaseController` connect `Community 108` to `Community 6`, `Community 138`, `Community 139`, `Community 14`, `Community 15`, `Community 275`, `Community 20`, `Community 22`, `Community 26`, `Community 164`, `Community 295`, `Community 300`, `Community 301`, `Community 175`, `Community 176`, `Community 177`, `Community 59`, `Community 63`, `Community 64`, `Community 70`, `Community 71`, `Community 75`, `Community 206`, `Community 602`, `Community 230`, `Community 103`, `Community 104`, `Community 107`, `Community 109`, `Community 121`, `Community 122`, `Community 251`, `Community 252`?**
|
||||
_High betweenness centrality (0.030) - this node is a cross-community bridge._
|
||||
- **Why does `BaseController` connect `Community 108` to `Community 4`, `Community 6`, `Community 138`, `Community 139`, `Community 14`, `Community 15`, `Community 275`, `Community 20`, `Community 22`, `Community 26`, `Community 164`, `Community 295`, `Community 300`, `Community 301`, `Community 175`, `Community 176`, `Community 177`, `Community 58`, `Community 59`, `Community 63`, `Community 64`, `Community 70`, `Community 71`, `Community 75`, `Community 206`, `Community 230`, `Community 103`, `Community 104`, `Community 107`, `Community 109`, `Community 121`, `Community 122`, `Community 252`?**
|
||||
_High betweenness centrality (0.026) - this node is a cross-community bridge._
|
||||
- **Why does `AppointmentRepository` connect `Community 119` to `Community 53`?**
|
||||
_High betweenness centrality (0.018) - this node is a cross-community bridge._
|
||||
- **Why does `Version20260614181657` connect `Community 431` to `Community 423`?**
|
||||
_High betweenness centrality (0.017) - this node is a cross-community bridge._
|
||||
- **Why does `Version20260614181657` connect `Community 431` to `Community 399`?**
|
||||
_High betweenness centrality (0.016) - this node is a cross-community bridge._
|
||||
- **What connects `ALLOWED_ROLES`, `Pricing`, `TenantInsurance` to the rest of the system?**
|
||||
_3533 weakly-connected nodes found - possible documentation gaps or missing edges._
|
||||
- **Should `Community 0` be split into smaller, more focused modules?**
|
||||
|
||||
graphify-out/cache/ast/v0.8.44/322257c3716ca503eb558b3ee7df5b0cbd99cf996b73e3ec175a96eef853f67e.json
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [], "edges": [], "skipped": "data json (not a config/manifest)"}
|
||||
graphify-out/cache/ast/v0.8.44/3b2fcf35ae459cfe82147916f43a6da872819e946938e0cd330a596a226065a8.json
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_kernel_php", "label": "Kernel.php", "file_type": "code", "source_file": "src/Kernel.php", "source_location": "L1"}, {"id": "src_kernel_kernel", "label": "Kernel", "file_type": "code", "source_file": "src/Kernel.php", "source_location": "L8"}, {"id": "basekernel", "label": "BaseKernel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "microkerneltrait", "label": "MicroKernelTrait", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "src_kernel_kernel_writablebase", "label": ".writableBase()", "file_type": "code", "source_file": "src/Kernel.php", "source_location": "L16"}, {"id": "src_kernel_kernel_getcachedir", "label": ".getCacheDir()", "file_type": "code", "source_file": "src/Kernel.php", "source_location": "L21"}, {"id": "src_kernel_kernel_getlogdir", "label": ".getLogDir()", "file_type": "code", "source_file": "src/Kernel.php", "source_location": "L26"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_kernel_php", "target": "microkerneltrait", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L5", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_kernel_php", "target": "kernel", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L6", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_kernel_php", "target": "src_kernel_kernel", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L8", "weight": 1.0}, {"source": "src_kernel_kernel", "target": "basekernel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L8", "weight": 1.0}, {"source": "src_kernel_kernel", "target": "microkerneltrait", "relation": "mixes_in", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L10", "weight": 1.0}, {"source": "src_kernel_kernel", "target": "src_kernel_kernel_writablebase", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L16", "weight": 1.0}, {"source": "src_kernel_kernel", "target": "src_kernel_kernel_getcachedir", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L21", "weight": 1.0}, {"source": "src_kernel_kernel", "target": "src_kernel_kernel_getlogdir", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L26", "weight": 1.0}, {"source": "src_kernel_kernel_getcachedir", "target": "src_kernel_kernel_writablebase", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L23", "weight": 1.0}, {"source": "src_kernel_kernel_getlogdir", "target": "src_kernel_kernel_writablebase", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "src/Kernel.php", "source_location": "L28", "weight": 1.0}], "raw_calls": [{"caller_nid": "src_kernel_kernel_writablebase", "callee": "getenv", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Kernel.php", "source_location": "L18", "receiver": null}, {"caller_nid": "src_kernel_kernel_getcachedir", "callee": "parent", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Kernel.php", "source_location": "L23", "receiver": null}, {"caller_nid": "src_kernel_kernel_getlogdir", "callee": "parent", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Kernel.php", "source_location": "L28", "receiver": null}]}
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+493
-451
File diff suppressed because it is too large
Load Diff
@@ -1290,8 +1290,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/Kernel.php": {
|
||||
"mtime": 1782741976.619887,
|
||||
"ast_hash": "7315899793a1f539c3f68a2eade4200a",
|
||||
"mtime": 1782743240.2494988,
|
||||
"ast_hash": "dfbdba27446fea6b4673e750dd07362b",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/Location/Controller/LocationController.php": {
|
||||
@@ -3335,8 +3335,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"liara.json": {
|
||||
"mtime": 1782740970.8957605,
|
||||
"ast_hash": "e57f848d8ea44e16583ee9c918c76449",
|
||||
"mtime": 1782743130.087785,
|
||||
"ast_hash": "46b9255bc002a7d9606afe36c7fbd95b",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"liara_pre_build.sh": {
|
||||
|
||||
+11
-4
@@ -9,15 +9,22 @@ class Kernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
|
||||
// On read-only-root PaaS (Liara), var/ is not writable. Redirect cache/log to a
|
||||
// writable path (e.g. /tmp) via env; falls back to the default var/ locally.
|
||||
// On read-only-root PaaS (Liara) var/ is not writable, and PHP's default
|
||||
// variables_order (GPCS) keeps env vars out of $_SERVER — so in prod, force a
|
||||
// writable base (/tmp) directly instead of relying on an env var. Local/dev keep
|
||||
// the default var/ paths. APP_CACHE_DIR/APP_LOG_DIR can still override the base.
|
||||
private function writableBase(): string
|
||||
{
|
||||
return $_SERVER['APP_TMP_DIR'] ?? getenv('APP_TMP_DIR') ?: '/tmp/clinicpro';
|
||||
}
|
||||
|
||||
public function getCacheDir(): string
|
||||
{
|
||||
return $_SERVER['APP_CACHE_DIR'] ?? parent::getCacheDir();
|
||||
return 'prod' === $this->environment ? $this->writableBase() . '/cache' : parent::getCacheDir();
|
||||
}
|
||||
|
||||
public function getLogDir(): string
|
||||
{
|
||||
return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir();
|
||||
return 'prod' === $this->environment ? $this->writableBase() . '/log' : parent::getLogDir();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user