Skip to content

Fix nullable errors. Bump php-di to 7. Remove spatie data transfer - #142

Merged
MlKilderkin merged 3 commits into
4.xfrom
5.0.0
Aug 3, 2026
Merged

Fix nullable errors. Bump php-di to 7. Remove spatie data transfer#142
MlKilderkin merged 3 commits into
4.xfrom
5.0.0

Conversation

@MlKilderkin

Copy link
Copy Markdown
Collaborator

Summary

  • Raise tribe-libs to PHP 8.1+ and bump php-di/php-di to ^7.0 for PHP 8 compatibility.
  • Replace abandoned spatie/data-transfer-object with a first-party Field Models DTO layer (Tribe\Libs\Field_Models\DTO), keeping 4.x BC (castValue / castType and optional Spatie\DataTransferObject\* aliases).
  • Fix PHP 8.4 implicit nullable parameters, update Logger for PSR-3 string|Stringable, and migrate WP_Downloader commands to #[AsCommand].
  • Modernize CI/workflows for PHP 8.1–8.3 and WordPress latest/6.4/6.7; set monorepo default branch to 5.x; document upgrade path and usage examples.

Upgrade notes (4.x → 5.x)

  1. Require PHP 8.1+.
  2. Bump moderntribe/tribe-libs (or published square1-* packages) to ^5.0.
  3. Remove project patches for PHP-DI 6 / PHP 8.4 nullables — 5.x uses PHP-DI 7.
  4. Field Models: keep existing Field_Model usage; Spatie typehints still work via aliases when Spatie is not installed.
  5. Until Packagist publishes square1-*:^5.0, consume the monorepo (moderntribe/tribe-libs) or a VCS/path install.

@MlKilderkin
MlKilderkin requested review from a team and dpellenwood July 27, 2026 16:49

@dpellenwood dpellenwood left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A couple requests and questions, but this looks great overall!

Comment thread .github/workflows/analysis.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
- php-versions: '8.1'
wordpress-version: '5.3.12'
php-versions: [ '8.1', '8.2', '8.3' ]
wordpress-version: [ 'latest', '6.4.5', '6.7.2' ]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Curious why check WP 6.4?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That was check for back compatibility. I don't expect anyone running this version, but wanted to check anyway. Bumped it to 6.6.5 and latest patch 6.9.5

Comment thread .github/workflows/analysis.yml Outdated

@dpellenwood dpellenwood left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great, @MlKilderkin ! Let's get this merged and new packages built. Thank you!

@MlKilderkin
MlKilderkin merged commit 7f1d1ef into 4.x Aug 3, 2026
26 checks passed
@MlKilderkin
MlKilderkin deleted the 5.0.0 branch August 3, 2026 11:54
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.

2 participants