Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first commit 🔥 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

first commit 🔥 #2

wants to merge 1 commit into from

Conversation

megoxv
Copy link
Member

@megoxv megoxv commented Feb 26, 2025

Summary by CodeRabbit

  • Chores

    • Upgraded PHP support and dependency versions to boost overall system stability.
    • Improved database structures to reinforce data integrity.
  • New Features

    • Launched category metadata management with new admin panel views for creating, editing, and listing details.
    • Expanded localization by adding image settings (feature and cover images) in both English and Arabic.
    • Enhanced the category management interface with refined labels and improved user interactions.
  • Refactor

    • Streamlined model relationships and service integration for more efficient category type handling.

Copy link

coderabbitai bot commented Feb 26, 2025

Walkthrough

This pull request updates dependency constraints in composer.json to support newer PHP versions and dependency releases. It revises existing migrations with added return types and foreign key constraints and introduces a new migration for a categories metadata table. Localization files in both Arabic and English now include an "images" section. Multiple Filament resource classes and their pages for categories and categories metadata have been added or updated with revised translation keys and service references. The plugin registration logic, model relationships, and service classes for managing category types have also been refined.

Changes

Files Change Summary
composer.json Updated PHP version constraints and upgraded dependency versions for production and development.
database/migrations/2025_02_26_103918_create_categories_table.php
database/migrations/…create_category_metas_table.php
Modified the existing categories migration (added return types and a foreign key for team_id) and added a new migration for the category_metas table with appropriate fields and constraints.
resources/lang/ar/messages.php
resources/lang/en/messages.php
Added a new "images" section with title, description, and columns for image settings in both language files.
src/Filament/Resources/CategoryResource.php
src/Filament/Resources/CategoriesMetaResource.php
src/Filament/Resources/CategoryResource/Pages/*
src/Filament/Resources/CategoriesMetaResource/Pages/*
Introduced a new Filament resource for CategoriesMeta with create, edit, and list pages; updated CategoryResource to use new translation keys and the FilamentCategoriesTypes service; adjusted import statements and minor syntactical issues in associated pages.
src/FilamentCategoriesPlugin.php Added a private $isActive property and modified the registration logic to register the category resources with the panel.
src/Models/Category.php
src/Models/CategoryMeta.php
Updated type annotations and relationship definitions in the Category model; added a new categoriesMetas relationship and introduced a new CategoriesMeta model with its relation to Category.
src/Services/Contracts/CategoriesType.php
src/Services/FilamentCategoriesTypes.php
Added a new CategoriesType class offering fluent setters and a toArray method, and a FilamentCategoriesTypes service class to register and retrieve category types.

Sequence Diagram(s)

sequenceDiagram
  participant Plugin as FilamentCategoriesPlugin
  participant Module
  participant Panel
  Plugin->>Module: Check if FilamentCategories module exists & enabled?
  Module-->>Plugin: (Result)
  Plugin->>Plugin: Set isActive flag (always true)
  Plugin->>Panel: Register CategoryResource & CategoriesMetaResource
Loading
sequenceDiagram
  participant User
  participant Panel as Filament Panel
  participant Resource as Category/Meta Resource
  User->>Panel: Navigate to resource listing
  Panel->>Resource: Load List View
  User->>Panel: Click "Create" Action
  Panel->>Resource: Load Create Page
  User->>Panel: Select record to edit
  Panel->>Resource: Load Edit Page
Loading

Poem

I'm a little rabbit, hopping through new code,
With updated dependencies lighting a fresh road,
Migrations bloom like carrots in neat rows,
Languages sing "images" where every label glows,
Resources and plugins now dance in a merry mode 🐰🌟!

Tip

CodeRabbit's docstrings feature is now available as part of our Pro Plan! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (16)
resources/lang/en/messages.php (1)

30-37: Inconsistent quote style in new section.

The new "images" section uses double quotes while the rest of the file uses single quotes. Consider using single quotes consistently throughout the file.

-            "images" => [
-                "title" => "Images",
-                "description" => "Images settings",
-                "columns" => [
-                    "feature_image" => "Feature Image",
-                    "cover_image" => "Cover Image",
-                ]
-            ],
+            'images' => [
+                'title' => 'Images',
+                'description' => 'Images settings',
+                'columns' => [
+                    'feature_image' => 'Feature Image',
+                    'cover_image' => 'Cover Image',
+                ]
+            ],
resources/lang/ar/messages.php (1)

30-37: Inconsistent quote style in new section.

The new "images" section uses double quotes while the rest of the file uses single quotes. Consider using single quotes consistently throughout the file.

-            "images" => [
-                "title" => "الصور",
-                "description" => "إعدادات الصور",
-                "columns" => [
-                    "feature_image" => "صورة مميزة",
-                    "cover_image" => "صورة الغلاف",
-                ]
-            ],
+            'images' => [
+                'title' => 'الصور',
+                'description' => 'إعدادات الصور',
+                'columns' => [
+                    'feature_image' => 'صورة مميزة',
+                    'cover_image' => 'صورة الغلاف',
+                ]
+            ],
src/Filament/Resources/CategoriesMetaResource/Pages/ListCategoriesMetas.php (1)

9-19: Consider simplifying the class name.

The class name ListCategoriesMetas contains a double plural with both "Categories" and "Metas". Consider using ListCategoryMeta or simply ListMetas for better clarity.

Otherwise, the implementation correctly follows Filament's patterns for list pages with appropriate header actions.

src/Models/CategoryMeta.php (3)

18-18: Consider renaming the class to match the file name.

The class name CategoriesMeta (plural 'Categories') doesn't match the file name CategoryMeta.php (singular 'Category'). For consistency with Laravel conventions, model class names are typically singular.

-class CategoriesMeta extends Model
+class CategoryMeta extends Model

23-23: Consider adding table name property.

Laravel will default the table name to categories_metas based on the class name. If your database table has a different name, you should explicitly define it with the $table property.

protected $fillable = ['category_id', 'model_id', 'model_type', 'key', 'value', 'created_at', 'updated_at'];

+/**
+ * @var string
+ */
+protected $table = 'category_metas';

