- Is pouya1364/probabilistic-bundle a Laravel package?
- No. It is a Symfony bundle that integrates the probabilistic-php library, exposing Bloom Filter, Counting Bloom Filter, Cuckoo Filter, Count-Min Sketch, and HyperLogLog as configured services. Laravel uses Symfony components but not the Symfony framework, so bundle auto-registration and Symfony DI extension loading do not work out of the box. You should treat it as a PHP library with Symfony-flavoured packaging and plan a small adapter for Laravel.
- How do I install pouya1364/probabilistic-bundle with Composer?
- Install it with composer require pouya1364/probabilistic-bundle, pinning version 0.1.0 exactly rather than using a caret range because it is pre-1.0. There are no exotic runtime requirements implied, but you should confirm the PHP and Symfony version constraints in its composer.json first. In a Laravel app, installation alone will not register services or publish configuration.
- How can I use this probabilistic data structure package in a Laravel application?
- The practical route is to add a thin Laravel service provider that builds a registry from config/probabilistic.php and binds named filters into Laravel's container. Alternatively, consume pouya1364/probabilistic-php directly and skip the Symfony bundle layer entirely. Either way, the registry and per-instance autowired services will not appear automatically in Laravel.
- What data structures does probabilistic-bundle provide?
- It provides Bloom Filter for approximate membership, Counting Bloom Filter for membership with counts, Cuckoo Filter for deletable membership checks, Count-Min Sketch for frequency estimation, and HyperLogLog for cardinality estimation. Each can be declared in configuration as a named instance and resolved through a ProbabilisticRegistry or per-instance service. That named-instance model maps well to deduplication keys, seen-before checks, unique-visitor estimates, and heavy-hitter analytics.
- Is filter state persisted between requests or processes?
- This is the biggest unknown and is not documented in the release notes. If filters are reconstructed per request or process, they are useless for most production deduplication workloads because the membership history is lost. You must verify whether state persists and via what backend, such as in-memory, Redis, filesystem, or database, before relying on it. The serialization format and its versioning also become critical dependencies if state is persisted.
- What are the false-positive rate and memory footprint per configured filter?
- The package documentation does not address accuracy or sizing, so you should measure both for your expected capacity and error tolerance. False-positive rates, memory cost per million items, and overflow behaviour differ per structure and configuration. Run a benchmark against Bloom, Cuckoo, Count-Min, and HyperLogLog with realistic item counts before committing to production.
- What happens when a probabilistic filter reaches capacity saturation?
- The documented behaviour is unclear, so you cannot assume a safe failure mode. Depending on the structure and configuration, saturation may raise an explicit error, silently degrade accuracy, or silently return more false positives. Test each configured instance at and beyond its expected capacity, and add monitoring or a fallback path for critical use cases.
- Which PHP, Laravel, and Symfony versions does probabilistic-bundle support?
- The review notes do not state supported PHP or framework version constraints, so check the package's composer.json and release metadata before adopting it. Laravel compatibility is not first-party because this is a Symfony bundle, and no built-in Laravel service provider is mentioned. Pin the exact 0.1.0 release and verify it against your PHP and Laravel versions in a staging environment.
- What is the probabilistic:list console command?
- It is a Symfony console command that lists the probabilistic structures configured for the current environment, which is genuinely useful for discovering and operating named instances. In Laravel you will not get it automatically because the Symfony bundle console integration is absent. You would need to port it as an Artisan command or inspect your config/probabilistic.php directly.
- Is probabilistic-bundle production-ready and well maintained?
- It is at version 0.1.0 with no prior assessment, so there is no SemVer stability guarantee on config schema, service IDs, or public classes. The review found no indication of maintainer depth, CI, test coverage, or production references. Adopt it behind an internal interface such as SeenBefore or CardinalityEstimator, pin the exact version, and start with tolerant, non-financial use cases like cache-stampede deduplication or approximate unique-visitor counts.