vkn999/eloquentencryption
vkn999/eloquentencryption provides transparent attribute encryption for Laravel Eloquent models, helping protect sensitive database fields at rest while keeping familiar model reads and writes. Configure encrypted attributes and store ciphertext without disrupting application logic.
composer update. v4.0 requires PHP 8.0+ and Laravel 9. If you are still on Laravel 8 or PHP 7.4, stay on v3.x — v4.0 is a hard floor, not a soft recommendation.composer require <vendor>/<package> "^4.0" and then publish any shipped config:
php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider"
phpseclib/phpseclib (crypto / SSH / SFTP primitives), the config is where credential shape (key vs. password, key format, passphrase) is decided — that is the file you will spend the most time in.SshService / CryptoService that depends on the package object and bind it as a singleton. Every controller, command, and job then depends on your class, so a future phpseclib 3.x migration only touches one file.disconnect() in a finally block — long-lived workers leak sockets otherwise.handle(), and use $this->timeout / retryUntil() generously.env('SSH_KEY_PATH') and store the key outside the repo; on Laravel 9 use the config() cache-safe pattern (php artisan config:cache will bake in env values, so keep secrets read at runtime if they rotate).phpseclib's PublicKeyLoader at runtime rather than committing .pem files. Support both PKCS#1 and PKCS#8/OpenSSH formats — this is the most common "works locally, fails in prod" cause.phpseclib's in-memory RSA keys for crypto paths.Storage for local files, keep the same mental model — read a local stream, push it through the package, land it remotely. Don't buffer whole files in memory.composer.lock files, and any downstream package that still constrains this one. Audit transitive constraints before upgrading.phpseclib 2.0.37 is the end of the 2.0 line. It is receiving security fixes only; upstream is on 3.x. Treat v4.0 as a stopgap: the 2.x → 3.x API change (namespaces, PublicKeyLoader, SFTP → SFTP\SFTP) is the real migration you should be planning for. Keep it isolated behind your wrapper now.setTimeout() values and enable keepalive for long transfers or you will get silent stalls on idle NAT/firewalls.SFTP::get()/put() with stream resources or nlist/rawlist pagination — reading a 2 GB file into a string will OOM before it finishes.phpseclib\Net\SSH2 logger (PSR-3) behind a debug config flag, and remember Laravel's Log facade satisfies the interface.2.0.37 can silently alter cipher negotiation or key-parsing edge cases. Run your SSH/crypto integration tests explicitly after upgrading, not just the unit suite.How can I help you explore Laravel packages today?