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

Encryption Laravel Package

marko/encryption

Encryption support for the Marko framework, providing a simple service-provider integration for encrypting and decrypting application data with configurable keys and ciphers, plus helpers for secure serialization of values across your app.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What this package actually is. marko/encryption is a read-only monorepo split containing encryption contracts (interfaces) for the Marko PHP framework. It ships no cipher implementations, no key management, and no runtime dependencies — the PR/issue redirect to marko-php/marko confirms it is generated from the framework core for dependency-resolution purposes. Zero stars, zero dependents, and an unpopulated release history mean there is effectively no external ecosystem signal to evaluate.

Architecture fit. As a contracts-only package it occupies the correct architectural position: it defines a port (encrypter/signature interfaces) that the framework's container binds to a concrete adapter. That is the shape you want in a domain like cryptography — the interface is stable, the algorithm is swappable, and consumers depend on an abstraction rather than an implementation. It will drop cleanly into any Composer/PSR-4 PHP 8.x application. The architectural merit is real; the packaging and governance around it are not yet demonstrable.

Integration feasibility. Installing it is a one-line Composer change and low risk by construction (interface files only). The genuine integration effort sits entirely outside this package: providing a concrete Encrypter, choosing the cipher suite, sourcing and rotating keys, and defining the envelope format. Estimating effort from this repo alone is not possible without reading the parent framework's binding, which is where the actual behavior lives.

Technical risk. Low code risk, high blast-radius risk. Cryptography failures are unrecoverable and compliance-visible (SOC 2, PCI DSS, GDPR obligations around data-at-rest). An unmaintained or single-maintainer contract package is not itself dangerous, but it implies the implementing package is equally unproven, and an abandoned abstraction tends to trap teams on a deprecated algorithm with no upgrade path. There is no visible security disclosure policy, no CVE history to inspect, and no dependents to infer production hardening from. There is also a low-severity namespace/typosquat consideration given the near-zero download volume.

Key questions to resolve before any commitment

  1. Where is the concrete implementation, and is it maintained in lockstep with these contracts?
  2. Is there a versioned release with an explicit backward-compatibility policy, or must we pin a commit hash?
  3. Which primitives are assumed (AES-256-GCM via OpenSSL, libsodium secretbox, hash_hmac signatures)? Is authenticated encryption mandatory in the contract?
  4. Does the contract accommodate key rotation and multi-key decryption, or is it single-key by design?
  5. What is the documented vulnerability disclosure and patch cadence for the monorepo?
  6. How many active maintainers, and what is the bus factor?
  7. Is the interface close enough to Laravel's Illuminate\Contracts\Encryption\Encrypter that we could swap implementations without touching call sites?

Integration Approach

Stack fit. Appropriate only in one of two scenarios: (a) we are standardizing on Marko as our framework, in which case this is a transitive dependency we accept by default and simply pin; or (b) we deliberately want a thin, framework-agnostic encryption port and are willing to own the adapter. In a Laravel, Symfony, or bespoke codebase, the cost/benefit of pulling in an unrelated framework's contracts is poor — we would be importing a dependency with no community, no documentation beyond source, and no upgrade guarantees, to obtain an interface we could define in twenty lines.

Migration path. If already on Marko: no migration, but establish a pinning and review policy on day one. If not on Marko: the sane path is to write our own narrow port (EncrypterInterface with encrypt/decrypt/sign) and bind Laravel's Encrypter or libsodium behind it — functionally equivalent, materially better supported. Adopting marko/encryption as the contract while binding a vetted implementation is technically feasible and does reduce lock-in, but the abstraction is only worth it if we also maintain contract tests, which is where the real cost lands.

Compatibility. Verify the PHP version constraint and whether the parent framework commits to semver on these split packages. Because the repo is read-only and issues are centralized, we cannot see downstream breakage signals; every upgrade must be validated in our own test suite. Confirm the package does not silently depend on a marko/framework version range that drags in unwanted code.

Sequencing.

  1. Source review — read the interfaces, confirm primitive assumptions and rotation support.
  2. Spike — bind an existing, vetted encrypter (Laravel Encrypter or sodium_crypto_secretbox) behind the contract; timebox to days, not weeks.
  3. Contract tests — encrypt/decrypt round-trip, tamper detection, key rotation, empty/null payloads, large payloads.
  4. Dual-read rollout — decrypt with old path, re-encrypt with new, migrate data in the background.
  5. Cutover and remove the legacy path; retain decrypt-only capability for a defined retention window.
  6. Pin the version and add it to the dependency-review checklist.

Operational Impact

Maintenance. The package itself is near-zero maintenance — interface files, no runtime dependencies, no attack surface. The maintenance burden is ownership: someone must watch the parent monorepo for releases and security notes, because there is no dependents graph, no advisory feed, and no ecosystem tooling that will alert us. Budget a recurring line item for dependency review, not for code changes.

Support. Community-only, via the central Marko repository, with no SLA and no commercial backer evident. For a system that stores regulated data, that is a material gap: the moment a cryptographic weakness is found is the worst possible time to discover the upstream has no triage process. If this sits on any compliance-relevant data path, we should require an internal fallback implementation and a documented exit plan before adoption.

Scaling. Throughput is CPU-bound on the cipher, not on the contract layer, so this package is not a scaling bottleneck. The scaling questions that matter are key rotation at volume (re-encrypting a large data set on rotation), multi-region key distribution, and whether the contract permits decrypt-with-old-key during rotation. None of those are answered by this repository; they must be answered before the data volume makes them expensive.

Failure modes.

  • Contract drift: implementation diverges from published contracts across versions, producing runtime type errors at deploy.
  • Abandonment: the framework stalls, the interface is frozen on a deprecated primitive, and we face a forced rewrite under duress.
  • Key loss: no key management is provided; a lost key is unrecoverable ciphertext, and the package gives no guidance.
  • Silent algorithm change: a patch release alters defaults without a visible changelog in this repo.
  • Governance/namespace confusion: a zero-download package is a plausible typosquat target; enforce registry allowlisting.

Ramp-up. Negligible for a PHP developer to consume the interface — hours. The non-trivial learning is organizational: establishing a cipher policy, a key custody model, rotation runbooks, and a review process for cryptographic dependencies. That work is required regardless of which package supplies the contract, and it dwarfs the technical onboarding.

Assessment. Do not adopt as a standalone dependency. Accept it only as a transitive consequence of an explicit decision to standardize on Marko, pinned and reviewed. The underlying design instinct — contracts separated from implementation — is sound and worth copying in-house; the package's ecosystem maturity does not currently justify a dependency.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle