Skip to content

Conversation

@tabacitu
Copy link
Member

@tabacitu tabacitu commented Nov 7, 2024

WHY

BEFORE - What was wrong? What was happening before this PR?

Package was on v1.x supporting older PHP/Laravel/Backpack versions without comprehensive test coverage.

AFTER - What is happening after this PR?

v2.0 with modernized dependencies, automated testing, and improved API surface for extensibility.

HOW

How did you achieve that, in technical terms?

Foundation (PR #34):

  • Complete package refactoring with comprehensive PHPUnit test suite
  • Improved uploader architecture with better trait separation
  • Added test models, migrations, and CI workflow

API improvements:

  • Made strategy methods public (hasDeletedFiles(), shouldUploadFiles(), getEntryAttributeValue()) for extensibility
  • Changed processRepeatableUploads() return type from array to Collection for consistency

Dependency updates:

{
  "require": {
    "backpack/crud": "^7.0",  // was ^6.x
    "spatie/laravel-medialibrary": "^10.7||^11.3"
  },
  "require-dev": {
    "phpunit/phpunit": "^11.0",  // was ^10.0|^11.0
    "orchestra/testbench": "^10.0",  // was ^8.0|^9.0|^10.0
    "spatie/laravel-translatable": "^6.0"  // new
  }
}

CI/CD:

  • GitHub Actions workflow testing PHP 8.2-8.3 on push, PRs, and daily schedule

Is it a breaking change or non-breaking change?

Breaking changes:

  • Requires PHP 8.2+ (dropped 8.1 and below)
  • Requires Laravel 11+ (via Orchestra Testbench 10)
  • Requires Backpack CRUD v7.0+
  • processRepeatableUploads() returns Collection instead of array

How can we test the before & after?

Run test suite: composer test

Tests cover media uploads, collections, conversions, and repeatable fields across different uploader types.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


The next branch is where we bring together all fixes&features for our next version. This PR is here to document all PRs merged, all breaking changes, all remaining TODOs about this version until launch.

Features

??? made it work?!

Fixes

Breaking changes

Todos

Things to do before we merge this PR into main:

  • fix tests not running on this branch
  • adapt composer.json requirements to new version

* wip

* refactor, add tests

* wip

* wip

* update easy mde uploader

* wip

* remove deleted trait

* wip

* add repeatable trait

* make functions public

* rename get function

* refactoring dropzone uploader

* wip

* add media test models

* fix test models

* fix media pivot namespace

* fix test model namespace

* add fk to relation

* add media library tests

* save the object in the macro

* Update composer.json

---------

Co-authored-by: Cristian Tăbăcitu <[email protected]>
@tabacitu tabacitu self-assigned this Nov 7, 2024
@tabacitu tabacitu changed the title [2.0] Refactoring, adding tests, cleanup (#34) [WIP] NEXT version of medialibrary-uploaders Nov 7, 2024
@tabacitu tabacitu changed the title [WIP] NEXT version of medialibrary-uploaders [WIP] NEXT medialibrary-uploaders version Nov 7, 2024
@tabacitu tabacitu changed the title [WIP] NEXT medialibrary-uploaders version [WIP] Next medialibrary-uploaders version Nov 7, 2024
@tabacitu
Copy link
Member Author

tabacitu commented Nov 28, 2024

@pxpm please help take this branch to a clean state:

  • add a test workflow, so tests run on Github
  • fill in my description above (in the first comment) so it's clear what this branch brings to the table

@tabacitu tabacitu removed their assignment Nov 28, 2024
@tabacitu tabacitu changed the title [WIP] Next medialibrary-uploaders version Next medialibrary-uploaders version Jan 27, 2025
Co-authored-by: tabacitu <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@tabacitu
Copy link
Member Author

@copilot what does this PR do? What does it add or remove in terms of functionality? What does it change? Please provide a summary of what's different in this PR, because it's supposed to be a new version of this package and we want to let our users know what's different.

Copy link
Contributor

Copilot AI commented Nov 19, 2025

@tabacitu I've opened a new pull request, #47, to work on those changes. Once the pull request is ready, I'll request review from you.

@tabacitu tabacitu changed the title Next medialibrary-uploaders version v2 - refactor, fix bugs and support Backpack v7 Nov 19, 2025
@tabacitu tabacitu merged commit 0c214a1 into main Nov 19, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Backpack v7.0 Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants