Skip to content

Instantly share code, notes, and snippets.

View osteel's full-sized avatar
🙂

Yannick Chenot osteel

🙂
View GitHub Profile
@osteel
osteel / ci.yml
Created July 2, 2022 13:03
PHP compatibility demo – workflow v2
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
@osteel
osteel / ci.yml
Created July 2, 2022 13:00
PHP compatibility demo – workflow v1
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
@osteel
osteel / CurrencyHelperTest.php
Created July 2, 2022 12:58
PHP compatibility demo – library tests v1
<?php
namespace Osteel\PhpCompatibilityDemo\Tests;
use Money\Money;
use Osteel\PhpCompatibilityDemo\CurrencyHelper;
use PHPUnit\Framework\TestCase;
class CurrencyHelperTest extends TestCase
{
@osteel
osteel / CurrencyHelper.php
Created July 2, 2022 12:50
PHP compatibility demo – library v1
<?php
namespace Osteel\PhpCompatibilityDemo;
use Money\Currencies\ISOCurrencies;
use Money\Money;
class CurrencyHelper
{
public function isSame(Money ...$amounts): bool
@osteel
osteel / ci.yml
Created July 2, 2022 12:48
PHP compatibility demo – complete workflow
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
@osteel
osteel / homebrew-m1.md
Last active May 5, 2022 19:20
Migrate Homebrew for M1 chips

Run using old install:

$ brew bundle dump

Reinstall Homebrew for the M1:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

PHP CLI Demo

PHP command-line tool demonstration

Preview

Build Status Latest Stable Version License

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
<?php
namespace Osteel\PhpCliDemo\Tests\Commands;
use Osteel\PhpCliDemo\Commands\Play;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
class PlayTest extends TestCase
{
@osteel
osteel / demo
Created February 6, 2022 13:02
#!/usr/bin/env php
<?php
$root = dirname(__DIR__);
if (! is_file(sprintf('%s/vendor/autoload.php', $root))) {
$root = dirname(__DIR__, 4);
}
require sprintf('%s/vendor/autoload.php', $root);