Skip to content

Instantly share code, notes, and snippets.

View jwbrady's full-sized avatar

Jason Brady jwbrady

  • San Bernardino Community College District
  • San Bernardino, CA
View GitHub Profile
@jwbrady
jwbrady / file.php
Last active October 7, 2021 21:20
Using a custom Certificate Authority with Symphony mailer
<?php
use Symfony\Component\Mailer\Transport;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mailer\Transport\Smtp\SmtpTransport;
$transport = Transport::fromDsn("smtp://user:pass@smtp.example.com:25");
// From https://www.lambda-out-loud.com/posts/accessing-private-properties-php/
// Until Symphony supports the dsn option, this is the only way, other than
// disabling certificate verification
@jwbrady
jwbrady / Section.php
Last active September 1, 2020 00:43
Demonstration of Error: PHP 7.4, Type Hinted Properties, and Composite Primary key with only Two Foreign Keys gives a type error
<?php
declare(strict_types=1);
namespace SloCloud\Model\Storage\Institution;
class Section
{
private string $Id;