Skip to content

Instantly share code, notes, and snippets.

View sstok's full-sized avatar
🎯
Focusing

Sebastiaan Stok sstok

🎯
Focusing
View GitHub Profile
@sstok
sstok / deploy.php
Created May 15, 2020 08:45
A sensible DeployerPHP config for Sf4 + Webpack / Webpack Encore
<?php
// See this article : https://foobarflies.io/a-sensible-deployerphp-config-for-sf4
namespace Deployer;
require 'recipe/symfony4.php';
set('ssh_type', 'native');
set('ssh_multiplexing', true);
@sstok
sstok / Login.php
Created July 31, 2020 13:33 — forked from kunicmarko20/Login.php
Symfony OAuth with Leage OAuth2 library
<?php
declare(strict_types=1);
namespace App;
use Symfony\Component\HttpFoundation\Response;
use Twig\Environment;
use League\OAuth2\Client\Provider\Google as GoogleProvider;
@sstok
sstok / example_form.html.twig
Created May 2, 2021 13:57 — forked from bjo3rnf/example_form.html.twig
Stimulus.js controller for Symfony collection form type with configurable item limit
{% macro collection_item(form) %}
<div data-form-collection-target="field">
{{ form_widget(form) }}
<button data-action="form-collection#removeItem">
remove
</button>
</div>
{% endmacro %}
{% import _self as formMacros %}
@sstok
sstok / readme.md
Created July 24, 2021 17:10
Model Encryption (POC ONLY)

Model Encryption

Model encryption is used for highly sensitive (or high risk) information, including bank-account numbers, or personal contact information.

Note:

Any information that legally falls under the General Data Protection Regulation (GDPR) must be stored encrypted according to legal requirements.

@sstok
sstok / EnhancedCollectionType.php
Created September 4, 2024 18:53 — forked from ker0x/EnhancedCollectionType.php
Enhanced Symfony Form CollectionType with Stimulus
<?php
declare(strict_types=1);
namespace App\Form;
use App\Form\Util\StringUtil;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\FormInterface;