Skip to content
Feralin

Developers

Symfony: quickstart

Install and first-use steps for sending events to Feralin with Symfony. Code samples come from the SDK's own README and statuses from the capability record.

Install

feralin/feralin-symfony 0.1.0 is published on Packagist; install it with your package manager using the command below.

# Symfony uygulamanızın dizininde (DEPO: deponun yolu)
composer config repositories.feralin-php '{"type": "path", "url": "DEPO/sdks/php", "options": {"symlink": false}}'
composer config repositories.feralin-symfony '{"type": "path", "url": "DEPO/sdks/php-symfony", "options": {"symlink": false}}'
composer require feralin/feralin-php:0.1.0 feralin/feralin-symfony:0.1.0
cd sdks/php-symfony
composer install
composer test

First use

# config/packages/feralin.yaml
feralin:
    project_key: '%env(FERALIN_PROJECT_KEY)%' # yalnız pk_ anahtarı
    collect_url: '%env(FERALIN_COLLECT_URL)%'
    consent_resolver: App\Feralin\Izin
use Feralin\Consent;
use Feralin\Symfony\ConsentResolverInterface;
use Feralin\Symfony\RequestFeralin;
use Symfony\Component\HttpFoundation\Request;

final class Izin implements ConsentResolverInterface
{
    public function resolve(Request $request): ?Consent
    {
        return new Consent($request->cookies->get('izin') === 'evet');
    }
}

public function siparis(RequestFeralin $feralin): Response
{
    $feralin->track('order_completed', ['order_id' => 'ord_1']);
    return new Response(status: 201);
}

Code samples are taken as they are from sdks/php-symfony/README.md; comments inside may be in Turkish. You create the project key in the dashboard.

Capabilities

Symfony capability status
CapabilityStatus
Event sendingSupported
Batch sendingPartial
Consent handlingSupported
IdentityPartial
AttributionNot applicable
Deep linksNot applicable
RevenuePartial
Error capturePartial
Session replayNot applicable
TracingPlanned

Verification chain

Symfony verification chain
LinkStatus
SourcePassed
BuildPassed
TestPassed
Registry publicationPassed
Clean installPassed
Event receiptPassed
DocumentationPassed
Super Admin proofNot started

Passed means local evidence: source, build and tests ran. Registry publication and Super Admin proof are separate links; the SDK is not called ready until each has passed.