1-32: Add polymorphic relationship method for model_id and model_type fields.

Your model has model_id and model_type fields which suggest a polymorphic relationship, but there's no corresponding method defined. Consider adding a morphTo relationship for better Laravel integration.

public function category()
{
    return $this->belongsTo('TomatoPHP\FilamentCategories\Models\Category');
}

+/**
+ * Get the parent model that the meta belongs to.
+ *
+ * @return \Illuminate\Database\Eloquent\Relations\MorphTo
+ */
+public function model()
+{
+    return $this->morphTo();
+}
src/Services/FilamentCategoriesTypes.php (3)

5-6: Unused import.

Illuminate\Support\Str is imported but not used in this class.

-use Illuminate\Support\Str;

12-22: Add validation to ensure duplicate types aren't registered.

The current implementation allows registering the same category type multiple times. Consider adding validation to prevent duplicates based on the type's key.

public static function register(CategoriesType|array $categoriesType)
{
    if(is_array($categoriesType)) {
        foreach($categoriesType as $type) {
            self::register($type);
        }
        return;
    }

+   // Prevent duplicates based on key
+   foreach(self::$categoriesTypes as $existingType) {
+       if($existingType->key === $categoriesType->key) {
+           return;
+       }
+   }

    self::$categoriesTypes[] = $categoriesType;
}

24-27: Add method to retrieve a specific category type by key.

Currently, there's no way to retrieve a specific category type without filtering the collection. Consider adding a helper method for this common operation.

public static function getOptions()
{
    return collect(self::$categoriesTypes);
}

+/**
+ * Get a specific category type by key
+ * 
+ * @param string $key
+ * @return CategoriesType|null
+ */
+public static function getType(string $key)
+{
+    foreach(self::$categoriesTypes as $type) {
+        if($type->key === $key) {
+            return $type;
+        }
+    }
+    
+    return null;
+}
src/Filament/Resources/CategoriesMetaResource.php (3)

20-20: Add meaningful navigation icon and labels.

The current navigation icon is generic. Consider using a more specific icon and adding navigation labels to improve usability.

protected static ?string $model = CategoriesMeta::class;

-protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
+protected static ?string $navigationIcon = 'heroicon-o-tag';
+protected static ?string $navigationLabel = 'Categories Meta';
+protected static ?string $modelLabel = 'Category Meta';
+protected static ?string $pluralModelLabel = 'Categories Meta';

36-36: Enhance the value field to support different data types.

