tourze/wechat-work-security-bundle
A Symfony bundle that integrates WeChat Work (企业微信) security features into your PHP application, handling message encryption and decryption, signature verification, and callback validation so you can safely receive and respond to WeChat Work events without writing the cryptography yourself.
Package: tourze/wechat-work-security-bundle — v0.0.1 (initial tagged release)
Architecture fit
-bundle suffix is a strong signal this is a Symfony Bundle, not a Laravel package. Tourze publishes a large family of Symfony-oriented components. Laravel does not consume Symfony Bundles; it consumes Service Providers. Unless the crypto core is a framework-agnostic library with the bundle as a thin wrapper, this will not auto-wire in a Laravel app.token + timestamp + nonce + encrypt, and corpId/receiverId validation. This is a well-bounded, ~200-line problem domain, which is good for containment and bad for differentiation.Integration feasibility
composer.json requires no symfony/framework-bundle, or (b) we write our own ServiceProvider + config binding around the underlying cipher class. Budget a half-day spike just to answer this.Technical risk
openssl_decrypt failure returning false and being treated as a valid empty payload.Key questions (to answer before any adoption decision)
ServiceProvider exist, or is this Symfony-DI-only?symfony/* constraints?hash_equals)? Is there a timestamp tolerance / replay guard?corpId/receiverId, or leave that to the caller (a common source of cross-tenant spoofing)?Stack fit
Migration path
WeComCallbackCrypto interface (verify(string $signature, string $timestamp, string $nonce, string $encrypted): bool / decrypt(string $encrypted): string). This makes the swap to EasyWeChat or a first-party implementation a one-class change and neutralizes the abandonment risk.Compatibility
0.0.1 in composer.json (or 0.0.1 with a committed lock file). Do not use ^0.0.1; pre-1.0 caret semantics are permissive on patch and will surprise you.composer why-not / dependency resolution in a disposable branch before touching the main application's lock file.Sequencing
composer.json, confirm whether auto-wiring is possible.Maintenance
Support
Scaling
Failure modes
token/encodingAESKey/corpId, key length not 43 chars base64, IV derived incorrectly.false and being coerced to an empty string, producing valid-looking empty events.receiverId is unvalidated.composer update time, breaking unrelated builds.Ramp-up
receiverId semantics, and retry behavior. Expect 1–2 engineer-days for a mid-level developer with the official protocol docs open.How can I help you explore Laravel packages today?