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

Fix: Undefined $maxParallelUploads Variable in v3.2.1.33 by Moving Logic to FileUpload Class #15375

Closed
wants to merge 2 commits into from

Conversation

zaiimrq
Copy link

@zaiimrq zaiimrq commented Jan 18, 2025

Description

This pull request addresses an issue where the $maxParallelUploads variable was undefined in version 3.2.1.33. The logic for the $maxParallelUploads feature has been moved from the BaseFileUpload class to the FileUpload class to resolve this issue.

Visual Changes

Move this code from BaseFileUpload class to FileUpload child class

  namespace Filament\Forms\Components;
  
  protected int | Closure | null $maxParallelUploads = null;
  
      public function maxParallelUploads(int | Closure | null $count): static
      {
          $this->maxParallelUploads = $count;
  
          return $this;
      }
      public function getMaxParallelUploads(): ?int
      {
          return $this->evaluate($this->maxParallelUploads);
      }

Functional Changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.

Summary of Changes

  • Moved the $maxParallelUploads logic from BaseFileUpload to FileUpload to fix the undefined variable issue.
  • Ensured code style consistency by running the composer cs command.

This fix ensures that the $maxParallelUploads variable is properly defined and functional, maintaining the integrity of the file upload feature in FilamentPHP.

@zaiimrq zaiimrq closed this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant