Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Model Auditlog Laravel Package

orisintel/laravel-model-auditlog

Laravel Model AuditLog automatically tracks model create, update, and delete events, recording who made each change and the before/after values. Simple to install and configure, it gives you a clear, queryable audit trail for Eloquent models.

View on GitHub
Deep Wiki
Context7

Getting Started

This assessment reflects v4.1.0, whose headline change is PHP 8 support. Treat it as a compatibility release first and a feature release second: no new APIs are described, so the main work is validating that your Laravel app and CI pipeline can run the package on PHP 8.

  1. Check constraints before upgrading

    • Inspect the package’s composer.json for php and illuminate/* constraints.
    • Confirm your app’s PHP version is supported, not merely “8.x” in name. Verify the exact patch range the package allows.
    • Run composer why-not vendor/package 4.1.0 if Composer refuses the update.
  2. Upgrade in a branch

    composer require vendor/package:^4.1 --with-all-dependencies
    composer update vendor/package --with-dependencies
    

    Commit the lock file change separately so you can isolate package-related regressions.

  3. Look first at these files

    • README.md and CHANGELOG.md for upgrade notes.
    • composer.json for PHP/Laravel constraints.
    • The service provider for bindings, aliases, config merging, and publish tags.
    • Existing package tests for supported Laravel/PHP combinations.
  4. First use case

    • Run the package’s own test suite or a minimal smoke test in a fresh Laravel app on PHP 8.
    • Exercise the package’s primary entry point once: resolve its binding from the container, call the main service method, and confirm expected output.
    • Then run your application’s existing tests that touch the package.

Implementation Patterns

Use the package through the container, not hard-coded internals. Resolve services via constructor injection or the package’s documented facade. This keeps upgrades contained and makes it easier to swap or mock the package in tests.

Pin the new minor version deliberately. Use ^4.1 once validated, but avoid jumping multiple majors in the same deployment. If your app is on an older major, plan a staged upgrade: first move to the latest patch of your current major, then to v4.1.0.

Add a PHP 8 CI lane. A practical matrix:

php: ['8.0', '8.1', '8.2', '8.3']
laravel: ['9.*', '10.*', '11.*']

Use --prefer-lowest in at least one job to catch constraint mistakes, and a normal install job to catch real-world dependency resolution.

Validate configuration and caching. If the package publishes config, run:

php artisan vendor:publish --tag=package-config
php artisan config:clear
php artisan config:cache

Then exercise the package again with cached config. PHP 8 upgrades often expose config array shape issues only when caching is enabled.

Use feature tests around integration points. Test the package where it crosses your application boundary: controllers, jobs, commands, listeners, and queued workflows. Mock external HTTP calls and queue connections so PHP 8 runtime differences do not get hidden by network flakiness.

Adopt a compatibility-first rollout. Deploy to staging with production-like PHP extensions and OPcache settings. Compare logs for deprecation notices before enabling the new version for all traffic.

Gotchas and Tips

  • “PHP 8 support” does not guarantee Laravel support. Check the illuminate/* constraints separately. A package can allow PHP 8 while still capping Laravel at an older major.
  • PHP 8 deprecations can become exceptions. Watch for dynamic property creation, passing null to non-nullable internal parameters, and optional parameters declared before required ones. Run tests with error_reporting(E_ALL).
  • Composer platform settings can mask problems. A local config.platform.php value may let installation succeed while production runs a different PHP version. Align platform.php, CI images, and production runtime.
  • Clear caches after upgrading. Run composer dump-autoload, php artisan config:clear, php artisan cache:clear, and php artisan route:clear in local and staging environments.
  • Check published assets and migrations. If the package publishes migrations, config, or view components, compare them against the new version. Republish only after diffing, and never edit vendor files.
  • Debug with package-level visibility. Use Laravel Telescope, Log::debug(), or a temporary wrapper around the package’s main service to log inputs and outputs. If the package dispatches events, listen temporarily in a local service provider.
  • Use extension points instead of forks. Prefer container bindings, macros, custom event listeners, or published config over patching vendor code. This keeps future PHP 8 patch releases safe.
  • Watch transitive dependencies. A PHP 8-compatible package can still pull in a dependency that is not. Run composer outdated --direct and inspect the full dependency tree after upgrading.
  • Keep a rollback path. Because v4.1.0 is primarily a compatibility release, rollback should be simple: revert the Composer lock change and redeploy. Avoid combining it with unrelated framework or PHP runtime changes in the same release.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route