Skip to content

Releases: woduda/civicrm-laravel

v0.8.0

15 Jun 07:30

Choose a tag to compare

Changed

  • Bumped woduda/civicrm-php requirement from ^0.7 to ^1.0
  • Replaced deprecated ApiException alias with ApiErrorException in all catch blocks and @throws PHPDoc (SyncContactJob, CreateActivityJob, TestConnectionCommand)
  • CiviCrmServiceProvider now wires ExponentialBackoff retry and PSR-3 logging into Transport::createDefault() when civicrm.retry.enabled is true; previously this was a TODO comment guarded against the missing class in ^0.7
  • ProcessOutboxCommand::isPermanentFailure() now imports and checks AuthenticationException directly instead of via a class_exists() forward-compat guard; AuthenticationException causes immediate permanent failure of an outbox entry
  • TestTransport gains willThrow(Throwable) to support testing transport-level exceptions in job/command tests

v0.7.0

13 Jun 19:48

Choose a tag to compare

Fixed

  • OptionValue.create now passes value: name (defaulting to the option's name when
    not set explicitly), preventing CiviCRM from auto-assigning sequential integers (1, 2, 3…)
    as stored values — which would force the :name suffix on every APIv4 custom-field write
  • OptionValueDef accepts an optional value field; it can be set explicitly in both the
    optionGroups.values and optionValues YAML sections

v0.6.2

13 Jun 19:46

Choose a tag to compare

Fixed

  • OptionValue.create now passes value: name (defaulting to the option's name when
    not set explicitly), preventing CiviCRM from auto-assigning sequential integers (1, 2, 3…)
    as stored values — which would force the :name suffix on every APIv4 custom-field write
  • OptionValueDef accepts an optional value field; it can be set explicitly in both the
    optionGroups.values and optionValues YAML sections

v0.6.1

10 Jun 10:19

Choose a tag to compare

Fixed

  • optionGroups YAML format now requires a title field and uses a values key for the option value list (groupName → {title, values?}) — CiviCRM's OptionGroup.create API requires title; passing only name caused a server-side validation error
  • SchemaApplier now passes title to OptionGroup.create
  • SchemaDefinition parser throws ValidationException with a clear message when title is absent from an optionGroups entry

Full changelog: https://github.com/woduda/civicrm-laravel/blob/main/CHANGELOG.md

v0.6.0

10 Jun 09:11

Choose a tag to compare

Added

  • OptionGroupDef DTO — declares a CiviCRM option group together with the values it should contain; parsed from the optionGroups mapping section in YAML
  • optionGroups section in SchemaDefinition and SchemaApplier — nested dict syntax (groupName → list<{name, label?}>); the option group itself is created via OptionGroup.create if it does not exist, then each value is ensured via the existing OptionValue get-or-create path; dry-run and idempotency are fully supported
  • resources/schema/example.yaml updated with an optionGroups example

Fixed

  • optionGroups section in YAML was silently ignored by SchemaDefinition::fromArray()

v0.5.0

10 Jun 07:49

Choose a tag to compare

See CHANGELOG.md for details.

v0.4.0

09 Jun 19:04

Choose a tag to compare

Added

  • ContactTypeDef DTO — declares a CiviCRM contact sub-type with required name and parentName (base type: Individual, Organization, or Household) and optional label.
  • contactTypes[] schema sectionSchemaDefinition and SchemaApplier now support idempotent get-or-create of ContactType entities via civicrm:apply-schema.
  • ContactInput::$contactSubType — optional field passed as contact_sub_type in toCiviValues(); supported by fromArray() / toArray() round-trip and SyncContactJob.

v0.3.0

09 Jun 06:29

Choose a tag to compare

What's new

  • civicrm:apply-schema {file?} {--dry-run} — declarative YAML schema applier; idempotent get-or-create for custom groups/fields, tags, activity types, relationship types, and groups; dry-run mode shows what would be created without writing anything
  • SchemaDefinition DTO with sub-DTOs (CustomGroupDef, CustomFieldDef, RelationshipTypeDef, OptionValueDef) — validates the YAML shape and throws ValidationException with human-readable context on bad input
  • SchemaApplier service + SchemaApplyReport — separates created / existing / wouldCreate entries; toTable() ready for Artisan's table helper
  • resources/schema/example.yaml — annotated reference schema (Volunteer Data group, relationship types, tags, activity type, group)
  • civicrm.schema_path config key (CIVICRM_SCHEMA_PATH env) — default file path when the {file} argument is omitted

See CHANGELOG.md for full details.

v0.2.0 — Transactional Outbox

08 Jun 19:55

Choose a tag to compare

What's new

Transactional Outbox

Write CiviCRM side-effects into the same DB transaction as your domain model — no distributed transaction required.

Usage:

use CiviCrm\Laravel\Outbox\OutboxRepository;
use Illuminate\Support\Facades\DB;

DB::transaction(function () use ($outbox, $contactInput): void {
    $domain->save();
    $outbox->pushSyncContact($contactInput);
});

Add to your scheduler:

$schedule->command('civicrm:outbox:work')->everyMinute();

Publish the migration:

php artisan vendor:publish --tag=civicrm-laravel-migrations
php artisan migrate

Enable in config/civicrm.php or .env:

CIVICRM_OUTBOX=true

Added

  • OutboxEntry Eloquent model (status, attempts, dedupe_key, available_at, last_error columns)
  • OutboxRepositorypush() / pushSyncContact() / pushCreateActivity() / reserveBatch() / markDone() / markFailed()
  • civicrm:outbox:work artisan command — synchronous drain with --limit and --max-attempts; exponential backoff capped at 3600 s; ValidationException causes immediate permanent failure
  • create_civicrm_outbox_table migration stub (publishable)
  • ContactInput::toArray() for lossless round-trip serialisation

See CHANGELOG.md for details.

v0.1.0

08 Jun 14:15

Choose a tag to compare

What's included

First release. Delivers the foundational service layer for the civicrm-laravel adapter:

  • config/civicrm.php — publishable config (tag civicrm-config) with keys for connection, retry, queue, webhook, and outbox settings
  • Service provider — binds Woduda\CiviCRM\Config and CiviCrmClient as singletons; auto-wires a pre-bound Psr\Http\Client\ClientInterface from the host app or tests
  • CiviCrm facade — IDE-friendly @method tags for all entity accessors (contacts, activities, contributions, etc.) and raw()
  • civicrm:test-connection — artisan command that pings CiviCRM with a cheap Contact.get request and prints the latency; exits non-zero on HTTP or transport errors
  • ConfigurationException — package-local exception (implements CivicrmException) thrown when CIVICRM_BASE_URL or CIVICRM_API_TOKEN are missing

Requires woduda/civicrm-php ^0.7, PHP ≥ 8.3, Laravel 11 / 12 / 13.