Weave Code
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

Laracombee Laravel Package

amranidev/laracombee

Laravel package for the Recombee recommendation API. Manage users, items, and interactions, and fetch personalized recommendations with a Laravel-friendly interface—ideal for e-commerce, media libraries, and marketplaces. Compatible with Laravel 10–12, PHP 8.2+.

View on GitHub
Deep Wiki
Context7
## Getting Started
Install via Composer:
```bash
composer require vendor/package-name

The package now officially supports Laravel 10/11/12, so no additional configuration is required for modern Laravel versions. Start by reviewing the rewritten README for updated setup instructions and basic usage examples.

For testing, leverage the offline fake-based test coverage to mock dependencies without external services. Example:

use Vendor\Package\Facades\PackageFacade;

$mock = PackageFacade::fake();
$mock->shouldReturn('test-value');

Implementation Patterns

Core Workflow

  1. Service Integration: Use dependency injection to bind the package's core class:
    $this->app->bind('vendor.package', function ($app) {
        return new Vendor\Package\Services\CoreService();
    });
    
  2. Facade Usage: Prefer facades for simplicity in Blade/console:
    $result = PackageFacade::performAction($input);
    
  3. Test-Driven Development: Utilize the modernized PHPUnit config for consistent testing. Example test:
    use Tests\TestCase;
    
    class PackageTest extends TestCase {
        public function test_fake_coverage() {
            PackageFacade::fake();
            $this->assertEquals('test-value', PackageFacade::performAction());
        }
    }
    

Common Use Cases

  • Offline Testing: The new fake-based coverage eliminates need for external APIs during CI/CD.
  • Laravel 12 Features: Leverage app()->bind() or app()->tag() for service tagging if using Laravel 12's improved container.

Gotchas and Tips

Breaking Changes

  • Testbench Upgrade: If using Testbench, update to the Laravel 12-compatible version (v8.0+). Older versions may fail due to PHPUnit 10+ requirements.
  • PHPUnit Config: The modernized config assumes PHPUnit 10+. Downgrade if using PHPUnit 9.x (though unsupported).

Debugging

  • Fake Assertions: Use assertFake() to verify fake interactions:
    PackageFacade::assertFakeCalled('performAction');
    
  • Laravel 12 Container: If services fail to resolve, check for app()->when() bindings instead of singleton() (Laravel 12's preferred method).

Extension Points

  • Custom Fakes: Extend the fake class for domain-specific mocks:
    class CustomFake extends PackageFacadeFake {
        public function customMethod() { ... }
    }
    
  • Service Providers: Override defaults in AppServiceProvider:
    public function register() {
        $this->app->extend('vendor.package', function () {
            return new CustomService();
        });
    }
    

NO_UPDATE_NEEDED would **not** apply here due to the significant changes in v0.3.1.
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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity