Weave Code
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 Secret Type Bundle Laravel Package

coka/doctrine-secret-type-bundle

View on GitHub
Deep Wiki
Context7

Getting Started With OkaDoctrineSecretTypeBundle

This bundle help the user input high quality data into your web services REST.

Prerequisites

The OkaDoctrineSecretTypeBundle has the following requirements:

  • PHP 8.0+
  • Symfony 5.4+

Installation

Installation is a quick (I promise!) 3 step process:

  1. Download OkaDoctrineSecretTypeBundle
  2. Register the Bundle
  3. Configure the Bundle
  4. Use bundle and enjoy!

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require coka/doctrine-secret-type-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Register the Bundle

Then, register the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project (Flex did it automatically):

return [
    //...
    Oka\Doctrine\SecretTypeBundle\OkaDoctrineSecretTypeBundle::class => ['all' => true],
]

Step 3: Configure the Bundle

Add the following configuration in the file config/packages/oka_doctrine_secret_type.yaml.

# config/packages/oka_doctrine_secret_type.yaml
doctrine:
    dbal:
        types:
            string_secret: 'Oka\Doctrine\SecretTypeBundle\Types\DBAL\StringSecretType'
            json_secret: 'Oka\Doctrine\SecretTypeBundle\Types\DBAL\JsonSecretType'
        mapping_types:
            string_secret: text
            json_secret: text

doctrine_mongodb:
    types:
        string_secret: 'Oka\Doctrine\SecretTypeBundle\Types\ODM\MongoDB\StringSecretType'
        hash_secret: 'Oka\Doctrine\SecretTypeBundle\Types\ODM\MongoDB\HashSecretType'

oka_doctrine_secret_type:
    private_key_file: '%env(resolve:COKA_SECRET_TYPE_PRIVATE_KEY_FILE)%'
    public_key_file: '%env(resolve:COKA_SECRET_TYPE_PUBLIC_KEY_FILE)%'
    passphrase: '%env(COKA_SECRET_TYPE_PASSPHRASE)%'

Step 4: Use the bundle is simple

Now that the bundle is installed.

<?php
// App\Entity\Foo.php

namespace App\Entity;

use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

/**
 * 
 */
#[ORM\Entity]
class Foo
{
    // ...
    
    /**
     * #[ORM\Column(type: 'string_secret')]
     *
     * [@var](https://github.com/var) string
     */
    protected $secret;
}
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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle