Skip to content

Releases

1.2.1 - Update documentation contact and CI PHP action version

Choose a tag to compare

@allanmcarvalho allanmcarvalho released this 06 Nov 19:44

Changed

Documentation / repository metadata

  • Updated security reporting contact email to contact@atb.dev.br.
  • Updated package and documentation links to use the https://atb.dev.br/... domain.

Note: This is documentation-only—no runtime/API behavior changes. However, users or tooling that rely on the old email or previously bookmarked/linked destinations may need to update their references.

CI (GitHub Actions)

  • Updated the GitHub Actions workflow to use a newer revision of shivammathur/setup-php (bumped from 2.37.2 to 2.40.0).

Note: This affects CI provisioning/setup of PHP used during tests/builds. It does not change application code, but it may slightly alter CI execution details (how PHP is downloaded/configured) without requiring any application migration.

Internal Maintenance

  • Merged the Dependabot update for the GitHub Actions workflow that performs the PHP setup action revision change.

1.2.0 - Add maintainer dependency and clarify sift_when documentation

Choose a tag to compare

@allanmcarvalho allanmcarvalho released this 04 Nov 18:32

Changed

  • Runtime dependency added: artisan-toolbox/maintainer is now required as a runtime dependency (moved to require rather than dev-only usage). This ensures consumers can resolve the Core service without needing development dependencies.
    • User-visible impact: production installs may include an additional required package.
    • Compatibility / migration: deployment environments must satisfy the updated artisan-toolbox/maintainer version constraints now required at runtime.
  • README header/badge management updated: README head metadata and badge/header presentation were updated to a consistent, standardized layout and managed programmatically.

Documentation

  • Clarified sift_when closure timing: Expanded documentation explains when sift_when() closures execute versus when iteration happens, including guidance comparing eager arrays vs lazy generators (wording/terminology and navigation updated as well).
    • User-visible impact: documentation only; no code/runtime behavior is changed.

Internal Maintenance

  • Tooling/dependency housekeeping:
    • Bumped the artisan-toolbox/maintainer tooling/maintainer reference.
    • Simplified Rector configuration sets (developer refactoring/tooling behavior may change, but end-user APIs/runtime behavior are not intended to be affected).
  • README badge/header formatting standardization: Standardized README badge formatting and header badges for consistent presentation.

1.1.0 - Add conditional sift macros and sift_when helper

Choose a tag to compare

@allanmcarvalho allanmcarvalho released this 04 Sep 14:40

Added

  • Conditional “sift” feature for building arrays/iterables from nested data while conditionally excluding values.

    • New internal singleton ArtisanToolbox\Core\Support\SiftMarker used as a sentinel to mark values for exclusion.
    • New utility ArtisanToolbox\Core\Support\Sifter implementing recursive sift behavior:
      • Filters out SiftMarker instances.
      • Recursively transforms supported nested structures (arrays, Collection, LazyCollection, and other traversables).
      • Provides:
        • Sifter::toArray(iterable)
        • Sifter::collection(Collection $collection)
        • Sifter::lazyCollection(LazyCollection $collection)
  • New Laravel macros registered in CoreServiceProvider::boot():

    • Illuminate\Support\Arr::sift() → returns Sifter::toArray($items)
    • Illuminate\Support\Collection::sift() → returns Sifter::collection($this)
    • Illuminate\Support\LazyCollection::sift() → returns Sifter::lazyCollection($this)
  • New global helper: ArtisanToolbox\Core\sift_when(bool $condition, mixed $value): mixed

    • Added via Composer autoloading of src/helpers.php (autoload.files), making the helper available at Composer autoload time.
    • Behavior:
      • sift_when(false, $value) returns SiftMarker::instance() so the value is removed by sift() when iterables are sifted.
      • sift_when(true, $value) returns $value directly.
      • If $value is a Closure, it is executed only when $condition is true.
  • Tests

    • Added tests/Feature/ArrSiftTest.php covering macro registration, inclusion/exclusion via sift_when, closure short-circuiting, recursive marker discarding across nested supported iterables (including generators), key preservation, and non-mutating/lazy behavior.

Changed

  • PHPStan configuration workflow

    • Updated phpstan.neon.dist to add parameters.configDirectories pointing at config.
    • This allows PHPStan to load additional configuration fragments from config (while keeping the existing paths configuration).
    • Impact: analysis/merging can change if new PHPStan config fragments exist under config.
    • No runtime behavior changes—this is static analysis configuration only.
  • Version constant

    • Bumped Core::VERSION from 1.0.0 to 1.1.0.
  • Documentation / developer workflow

    • Updated README.md and CHANGELOG.md with usage examples for combining Arr::sift() / Collection->sift() / LazyCollection->sift() with sift_when().
    • Updated the core development skills guide (resources/boost/.../SKILL.md) with a step describing conditional array building and key/type preservation.
  • Git ignore updates

    • .gitignore now ignores config/maintainer.php and config/maintainer_secrets.php, which may affect developer workflows that expect those files to be committed.

Compatibility / Migration Notes

  • Potential macro collisions: If other packages define sift macros on Arr, Collection, or LazyCollection, Laravel macro behavior may cause overwrites/overlaps depending on registration order.
  • Composer autoload side effects: Adding src/helpers.php to autoload.files means the helper file is loaded automatically at Composer autoload time; ensure it’s safe for your environment.
  • PHPStan behavior changes: If you add PHPStan fragment files under config, they may alter analysis results due to the new configDirectories setting.
  • Core::VERSION checks: Consumers inspecting the Core::VERSION string will now observe 1.1.0.

Version 1.0.0: Core Versionable, Translated Cast, Inertia Cross-Domain Middleware

Choose a tag to compare

@allanmcarvalho allanmcarvalho released this 18 Aug 14:04

Added

  • Versionable support in Core: Introduces a Versionable contract/implementation in the Core so the package can represent and work with version metadata in a standardized way. This enables downstream tooling and skills to rely on consistent version handling.
  • Translated cast: Adds a translated cast to improve translation/casting ergonomics for localized values.
  • Inertia cross-domain visit middleware: Adds middleware to support Inertia cross-domain navigation, improving behavior for multi-domain setups where cross-domain visits would otherwise break expected navigation/session flows.

Changed

  • Middleware namespace wiring updated: Updates middleware namespace resolution to align with the intended application structure. If you reference/resolve middleware by namespace in custom code, verify it still aligns with your setup after upgrading.
  • Core command refactor (Laravel attribute imports): Refactors the core command to use Laravel attribute imports for cleaner/modern attribute usage.

Removed

  • Changelog update workflows: Removes GitHub workflows related to updating/generating changelogs. If you relied on those workflows running in CI, ensure your release/changelog process is using the new intended mechanism.

Documentation

  • README and documentation links: Improves clarity and usability of README/documentation links.
  • README badge updates (1.x branch workflows): Updates README badges to reference the 1.x branch workflow targets for correct major-version CI signaling.
  • README badge consistency: Further refines README badges for consistency and clearer presentation.

Internal / Build

  • Bumped minimum requirements: Updates dependency requirements to require PHP 8.5, Laravel 13, and Pest 5.

Compatibility & Upgrade Notes

  • This release raises the minimum supported versions to PHP 8.5 and Laravel 13. Upgrade your environment accordingly before installing/upgrading.
  • If you use middleware namespace resolution or custom middleware/casting wiring, review your integrations to ensure they remain compatible with the updated middleware namespace and the new translated cast behavior.