The current value field is a simple text input. Consider using a more flexible approach to handle different data types.

-Forms\Components\TextInput::make('value'),
+Forms\Components\Textarea::make('value')
+    ->columnSpanFull()
+    ->hint('This field supports various data types depending on the key'),

63-65: Add filters for improving data management.

The table currently has no filters. Adding filters for key fields would improve usability.

->filters([
-    //
+    Tables\Filters\SelectFilter::make('category_id')
+        ->relationship('category', 'name')
+        ->searchable()
+        ->label('Category'),
+    Tables\Filters\Filter::make('key')
+        ->form([
+            Forms\Components\TextInput::make('key')
+                ->label('Key')
+                ->placeholder('Search by key'),
+        ])
+        ->query(function (Builder $query, array $data): Builder {
+            return $query
+                ->when(
+                    $data['key'],
+                    fn (Builder $query, $key): Builder => $query->where('key', 'like', "%{$key}%"),
+                );
+        }),
])
src/Services/Contracts/CategoriesType.php (4)

6-7: Remove unused import.

The Illuminate\Support\Facades\Cookie facade is imported but not used in the class.

use Illuminate\Support\Collection;
-use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Str;

9-23: Fix method annotations in PHPDoc.

The PHPDoc @method annotations don't match the actual method signatures. They're missing return types.

/**
 *
 * Class CategoriesType
 * @package TomatoPHP\FilamentCategories\Services\Contracts
 * @property string $key
 * @property string $label
 * @property string $icon
 * @property string $color
-* @method static make(string $key)
-* @method key(string $key)
-* @method label(string $label)
-* @method icon(string $icon)
-* @method color(string $color)
+* @method static self make(string $key)
+* @method self key(string $key)
+* @method self label(string $label)
+* @method self icon(string $icon)
+* @method self color(string $color)
+* @method self sub(array $sub)
+* @method Collection getSub()
+* @method array toArray()
 *
 */

49-49: Fix PHPDoc return type.

The PHPDoc return type is incorrect. It should be self instead of void.

/**
 * @param string $key
-* @return void
+* @return self
 */

117-126: Implement ArrayAccess or Arrayable interfaces.

For better Laravel integration, consider implementing Arrayable interface to make this class work seamlessly with Laravel's collection methods.

+ use Illuminate\Contracts\Support\Arrayable;

/**
 * ...
 */
-class CategoriesType
+class CategoriesType implements Arrayable
{
    // ...

    /**
     * @return array
     */
    public function toArray()
    {
        return [
            'key' => $this->key,
            'label' => $this->label,
            'icon' => $this->icon,
            'color' => $this->color,
            'sub' => $this->sub,
        ];
    }
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f9e9fc and e213c21.

📒 Files selected for processing (18)
  • composer.json (1 hunks)
  • database/migrations/2025_02_26_103918_create_categories_table.php (2 hunks)
  • database/migrations/2025_02_26_104057_create_category_metas_table.php (1 hunks)
  • resources/lang/ar/messages.php (1 hunks)
  • resources/lang/en/messages.php (1 hunks)
  • src/Filament/Resources/CategoriesMetaResource.php (1 hunks)
  • src/Filament/Resources/CategoriesMetaResource/Pages/CreateCategoriesMeta.php (1 hunks)
  • src/Filament/Resources/CategoriesMetaResource/Pages/EditCategoriesMeta.php (1 hunks)
  • src/Filament/Resources/CategoriesMetaResource/Pages/ListCategoriesMetas.php (1 hunks)
  • src/Filament/Resources/CategoryResource.php (7 hunks)
  • src/Filament/Resources/CategoryResource/Pages/CreateCategory.php (2 hunks)
  • src/Filament/Resources/CategoryResource/Pages/EditCategory.php (1 hunks)
  • src/Filament/Resources/CategoryResource/Pages/ListCategories.php (1 hunks)
  • src/FilamentCategoriesPlugin.php (2 hunks)
  • src/Models/Category.php (2 hunks)
  • src/Models/CategoryMeta.php (1 hunks)
  • src/Services/Contracts/CategoriesType.php (1 hunks)
  • src/Services/FilamentCategoriesTypes.php (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • src/Filament/Resources/CategoryResource/Pages/ListCategories.php
  • src/Filament/Resources/CategoryResource/Pages/EditCategory.php
  • src/Filament/Resources/CategoryResource/Pages/CreateCategory.php
🧰 Additional context used
🪛 GitHub Actions: Tests
composer.json

[error] 1-1: Your requirements could not be resolved to an installable set of packages.


[error] 1-1: Root composer.json requires filament/filament ^3.23, found filament/filament[3.x-dev] but it does not match your minimum-stability.

🔇 Additional comments (21)
src/Filament/Resources/CategoriesMetaResource/Pages/CreateCategoriesMeta.php (1)

1-12: Correct implementation of Filament CreateRecord page.

The class is properly structured and follows Filament's recommended patterns for creating resource pages. The implementation is minimal but complete for standard CRUD operations.

src/Filament/Resources/CategoriesMetaResource/Pages/EditCategoriesMeta.php (1)

1-19: Looks good - standard Filament edit page implementation

The EditCategoriesMeta class correctly extends Filament's EditRecord class and follows the standard structure for a Filament resource edit page. The implementation of the getHeaderActions method properly returns a delete action.

database/migrations/2025_02_26_104057_create_category_metas_table.php (1)

1-37: Migration schema follows Laravel conventions but has a future date

The migration properly creates the category_metas table with appropriate columns and relationships. However, the migration filename contains a future date (2025). While this won't affect functionality, it could cause confusion with migration ordering.

Also, verify whether the table name should be category_metas or categories_meta to ensure consistency with your naming conventions.

database/migrations/2025_02_26_103918_create_categories_table.php (3)

12-12: Good addition of return type

Adding the void return type follows modern PHP type hinting practices and improves code clarity.


17-19: Good addition of foreign key constraint

The foreign key constraint properly links the team_id column to the teams table with cascade deletion, which helps maintain database integrity.


41-41: Good addition of return type

Adding the void return type follows modern PHP type hinting practices and improves code clarity.

src/FilamentCategoriesPlugin.php (3)

7-8: Resource imports added correctly

The imports for the required resources are properly added.


12-13: Private property added correctly

The $isActive boolean property is properly defined.


28-33: Resources registration looks good

The conditional registration of resources is implemented correctly.

src/Models/Category.php (4)

13-29: Good update to property type annotations.

The docblock now uses more precise type declarations (integer and boolean) and adds new relationship properties that provide better documentation for the model structure.


34-40: Description field is now translatable.

Adding 'description' to the translatable array is a good improvement for multilingual support.


66-69: Simplified Team relationship implementation.

The team method has been simplified to directly return the belongsTo relationship without checking for the existence of the Team class.


83-90: Good addition of CategoriesMetas relationship.

The new categoriesMetas relationship properly establishes the connection with the CategoriesMeta model, supporting the new metadata structure mentioned in the PR.

src/Filament/Resources/CategoryResource.php (6)

5-19: Appropriate updates to imports.

Good reorganization of imports, including the shift from FilamentCMSTypes to FilamentCategoriesTypes, which aligns with the architectural changes in this PR.


30-48: Consistent update to translation namespaces.

Translation keys have been consistently updated from 'filament-cms::messages' to 'filament-categories::messages', reflecting the shift to a more focused category management system.


110-126: Properly integrated FilamentCategoriesTypes service.

The code now correctly uses the FilamentCategoriesTypes service for managing category types, replacing the previous FilamentCMSTypes service.


159-167: Consistent update of service methods in table columns.

The 'for' column state and styling now properly utilize the new FilamentCategoriesTypes service.


173-181: Consistent update of service methods for the type column.

The 'type' column state and styling now properly utilize the new FilamentCategoriesTypes service.


242-242: Added support for soft deletes.

Adding TrashedFilter enables filtering of soft-deleted records, improving data management capabilities.

composer.json (2)

51-51: Update PHP version requirements.

Dropping support for PHP 8.1 while adding support for PHP 8.3 and 8.4 is a forward-looking change, but ensure your users are aware of this compatibility shift.


56-65: Update dev dependencies.

Good updates to development dependencies, including moving to newer versions of testing packages. These should provide better development tools and compatibility with newer PHP versions.

Comment on lines +21 to +26
if(class_exists(Module::class) && \Nwidart\Modules\Facades\Module::find('FilamentCategories')?->isEnabled()){
$this->isActive = true;
}
else {
$this->isActive = true;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Logic issue in condition handling

The current implementation sets $isActive to true in both the if and else branches, making the condition check ineffective.

if(class_exists(Module::class) && \Nwidart\Modules\Facades\Module::find('FilamentCategories')?->isEnabled()){
    $this->isActive = true;
}
-else {
-    $this->isActive = true;
-}

Also, Module is used without an import. Consider adding:

use Nwidart\Modules\Module;

Comment on lines +28 to +31
public function category()
{
return $this->belongsTo('TomatoPHP\FilamentCategories\Models\Category');
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use ::class notation instead of string reference for better IDE support.

Using the class name string reference is deprecated in modern Laravel applications. Using the ::class notation provides better type hinting and refactoring support.

public function category()
{
-    return $this->belongsTo('TomatoPHP\FilamentCategories\Models\Category');
+    return $this->belongsTo(Category::class);
}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function category()
{
return $this->belongsTo('TomatoPHP\FilamentCategories\Models\Category');
}
public function category()
{
return $this->belongsTo(Category::class);
}

Comment on lines +26 to +33
Forms\Components\TextInput::make('model_id')
->numeric(),
Forms\Components\TextInput::make('model_type')
->maxLength(255),
Forms\Components\TextInput::make('category_id')
->required()
->numeric(),
Forms\Components\TextInput::make('key')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Replace numeric inputs with relationship selectors.

The current form uses basic text inputs for IDs. Using relationship selectors would improve the user experience and data integrity.

Forms\Components\TextInput::make('model_id')
    ->numeric(),
Forms\Components\TextInput::make('model_type')
    ->maxLength(255),
-Forms\Components\TextInput::make('category_id')
-    ->required()
-    ->numeric(),
+Forms\Components\Select::make('category_id')
+    ->relationship('category', 'name')
+    ->required()
+    ->searchable(),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Forms\Components\TextInput::make('model_id')
->numeric(),
Forms\Components\TextInput::make('model_type')
->maxLength(255),
Forms\Components\TextInput::make('category_id')
->required()
->numeric(),
Forms\Components\TextInput::make('key')
Forms\Components\TextInput::make('model_id')
->numeric(),
Forms\Components\TextInput::make('model_type')
->maxLength(255),
Forms\Components\Select::make('category_id')
->relationship('category', 'name')
->required()
->searchable(),
Forms\Components\TextInput::make('key')

Comment on lines 56 to 58
'created_at',
'updated_at',
'updated_at'
];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove updated_at from fillable attributes.

Including 'updated_at' in the $fillable array might bypass Laravel's automatic timestamp handling.

 protected $fillable = [
     'type',
     'for',
     'parent_id',
     'name',
     'slug',
     'description',
     'icon',
     'color',
     'is_active',
     'show_in_menu',
     'created_at',
-    'updated_at'
 ];
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'created_at',
'updated_at',
'updated_at'
];
protected $fillable = [
'type',
'for',
'parent_id',
'name',
'slug',
'description',
'icon',
'color',
'is_active',
'show_in_menu',
'created_at',
];

"tomatophp/console-helpers": "^1.1",
"filament/filament": "^3.2"
"filament/filament": "^3.23"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

⚠️ Potential issue

🧩 Analysis chain

Fix dependency version constraint.

The pipeline is failing because Filament 3.23 doesn't match your minimum-stability requirements.

-        "filament/filament": "^3.23"
+        "filament/filament": "^3.0"

The error suggests that version 3.23 might not be released yet or requires a development stability flag. Consider using a more conservative version constraint or adjusting the stability requirements in composer.json.


🏁 Script executed:

#!/bin/bash
# Check available Filament versions
composer show filament/filament --available

Length of output: 11555


Action Required: Update Filament Dependency Constraint

Based on the output from the composer command, it’s clear that no stable release matching the "^3.23" constraint exists. The available stable versions (like v3.3.0 and others in the 3.x series) fall under a constraint such as "^3.0". The pipeline issue arises because "^3.23" forces Composer to look for a version that isn’t available without additional stability flags.

Please update the dependency in composer.json accordingly:

  • File: composer.json (line 53)
-        "filament/filament": "^3.23"
+        "filament/filament": "^3.0"

This change will ensure that Composer selects a published, stable version of Filament that complies with your project's minimum-stability requirements.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"filament/filament": "^3.23"
"filament/filament": "^3.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant