Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
314 commits
Select commit Hold shift + click to select a range
c0b2565
Add integration tests for custom fields in user forms
ManukMinasyan Jun 25, 2025
300dbd2
Rename TestPanelProvider to AdminPanelProvider and update authenticat…
ManukMinasyan Jun 25, 2025
1688757
Refactor AdminPanelProvider and related files: rename and update reso…
ManukMinasyan Jun 25, 2025
c7d3a65
Update composer.lock and add CustomFieldsPageTest: upgrade dependenci…
ManukMinasyan Jun 25, 2025
4292176
Add tests for Post resource creation and validation: implement Create…
ManukMinasyan Jun 25, 2025
28bb858
Add SchemasServiceProvider to TestCase: include support for custom fi…
ManukMinasyan Jun 25, 2025
8c193f6
Implement custom fields support in Post model: add HasCustomFields in…
ManukMinasyan Jun 25, 2025
6625f35
Add custom fields support to Post resource: implement tests for creat…
ManukMinasyan Jun 25, 2025
d7c5a0a
Refactor CustomFieldFactory and CustomFieldsForm: set default values …
ManukMinasyan Jun 25, 2025
501247e
Update CreateRecordTest: refine custom field section and adjust requi…
ManukMinasyan Jun 25, 2025
25fee79
Forms Resource
ManukMinasyan Jun 26, 2025
a0b597c
Add ListRecordsTest: implement tests for rendering, listing, sorting,…
ManukMinasyan Jun 26, 2025
97fb0a0
Add EditRecordTest: implement tests for editing and retrieving posts …
ManukMinasyan Jun 26, 2025
262f4a5
Refactor CreateRecordTest: enhance structure, add authorization check…
ManukMinasyan Jun 26, 2025
b93a865
Add EditRecordTest: implement tests for editing and retrieving posts …
ManukMinasyan Jun 26, 2025
fa5579d
Add Architecture.php: define architectural guidelines for custom fiel…
ManukMinasyan Jun 26, 2025
c77893f
Enhance EditRecordTest and ListRecordsTest: improve structure, add au…
ManukMinasyan Jun 26, 2025
61bbe96
Enhance ListRecordsTest: improve custom field handling, add support f…
ManukMinasyan Jun 26, 2025
15fd998
Refactor ListRecordsTest: remove redundant sorting test for identical…
ManukMinasyan Jun 26, 2025
af1fe80
Add conditional visibility feature: enable and implement configuratio…
ManukMinasyan Jun 26, 2025
4f3214a
Remove unused toggle for always saving field value in VisibilityCompo…
ManukMinasyan Jun 26, 2025
b50c48d
Enhance FieldConfigurator and FieldForm: integrate conditional visibi…
ManukMinasyan Jun 27, 2025
f23769d
Refactor visibility services: replace CustomFieldVisibilityService wi…
ManukMinasyan Jun 27, 2025
04878fb
Rename package to flexfields and update CustomFieldFactory to use new…
ManukMinasyan Jun 27, 2025
5913313
Add tests for conditional visibility of custom fields in tables
ManukMinasyan Jun 27, 2025
976fa8e
Add ViewRecordTest for Post resource: implement tests for rendering, …
ManukMinasyan Jun 27, 2025
230c340
Refactor custom fields integration: improve visibility logic and upda…
ManukMinasyan Jun 27, 2025
7221faf
Feature conditional fields
ManukMinasyan Jun 27, 2025
8974d0a
FIrst phase extending custom fields
ManukMinasyan Jun 27, 2025
a235d60
Refactor custom field type handling: introduce FieldTypeHelperService…
ManukMinasyan Jun 27, 2025
9ad6fb2
Refactor visibility logic and enhance custom field integration
ManukMinasyan Jun 27, 2025
fa744c1
Enhance custom field validation: add support for custom field types a…
ManukMinasyan Jun 27, 2025
ec94f6d
Add configuration and state files; refactor methods for type safety a…
ManukMinasyan Jun 27, 2025
389aaf5
Enhance custom fields functionality: add type-safe configuration, imp…
ManukMinasyan Jun 27, 2025
88726e8
Refine type annotations in FieldTypeRegistryService and update phpsta…
ManukMinasyan Jun 27, 2025
7e6cf70
Enhance Activable trait and scopes: add PHPDoc annotations, improve m…
ManukMinasyan Jun 27, 2025
649571e
Refactor custom fields handling: update query building and type hints…
ManukMinasyan Jun 27, 2025
e45c595
Refactor CustomField handling and improve data merging logic
ManukMinasyan Jun 27, 2025
4b4a5db
Refactor type annotations in HasCustomFields interface and related fi…
ManukMinasyan Jun 27, 2025
1a212be
Refactor type annotations and visibility conditions in form component…
ManukMinasyan Jun 27, 2025
3ac8c8f
Update return type annotation for toSafeArray method in SafeValueConv…
ManukMinasyan Jun 27, 2025
f1dfe3d
Refactor codebase for PHPStan level 6 compliance: update type annotat…
ManukMinasyan Jun 27, 2025
cb706a9
Update parameter validation rule return types in CustomFieldValidatio…
ManukMinasyan Jun 27, 2025
4dc2cce
Add type hints to relationships and method return types in custom fie…
ManukMinasyan Jun 27, 2025
f9f6284
Refactor type hints and improve code clarity in custom fields integra…
ManukMinasyan Jun 27, 2025
111e439
Add PHPDoc annotations for builder parameters in visibility services
ManukMinasyan Jun 27, 2025
4949a61
Refactor docblocks for improved clarity and consistency across multip…
ManukMinasyan Jun 27, 2025
ab8f9bb
Add PHPDoc annotations for improved code documentation and type hinting
ManukMinasyan Jun 27, 2025
153ec99
Refactor field configurator and update type hinting in custom field c…
ManukMinasyan Jun 27, 2025
7bbcc30
Refactor field configurator methods for improved parameter handling a…
ManukMinasyan Jun 27, 2025
930c3e9
Refactor field type handling in FieldInfolistsFactory and SectionComp…
ManukMinasyan Jun 27, 2025
0c89ab8
Refactor type hints and improve option filtering in custom field comp…
ManukMinasyan Jun 27, 2025
0897b4d
Refactor custom field handling and improve code readability
ManukMinasyan Jun 27, 2025
eb23a04
Refactor visibility logic and custom fields handling for improved typ…
ManukMinasyan Jun 27, 2025
cf02ede
Fix condition to check if target field options are not empty
ManukMinasyan Jun 27, 2025
c2da439
Add PHPDoc type hints for custom field models in CustomFields.php
ManukMinasyan Jun 27, 2025
87fb01d
Update getFieldType method to allow multiple return types
ManukMinasyan Jun 27, 2025
5c9b63f
Add GitHub Actions workflows for code quality, auto-fixing, and depen…
ManukMinasyan Jun 27, 2025
03708b1
TEST
ManukMinasyan Jun 27, 2025
2303b30
Refactor type annotations for CustomField and VisibilityComponent to …
ManukMinasyan Jun 27, 2025
6efd3dc
Refactor type hints and improve null handling in custom fields classes
ManukMinasyan Jun 27, 2025
f5989c8
Remove unnecessary dependencies from tasks and update task statuses t…
ManukMinasyan Jun 27, 2025
8fb817f
Optimize CustomFieldType and FieldTypeHelperService with caching, enh…
ManukMinasyan Jun 27, 2025
de2bd5c
Refactor VisibilityComponent and FieldForm for type safety and null h…
ManukMinasyan Jun 27, 2025
539215c
Add MidiaLibraryFieldType and refactor rating field handling
ManukMinasyan Jun 28, 2025
61bcbc6
Add CustomFieldsPage test suite and integrate BladeMdiServiceProvider
ManukMinasyan Jun 28, 2025
09e5597
Add tests for CustomFieldsPage interactions and validation
ManukMinasyan Jun 28, 2025
a6fe1bd
Refactor rating field structure and enhance form management features
ManukMinasyan Jun 28, 2025
4c90131
Refactor form component structure to use abstract base class and redu…
ManukMinasyan Jun 28, 2025
f2c7636
Refactor form component structure to use abstract base class and redu…
ManukMinasyan Jun 28, 2025
0973629
Add CLAUDE.md for project guidance and development commands
ManukMinasyan Jun 28, 2025
51aeba9
Add CLAUDE.md for project guidance and development commands
ManukMinasyan Jun 30, 2025
ebf1ca5
Add CLAUDE.md for project guidance and development commands
ManukMinasyan Jun 30, 2025
37bc229
Update CLAUDE.md with enhanced development commands and project metadata
ManukMinasyan Jun 30, 2025
efebb09
Rename package from "relaticle/flexfields" to "relaticle/custom-fields"
ManukMinasyan Jun 30, 2025
0ca6a3d
Enhance CLAUDE.md with installation, setup, and integration instructi…
ManukMinasyan Jun 30, 2025
9fa5be3
Add settings.json to define permissions for WebFetch and Bash commands
ManukMinasyan Jun 30, 2025
2ad0d7a
Add lets-get-started.md to provide an introductory guide for Laravel/…
ManukMinasyan Jun 30, 2025
281b13f
Refactor testing practices and add best practices documentation for P…
ManukMinasyan Jun 30, 2025
73ea9e3
Remove redundant checklist item for CreateRecord page lifecycle hooks…
ManukMinasyan Jun 30, 2025
9dbda74
Enhance testing best practices with feature-first philosophy from Tay…
ManukMinasyan Jun 30, 2025
8931e73
Rename FlexFields to Custom Fields in README and update package refer…
ManukMinasyan Jun 30, 2025
64da4f1
composer.lock
ManukMinasyan Jun 30, 2025
603d6da
Refactor codebase for improved readability and maintainability by rem…
ManukMinasyan Jul 1, 2025
75a3cfe
Refactor code for improved clarity and consistency by removing unused…
ManukMinasyan Jul 1, 2025
23e344a
Rename test files for improved organization and clarity; update setti…
ManukMinasyan Jul 1, 2025
f85c8d7
Enhance testing framework by adding custom expectations, improving fa…
ManukMinasyan Jul 1, 2025
ecdd560
Refactor CustomFieldFactory and tests to simplify option handling and…
ManukMinasyan Jul 1, 2025
5f12699
Refactor CustomFieldsValidationTest to streamline expectations and im…
ManukMinasyan Jul 1, 2025
b2210aa
Fix visibility condition in CustomFieldsValidationTest to use lowerca…
ManukMinasyan Jul 1, 2025
a0d712f
remove testing-refactoring-plan.md
ManukMinasyan Jul 1, 2025
2a749c9
Clean
ManukMinasyan Jul 2, 2025
6bd87a2
Add PestPHP Testing Guide for Laravel Applications
ManukMinasyan Jul 2, 2025
0295bd6
Update link to PestPHP testing best practices in CLAUDE.md
ManukMinasyan Jul 2, 2025
294bbc4
Refactor file structure and update namespaces for Custom Fields integ…
ManukMinasyan Jul 3, 2025
f469450
Refactor namespaces for Custom Fields integration to align with Filam…
ManukMinasyan Jul 4, 2025
4f41681
Refactor CustomFieldsType and FieldTypeManager to use FieldTypeCollec…
ManukMinasyan Jul 4, 2025
61bcaf2
Refactor FieldConfigurator, FieldForm, and FieldTypeManager for impro…
ManukMinasyan Jul 4, 2025
f366b11
Refactor component factories and field types for improved integration…
ManukMinasyan Jul 4, 2025
92f1112
Refactor getValueColumn method to utilize FieldDataType for improved …
ManukMinasyan Jul 4, 2025
4c09cca
Refactor custom fields integration for improved type handling and rea…
ManukMinasyan Jul 4, 2025
d1aa8e7
Upstram
ManukMinasyan Jul 4, 2025
8c1ff8d
Upstream
ManukMinasyan Jul 4, 2025
b455f98
Update license in composer.json from GPL-3.0-only to AGPL-3.0
ManukMinasyan Jul 4, 2025
158071b
Refactor CustomFields integration to use fluent interface for column …
ManukMinasyan Jul 4, 2025
287e8fc
Add fieldTypeHelper property to visibility services and refactor type…
ManukMinasyan Jul 4, 2025
7a82a02
Remove fieldTypeHelper property and update visibility checks to use f…
ManukMinasyan Jul 4, 2025
37b3e49
Refactor CustomFieldsManager to include infolistEntries method and re…
ManukMinasyan Jul 4, 2025
2e1eb9d
Field Type component remove
ManukMinasyan Jul 6, 2025
4b7b75c
Add new field types and validation rules for Color Picker, Text, and …
ManukMinasyan Jul 6, 2025
e103419
Update validation rules for CheckboxList, MultiSelect, TagsInput, and…
ManukMinasyan Jul 6, 2025
726847f
Refactor field type handling to implement import/export interface and…
ManukMinasyan Jul 6, 2025
38be876
Update filterable behavior for field types in HasCommonFieldPropertie…
ManukMinasyan Jul 6, 2025
20b8c2b
Refactor field type handling to improve compatibility checks and meta…
ManukMinasyan Jul 6, 2025
a05abfd
Refactor CurrencyFieldType and NumberFieldType to use FLOAT data type…
ManukMinasyan Jul 6, 2025
6b56afa
Refactor whitespace handling in CoreVisibilityLogicService for improv…
ManukMinasyan Jul 6, 2025
d5ad0d4
Add CLAUDE.md for project guidance and development instructions
ManukMinasyan Jul 6, 2025
ddfde79
Update CLAUDE.md to enhance project documentation and clarify develop…
ManukMinasyan Jul 6, 2025
eabae75
Add support for Bash command execution with 'true' in settings.local.…
ManukMinasyan Jul 7, 2025
f48f5b2
Refactor badge color handling in MultiValueColumn, SingleValueColumn,…
ManukMinasyan Jul 7, 2025
885cc89
Refactor form component field name handling; utilize ConfiguresFieldN…
ManukMinasyan Jul 7, 2025
b74db9b
Add form and table components for custom fields; implement interfaces…
ManukMinasyan Jul 7, 2025
323ba4e
Refactor form and table components to utilize new traits for field na…
ManukMinasyan Jul 7, 2025
7843e64
Refactor field type classes to replace BooleanColumn and MultipleValu…
ManukMinasyan Jul 7, 2025
40f9923
Refactor form component structure; rename AbstractFormComponent and F…
ManukMinasyan Jul 7, 2025
2848ba5
Refactor infolist component interfaces and builders; standardize nami…
ManukMinasyan Jul 7, 2025
84291d2
Refactor component factories and builders; enhance field handling, vi…
ManukMinasyan Jul 7, 2025
e35d801
Refactor infolist entry components; extend from AbstractInfolistEntry…
ManukMinasyan Jul 7, 2025
efea5e0
Refactor field grouping and component creation; streamline section ha…
ManukMinasyan Jul 7, 2025
28be5a4
Refactor infolist builder and factory; streamline component creation …
ManukMinasyan Jul 8, 2025
232f5d0
Update README and add CLAUDE.md; enhance documentation with project o…
ManukMinasyan Jul 8, 2025
f4242a6
Enhance model handling in builders; support string model types and im…
ManukMinasyan Jul 8, 2025
b962230
Refactor table column and filter components; rename interfaces and st…
ManukMinasyan Jul 8, 2025
6c1b0e8
Add TernaryFilter component; implement custom field filtering with ye…
ManukMinasyan Jul 8, 2025
7925125
Refactor CustomFieldsManager and AuthorResource; remove legacy method…
ManukMinasyan Jul 8, 2025
ffc8c74
Add priority attribute to FieldTypeData; update FieldTypeManager to s…
ManukMinasyan Jul 8, 2025
6a2b541
Enhance BaseBuilder and FormBuilder; enforce HasCustomFields interfac…
ManukMinasyan Jul 8, 2025
8ecb922
Refactor component mappings and update ToggleButtonsFieldType; rename…
ManukMinasyan Jul 8, 2025
b1f03b2
Enhance FieldColumnFactory; add toggleable functionality to column cr…
ManukMinasyan Jul 8, 2025
4cd050a
Refactor BaseBuilder and FormBuilder; update fields property type to …
ManukMinasyan Jul 8, 2025
1700b6e
Refactor BaseBuilder and FormBuilder; update field retrieval methods …
ManukMinasyan Jul 8, 2025
3bf2671
Refactor FieldFilterFactory; remove columnSpan method call for improv…
ManukMinasyan Jul 8, 2025
1b9054c
Enhance manage-custom-field; improve field name display with truncati…
ManukMinasyan Jul 8, 2025
80cb8b4
Enhance CLAUDE.md; add best practices section for pestphp testing
ManukMinasyan Jul 9, 2025
f35499c
Refactor entity management; update service integrations to use Entiti…
ManukMinasyan Jul 9, 2025
0e1e666
Refactor entity configuration; streamline code structure and enhance …
ManukMinasyan Jul 9, 2025
d45f3a4
Refactor entity management; replace EntityConfiguration with EntityCo…
ManukMinasyan Jul 9, 2025
a927d39
Refactor ConfiguresLookups and Utils; streamline search result handli…
ManukMinasyan Jul 9, 2025
990812c
Refactor rector configuration; remove unused variable assignment rule…
ManukMinasyan Jul 9, 2025
0776246
Refactor code style; replace double quotes with single quotes for imp…
ManukMinasyan Jul 9, 2025
769d98e
Refactor linting scripts; update lint command to run in parallel and …
ManukMinasyan Jul 9, 2025
0d0e4a4
Refactor PHPStan and Rector configurations; lower PHPStan level to 5 …
ManukMinasyan Jul 9, 2025
1472c95
Refactor EntityServiceProvider; remove unused EntityFeature enum hand…
ManukMinasyan Jul 9, 2025
af1d212
Enhance entity configuration; uncomment countries entity definition a…
ManukMinasyan Jul 9, 2025
33dc768
Enhance documentation; update CLAUDE.md with key features, installati…
ManukMinasyan Jul 9, 2025
3c57e16
Enhance custom field entries; add state handling to various entry typ…
ManukMinasyan Jul 9, 2025
876dd6b
Refactor FieldForm; update afterStateHydrated callbacks to use Model …
ManukMinasyan Jul 9, 2025
8a74cfb
Enhance InfolistBuilder; implement conditional visibility for fields …
ManukMinasyan Jul 9, 2025
363bfd4
Enhance TableBuilder; implement field visibility checks in columns me…
ManukMinasyan Jul 9, 2025
8ba0109
Enhance TypeField; implement searchable functionality with debounce a…
ManukMinasyan Jul 9, 2025
9a0b6e8
Rename custom fields view files for improved clarity and consistency
ManukMinasyan Jul 9, 2025
de9294b
Refactor Custom Fields Validation System; implement context-aware val…
ManukMinasyan Jul 9, 2025
3287364
added Ukrainian language
iboldurev Jul 9, 2025
a326423
Merge pull request #32 from iboldurev/2.x
ManukMinasyan Jul 10, 2025
b60b31a
Refactor Field Types; update keys to use hyphenated format for improv…
ManukMinasyan Jul 12, 2025
0004647
Remove docs folder
ManukMinasyan Jul 10, 2025
800d035
Enhance manage-custom-field-width; improve hover effect and text colo…
ManukMinasyan Jul 11, 2025
faa548d
Refactor Field Types; update keys to use hyphenated format for improv…
ManukMinasyan Jul 12, 2025
cc21246
Merge pull request #33 from Relaticle/2.x-next
ManukMinasyan Jul 22, 2025
ec6daa2
Refactor code style; improve spacing and consistency in custom fields…
ManukMinasyan Jul 12, 2025
1fa4c60
Update CLAUDE.md; enhance environment setup and common development ta…
ManukMinasyan Jul 12, 2025
86ad58b
Update settings.local.json; add new permissions for WebFetch, Bash co…
ManukMinasyan Jul 12, 2025
4e53c26
Update settings.local.json; add new permission for mcp__ide__getDiagn…
ManukMinasyan Jul 12, 2025
48a447b
Update README.md
ManukMinasyan Jul 4, 2025
f7500fb
Update README.md
ManukMinasyan Jul 4, 2025
2d9435b
Update README.md
ManukMinasyan Jul 4, 2025
a5e24bd
Refactor BaseBuilder and FormBuilder; update field retrieval methods …
ManukMinasyan Jul 8, 2025
17f0598
Refactor BaseBuilder and FormBuilder; update field retrieval methods …
ManukMinasyan Jul 8, 2025
237dc80
Refactor BaseBuilder and FormBuilder; update field retrieval methods …
ManukMinasyan Jul 8, 2025
73a12ee
Update README.md
ManukMinasyan Jul 9, 2025
542599b
Update README.md
ManukMinasyan Jul 9, 2025
65ea2bc
Update README.md
ManukMinasyan Jul 9, 2025
1aa23b9
Update README.md
ManukMinasyan Jul 9, 2025
4ec09bb
Update composer.json
ManukMinasyan Jul 12, 2025
e9b384d
Update README.md
ManukMinasyan Jul 12, 2025
c96c845
Update README to clarify licensing terms and dual-license options for…
ManukMinasyan Jul 14, 2025
84e6411
Add license information prompts to migration command in CustomFieldsS…
ManukMinasyan Jul 14, 2025
4d8ab36
Update installation instructions in README to use custom-fields:insta…
ManukMinasyan Jul 14, 2025
9b8a31b
Update README.md
ManukMinasyan Jul 16, 2025
8504602
Update README.md
ManukMinasyan Jul 16, 2025
b61a83b
Remove redundant validation rule for float_value in DatabaseFieldCons…
ManukMinasyan Jul 17, 2025
616bad2
Update dependencies
ManukMinasyan Jul 18, 2025
44784a2
Remove redundant validation rule for float_value in DatabaseFieldCons…
ManukMinasyan Jul 22, 2025
8f2d92d
Refactor DatabaseFieldConstraints to streamline validation rules and …
ManukMinasyan Jul 22, 2025
a7c57dc
Refactor validation rule references to use ValidationRule enum and im…
ManukMinasyan Jul 22, 2025
def8714
Refactor field type names to use kebab-case for consistency across da…
ManukMinasyan Jul 22, 2025
7f3ff8c
Add invokeMethodByReflection utility to invoke private/protected meth…
ManukMinasyan Jul 22, 2025
cfdd82c
Refactor CheckboxListFieldType to use MultiChoice components for impr…
ManukMinasyan Jul 22, 2025
2d068c6
Refactor CheckboxListFieldType to use MultiChoice components for impr…
ManukMinasyan Jul 22, 2025
0fc0a1b
Add strict types declaration and mark TableBuilder as final for impro…
ManukMinasyan Jul 22, 2025
5e05822
Fix datetime_value rule to use 'date' for correct validation
ManukMinasyan Jul 26, 2025
c57ef50
Enhance VisibilityComponent with dynamic input handling and improve c…
ManukMinasyan Jul 26, 2025
62ef64d
Mark service provider classes as final for improved type safety and c…
ManukMinasyan Jul 26, 2025
19ac5b1
Add ExporterBuilder and ExportColumnFactory for custom field export f…
ManukMinasyan Jul 26, 2025
f4936f4
Add ImporterBuilder and corresponding methods to CustomFields and Cus…
ManukMinasyan Aug 6, 2025
6f7b2e3
Refactor import functionality by reorganizing namespaces and adding I…
ManukMinasyan Aug 6, 2025
f1fcaf8
Implement unified import column configurator and simplify import arch…
ManukMinasyan Aug 6, 2025
b33490e
Refactor ImportColumnConfigurator for improved null handling and code…
ManukMinasyan Aug 6, 2025
64d5c75
Refactor ImportArchitectureTest for improved readability and maintain…
ManukMinasyan Aug 6, 2025
bfab98b
Refactor ImportColumnConfigurator and ImporterBuilder for improved cl…
ManukMinasyan Aug 6, 2025
9d73a25
Refactor ImportColumnConfigurator and ImporterBuilder for improved cl…
ManukMinasyan Aug 6, 2025
5bf851f
Refactor CompleteProductImporter, ImporterBuilder, and related files …
ManukMinasyan Aug 6, 2025
5b4ec26
Refactor ImportArchitectureTest for improved clarity and consistency;…
ManukMinasyan Aug 9, 2025
9289347
Refactor BaseBuilder and related files for improved type safety and c…
ManukMinasyan Aug 9, 2025
441b3e1
Update composer.json and composer.lock for dependency version upgrade…
ManukMinasyan Aug 9, 2025
e520eca
Refactor import/export interfaces and related classes for improved cl…
ManukMinasyan Aug 12, 2025
09b38e2
Refactor field type definitions to enhance clarity and enforce immuta…
ManukMinasyan Aug 12, 2025
ee1a912
Refactor import/export interfaces for improved clarity and functional…
ManukMinasyan Aug 12, 2025
9a9a6db
Add Star Rating field type with custom form component and table colum…
ManukMinasyan Aug 13, 2025
de32e0d
Refactor Star Rating components for improved functionality; remove un…
ManukMinasyan Aug 13, 2025
788cf3a
Add UpgradeCommand for Custom Fields upgrade process; register comman…
ManukMinasyan Aug 13, 2025
249f55e
Enhance UpgradeCommand for Custom Fields V2 migration; add detailed u…
ManukMinasyan Aug 13, 2025
534804d
Add custom fields upgrade script for v1 to v2 migration; update compo…
ManukMinasyan Aug 14, 2025
e37f402
Add nullable width column to custom fields section table for enhanced…
ManukMinasyan Aug 15, 2025
6a9eb2d
Add tenant-based indexing for custom fields tables to improve query p…
ManukMinasyan Aug 15, 2025
96d7ad8
Add Artisan command to generate custom fields migration files with st…
ManukMinasyan Aug 15, 2025
3ba45fc
Fix path to custom fields migration stub for correct file reference
ManukMinasyan Aug 16, 2025
b807526
Optimize custom field section retrieval with caching and conditional …
ManukMinasyan Aug 16, 2025
97083b5
Refactor code style for improved readability and consistency in BaseB…
ManukMinasyan Aug 16, 2025
175b28f
Fix instance check for TableBuilder in BaseBuilder to ensure correct …
ManukMinasyan Aug 16, 2025
651b864
Register BackendVisibilityService in CustomFieldsServiceProvider for …
ManukMinasyan Aug 16, 2025
52ec068
Simplify isCustomFieldTypeOptionable method for better clarity and pe…
ManukMinasyan Aug 16, 2025
d3902d5
Refactor option retrieval in BackendVisibilityService and update quer…
ManukMinasyan Aug 16, 2025
a16b956
Enhance BackendVisibilityService and BaseBuilder to eager load option…
ManukMinasyan Aug 16, 2025
d9e0af4
Refactor BaseBuilder and related files to introduce forSchema method …
ManukMinasyan Aug 16, 2025
52f8c59
Refactor isCustomFieldTypeOptionable method to utilize CustomFieldsTy…
ManukMinasyan Aug 16, 2025
846a094
Update PHP and Laravel requirements in README for compatibility with …
ManukMinasyan Aug 16, 2025
61e8cd5
Add field types configuration to custom-fields.php for enabling/disab…
ManukMinasyan Aug 20, 2025
5b1d574
Cast custom field value to boolean in BooleanEntry for accurate state…
ManukMinasyan Aug 24, 2025
e4d5dc0
Refactor code for improved readability and consistency across multipl…
ManukMinasyan Aug 25, 2025
2380495
Refactor TenantContextService to use getKey() for tenant ID retrieval
ManukMinasyan Aug 26, 2025
3f01b6b
Update requirements in README and CLAUDE.md for PHP 8.3 compatibility…
ManukMinasyan Aug 26, 2025
b1b5d28
Enhance custom field management: add system-defined field deletion re…
ManukMinasyan Aug 26, 2025
2eb8eb2
Add test for moving fields into empty sections and refresh fields on …
ManukMinasyan Aug 26, 2025
b24ff7d
Add dropdown placement for action buttons in custom field management
ManukMinasyan Aug 26, 2025
40ec143
Refactor custom fields configuration to use a unified database struct…
ManukMinasyan Aug 26, 2025
178674c
Refactor visibility logic: remove unused methods and streamline entit…
ManukMinasyan Aug 26, 2025
383d077
Remove commented-out entity model configurations in custom fields
ManukMinasyan Aug 26, 2025
b631b3f
Update CHANGELOG for version 1.2.0: document dead code cleanup, field…
ManukMinasyan Aug 26, 2025
c0d1bb1
Enhance custom fields upgrade script: add options for dry-run, backup…
ManukMinasyan Aug 26, 2025
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
  •  
  •  
  •  
307 changes: 307 additions & 0 deletions .claude/docs/pestphp-testing-best-practices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
# PestPHP Testing Guide for Laravel Applications

## Quick Start Checklist

Before writing any tests, ensure:
- [ ] PestPHP is installed and configured
- [ ] `tests/Pest.php` has proper global configuration
- [ ] Architecture tests are set up in `tests/Architecture.php`
- [ ] You understand the feature-first testing philosophy

## Core Testing Philosophy

### 🎯 Feature Tests First (80-90% of your tests)
```php
// ✅ GOOD: Feature test that validates behavior
it('can create a new user', function () {
$this->post('/users', [
'name' => 'John Doe',
'email' => '[email protected]',
'password' => 'password123',
])
->assertStatus(201)
->assertJson(['message' => 'User created successfully']);

$this->assertDatabaseHas('users', [
'email' => '[email protected]',
]);
});

// ❌ BAD: Unit test tightly coupled to implementation
it('calls the user service', function () {
$mock = Mockery::mock(UserService::class);
$mock->shouldReceive('create')->once();
// ... more mocking
});
```

### 🚫 When NOT to Write Unit Tests
- Don't mock every dependency
- Don't test internal method calls
- Don't write tests that break when refactoring
- Focus on behavior, not implementation

## Test Structure Standards

### 1. Basic Test Anatomy
Every test MUST follow this structure:

```php
it('describes what the system should do', function () {
// Arrange - Set up test data
$user = User::factory()->create();

// Act - Perform the action
$response = $this->actingAs($user)
->post('/posts', ['title' => 'My Post']);

// Assert - Verify the outcome
$response->assertCreated();
$this->assertDatabaseHas('posts', ['title' => 'My Post']);
});
```

### 2. Global Configuration (`tests/Pest.php`)
```php
uses(
Tests\TestCase::class,
Illuminate\Foundation\Testing\RefreshDatabase::class
)->in('Feature');

// Helper functions
function createAuthenticatedUser(): User
{
return User::factory()->create();
}
```

### 3. Architecture Tests (`tests/Architecture.php`)
```php
// Enforce architectural rules
arch('Controllers do not use Models directly')
->expect('App\Models')
->not->toBeUsedIn('App\Http\Controllers');

arch('Services have Service suffix')
->expect('App\Services')
->toHaveSuffix('Service');

arch('No debugging functions in production')
->expect(['dd', 'dump', 'ray', 'var_dump'])
->not->toBeUsed();

arch('DTOs are immutable')
->expect('App\DataTransferObjects')
->toBeReadonly();
```

## Laravel/Filament Testing Reference

### Testing Helper Hierarchy
Always use the most specific helper available:

| Task | First Choice (Filament) | Second Choice (Livewire) | Last Resort (Laravel) |
|------|------------------------|--------------------------|----------------------|
| Render Page | `livewire(CreateRecord::class)` | `livewire(Component::class)` | `$this->get(route(...))` |
| Fill Form | `->fillForm([...])` | `->set('field', 'value')` | N/A |
| Submit Form | `->call('create')` | `->call('method')` | `$this->post(...)` |
| Check Validation | `->assertHasFormErrors([...])` | `->assertHasErrors([...])` | `->assertSessionHasErrors()` |
| Check Field State | `->assertFormFieldIsVisible()` | `->assertSee()` | `->assertSee()` |

## Practical Examples

### Example 1: Testing a Filament Resource Create Page

```php
use App\Filament\Resources\PostResource;
use App\Models\Post;
use App\Models\User;

beforeEach(function () {
$this->user = User::factory()->create();
$this->actingAs($this->user);
});

describe('Post Creation', function () {
it('renders the create page', function () {
livewire(PostResource\Pages\CreatePost::class)
->assertSuccessful()
->assertFormExists();
});

it('creates a post with valid data', function () {
$postData = Post::factory()->make()->toArray();

livewire(PostResource\Pages\CreatePost::class)
->fillForm($postData)
->call('create')
->assertHasNoFormErrors()
->assertNotified()
->assertRedirect();

$this->assertDatabaseHas('posts', $postData);
});

it('validates required fields', function (string $field, mixed $value, string $rule) {
livewire(PostResource\Pages\CreatePost::class)
->fillForm([$field => $value])
->call('create')
->assertHasFormErrors([$field => $rule]);
})->with([
'title required' => ['title', null, 'required'],
'title min length' => ['title', 'ab', 'min:3'],
'slug unique' => ['slug', fn() => Post::factory()->create()->slug, 'unique'],
]);
});
```

### Example 2: Testing API Endpoints

```php
describe('API Posts', function () {
it('lists all posts', function () {
Post::factory()->count(3)->create();

$this->getJson('/api/posts')
->assertOk()
->assertJsonCount(3, 'data');
});

it('requires authentication to create posts', function () {
$this->postJson('/api/posts', ['title' => 'Test'])
->assertUnauthorized();
});
});
```

### Example 3: Testing with Datasets

```php
it('calculates order totals correctly', function ($items, $expectedTotal) {
$order = Order::factory()
->hasItems($items)
->create();

expect($order->total)->toBe($expectedTotal);
})->with([
'single item' => [
[['price' => 10, 'quantity' => 1]],
10
],
'multiple items' => [
[
['price' => 10, 'quantity' => 2],
['price' => 5, 'quantity' => 3]
],
35
],
]);
```

## Essential CLI Commands

```bash
# Run tests in parallel (fastest)
./vendor/bin/pest --parallel

# Run only changed tests (development)
./vendor/bin/pest --dirty

# Re-run failed tests
./vendor/bin/pest --retry

# Run specific test
./vendor/bin/pest --filter "can create a post"

# Find slowest tests
./vendor/bin/pest --profile

# List todos
./vendor/bin/pest --todos
```

## Best Practices Summary

### ✅ DO
- Write feature tests by default
- Use descriptive test names
- Follow AAA pattern (Arrange-Act-Assert)
- Use model factories for test data
- Test behavior, not implementation
- Use `beforeEach` for common setup
- Leverage datasets for validation testing
- Use `RefreshDatabase` trait

### ❌ DON'T
- Don't write unit tests for everything
- Don't mock unnecessarily
- Don't use database seeders in tests
- Don't hardcode test data
- Don't test framework features
- Don't write brittle implementation tests
- Don't use `dd()` or `dump()` in committed code

## Common Testing Patterns

### 1. Authentication Testing
```php
beforeEach(function () {
$this->user = User::factory()->create();
});

it('requires authentication', function () {
$this->get('/dashboard')->assertRedirect('/login');

$this->actingAs($this->user)
->get('/dashboard')
->assertOk();
});
```

### 2. Authorization Testing
```php
it('denies access without permission', function () {
$userWithoutPermission = User::factory()->create();

$this->actingAs($userWithoutPermission)
->get('/admin/users')
->assertForbidden();
});
```

### 3. Form Validation Testing
```php
it('validates user registration', function ($field, $value, $error) {
$this->post('/register', [$field => $value])
->assertSessionHasErrors([$field => $error]);
})->with([
['email', 'invalid-email', 'email'],
['password', '123', 'min:8'],
['name', '', 'required'],
]);
```

### 4. File Upload Testing
```php
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;

it('can upload avatar', function () {
Storage::fake('avatars');

$file = UploadedFile::fake()->image('avatar.jpg');

$this->actingAs($this->user)
->post('/profile/avatar', ['avatar' => $file])
->assertOk();

Storage::disk('avatars')->assertExists($file->hashName());
});
```

## Resources

- [PestPHP Documentation](https://pestphp.com)
- [Laravel Testing Documentation](https://laravel.com/docs/testing)
- [Filament Testing Documentation](https://filamentphp.com/docs/4.x/testing/overview)
- Run `./vendor/bin/pest --help` for all CLI options
10 changes: 10 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"permissions": {
"allow": [
"WebFetch",
"Bash(ls:*)",
"Edit"
],
"deny": []
}
}
48 changes: 48 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"permissions": {
"allow": [
"WebFetch",
"Bash(ls:*)",
"Edit",
"Bash(php artisan:*)",
"Bash(composer test)",
"Bash(composer lint:*)",
"Bash(composer test:*)",
"Bash(find:*)",
"Bash(mkdir:*)",
"Bash(./vendor/bin/phpstan analyse)",
"Bash(./vendor/bin/pest --coverage --min=99.6)",
"Bash(./vendor/bin/pest --type-coverage --min=99.6)",
"Bash(rg:*)",
"Bash(rm:*)",
"Bash(./vendor/bin/pint:*)",
"Bash(./vendor/bin/rector process tests/Pest.php)",
"Bash(php vendor/bin/pest:*)",
"Bash(./vendor/bin/pest:*)",
"Bash(grep:*)",
"Bash(php vendor/bin/phpunit:*)",
"Bash(./vendor/bin/testbench:*)",
"Bash(php:*)",
"Bash(vendor/bin/phpunit:*)",
"Bash(vendor/bin/pest:*)",
"Bash(true)",
"Bash(composer validate:*)",
"Bash(mv:*)",
"Bash(for file in src/Filament/Integration/Forms/Components/{CheckboxListComponent,ColorPickerComponent,CheckboxComponent,LinkComponent,DateTimeComponent}.php)",
"Bash(do sed -i '' '/use ConfiguresFieldName;/d' \"$file\")",
"Bash(sed:*)",
"Bash(done)",
"Bash(tree:*)",
"Bash(composer pint:*)",
"Bash(vendor/bin/pint:*)",
"Bash(diff:*)",
"Bash(vendor/bin/phpstan analyse:*)",
"Bash(npm run build:*)",
"mcp__ide__getDiagnostics",
"Bash(git checkout:*)",
"Bash(composer install:*)",
"mcp__tinkerwell__evaluate-local-php-code"
],
"deny": []
}
}
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# API Keys (Required to enable respective provider)
ANTHROPIC_API_KEY="your_anthropic_api_key_here" # Required: Format: sk-ant-api03-...
PERPLEXITY_API_KEY="your_perplexity_api_key_here" # Optional: Format: pplx-...
OPENAI_API_KEY="your_openai_api_key_here" # Optional, for OpenAI/OpenRouter models. Format: sk-proj-...
GOOGLE_API_KEY="your_google_api_key_here" # Optional, for Google Gemini models.
MISTRAL_API_KEY="your_mistral_key_here" # Optional, for Mistral AI models.
XAI_API_KEY="YOUR_XAI_KEY_HERE" # Optional, for xAI AI models.
AZURE_OPENAI_API_KEY="your_azure_key_here" # Optional, for Azure OpenAI models (requires endpoint in .taskmaster/config.json).
OLLAMA_API_KEY="your_ollama_api_key_here" # Optional: For remote Ollama servers that require authentication.
GITHUB_API_KEY="your_github_api_key_here" # Optional: For GitHub import/export features. Format: ghp_... or github_pat_...
Loading