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

Doctrine Parse Bundle Laravel Package

redking/doctrine-parse-bundle

RedKing Doctrine Parse Bundle integrates Parse with Symfony and Doctrine, offering entity-style mapping and a Doctrine-like API for managing Parse objects, queries, and relationships directly from PHP applications.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with composer require redking/doctrine-parse-bundle. Because this is a Symfony bundle (not a Laravel package), Laravel users will typically only want the underlying Parse client/service classes — you'll wire them manually in a service provider rather than relying on bundle auto-discovery.
  • Look first at README.md, then src/ for the bundle class (*Bundle.php), DependencyInjection/Configuration.php (every config key is defined there), and Resources/config/services.yaml (what's actually injectable). With only 2 stars, the README is likely thin — the source is the real documentation.
  • Register the bundle in config/bundles.php, then add a config file under config/packages/. Expect keys for Parse server URL, application ID, REST API key, and possibly a master key; all should come from env vars, never hard-coded.
  • New in v2.23.0: the bundle now ships encryption support (encrypted fields + secure routing). Before your first write, read the new encryption PR / config keys in DependencyInjection/Configuration.php — you must decide up front whether fields are stored plaintext or encrypted, since migrating existing classes later is painful.
  • Minimal first use case: fetch or persist a single Parse object through the injected manager/service instead of hand-rolling Guzzle calls, then verify the request in your Parse Server dashboard or logs. If you enable encrypted fields, confirm the round-trip (write → read back → decrypt) works against your local parse-server before touching production data.

Implementation Patterns

  • Service injection over static calls. Let the container give you the bundle's manager/registry service, then type-hint it in constructors. This keeps it mockable and avoids coupling business logic to Parse wire formats.
  • Repository-ish wrappers. Wrap the bundle service in your own thin classes (e.g. UserRepository, OrderRepository) so your domain code isn't littered with Parse query builders. When the bundle API changes (likely, given the low release cadence), you patch one wrapper. This matters even more now that encryption settings are part of the configuration surface.
  • Encrypted fields (v2.23.0+). Annotate/configure sensitive fields as encrypted and let the bundle handle encrypt/decrypt at the persistence boundary. Keep the crypto key material in your env/secret manager, not in config/packages/*.yaml committed to git, and decide whether your own DTO mapping layer needs to see ciphertext or plaintext — in most designs the encryption should be transparent and your repositories should only ever handle plaintext.
  • Secure routing (v2.23.0+). If your Parse Server is exposed beyond a private network, use the new secure-routing option rather than bolting TLS/allowlisting on yourself — but verify it actually enforces what you expect (test with a request from an untrusted origin). Treat it as defense-in-depth, not a replacement for network ACLs.
  • Mapping boundary. Treat Parse objects as DTOs and map them into your own entities/models. Don't leak Parse Object structures into controllers or Blade views. With encrypted fields this separation keeps your controllers from accidentally serializing ciphertext.
  • Integration with existing Doctrine. Check carefully whether the bundle registers a DBAL driver/connection for Parse or is a separate persistence layer. If it's the latter, keep Parse and your relational Doctrine entities explicitly separated — do not assume identity map or transactions span both. Encrypted fields only apply to the Parse side.
  • Console commands for sync work. Use Symfony commands (or Laravel artisan commands calling the client) for backfills and batch syncs rather than inside HTTP requests; Parse is remote and network latencies add up. If you enable encryption on existing classes, write a one-off backfill command that re-saves each object so the new encrypted fields are populated.
  • Testing. Run a local parse-server (Docker) or mock the HTTP client in unit tests. Never point test suites at a shared Parse app — teardown is unreliable. Encryption makes this stricter: unit tests should assert both the encrypted-at-rest shape and the decrypted read path.

Gotchas and Tips

  • Low adoption risk. With 2 stars and 0 dependents, expect undocumented behavior and possible breakage between releases. Pin the version in composer.json and read the diff before upgrading. The v2.23.0 encryption feature is brand new — treat it as "one release old" and pin 2.23.x rather than tracking ^2.
  • Encryption is a breaking data change, not a config toggle. Enabling encrypted fields on an existing class means objects written before the change are stored plainly. You need a migration/backfill plan, and you cannot simply flip it back off without data loss or a decryption pass. Do not enable it in the same release as a schema change.
  • Key management is on you. The new encryption feature moves responsibility for key storage, rotation, and loss-recovery into your app. Losing the key means losing the data; leaking the key plus the REST/master key means leaking everything. Use a secret manager, back up keys, and document the rotation story before shipping.
  • Symfony-vs-Laravel mismatch. In Laravel, auto-registration doesn't happen. If the bundle's DI wiring is Symfony-specific, prefer using the underlying client class directly and constructing it yourself with config('services.parse.*') values — this also means the new encryption options may not be reachable from a Laravel setup unless the underlying client exposes them directly.
  • Secret handling. The REST API key (and especially master key) must stay server-side. If the bundle's exception messages dump request headers, mask them in logs. This is now doubly true with encryption keys in the same process.
  • Trailing-slash and HTTPS config. Parse Server URLs are finicky — most "connection refused"/404 issues come from a missing or extra trailing slash or http vs https. Validate the configured URL at boot — and pair HTTPS expectations with the new secure-routing setting so you're not relying on one and assuming the other.
  • Parse quirks that surface through any client. Default query limit is 100, batch operations cap at 50 per request, class schemas may need to exist before writes, and ObjectId strings are not interchangeable with your local IDs. Encrypted fields still respect these limits — a backfill for encryption is a batch operation subject to the 50-per-request cap.
  • Debugging. Enable HTTP client logging or inject a Guzzle middleware to dump request/response; errors from Parse usually return {code, error} JSON that the bundle may or may not surface clearly. Check the bundle's exception classes in src/Exception/. When debugging encryption, log the field names being encrypted/decrypted — never the values or keys.
  • Extension points. Look for interfaces/events (e.g. pre/post persist listeners) in src/ before forking — the cleanest customization is usually decorating the bundle's service in your own services.yaml rather than editing vendor code. For encryption, prefer decorating over subclassing so a v2.24 fix to the crypto path lands cleanly.
  • Upgrade note for v2.23.0. Run the full test suite plus an encryption round-trip against a local parse-server before deploying. Because this is the first release with the feature, be prepared to file issues rather than work around obscure failures — and keep the previous pinned version (2.22.1) in a branch you can roll back to.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource