I hereby claim:
- I am ciaranmcnulty on github.
- I am ciaranmcnulty (https://keybase.io/ciaranmcnulty) on keybase.
- I have a public key whose fingerprint is 72E8 8A58 A8B5 0C9C 3778 3FE1 1BFD AD86 0DC6 FB3B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
$extensions = file_get_contents('https://raw.githubusercontent.com/phpspec/phpspec/master/docs/cookbook/extensions.rst'); | |
$tmp = tempnam(sys_get_temp_dir(), 'extension-checker'); | |
unlink($tmp); mkdir($tmp); chdir($tmp); | |
if (preg_match_all('/[<](?<url>http.*)[>]/', $extensions, $matches)) { | |
foreach ($matches['url'] as $url) { | |
passthru('git clone ' . escapeshellarg($url)); |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.provider :virtualbox do |vb| | |
vb.name = "HHVM" | |
vb.customize ["modifyvm", :id, "--memory", "2048"] | |
vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"] |
<?php | |
class NamedSpec extends ObjectBehavior | |
{ | |
function it_exposes_the_name_it_is_constructed_with() | |
{ | |
$this->beConstructedNamed('Foo'); | |
$this->getName()->shouldReturn('Foo'); | |
} |
<?php | |
namespace spec\League\Event; | |
use Interop\Container\ContainerInterface; | |
use Interop\Container\Exception\ContainerException; | |
use League\Event\EventInterface; | |
use League\Event\ListenerInterface; | |
use PhpSpec\ObjectBehavior; | |
use Prophecy\Argument; |
default: | |
suites: | |
foo: | |
paths: [ %paths.base%/app/modules/fooModule/features ] | |
contexts: [ Some\Autoloadable\Foo\FeatureContext ] | |
bar: | |
paths: [ %paths.base%/app/modules/barModule/features ] | |
contexts: [ Some\Autoloadable\Bar\FeatureContext ] |
<?php | |
class DoctrineUserRepositoryTest extends UserRepositoryTest | |
{ | |
public function setUp() | |
{ | |
// do something to bootstrap doctrine and set up DB fixtures | |
$this->userRepository = new DoctrineRepository(/* lots of dependencies */); | |
} | |
FROM php:7.2.10-fpm-alpine3.8 AS base | |
# Stuff needed in all layers | |
RUN apk add --no-cache gettext fcgi icu-dev | |
RUN docker-php-ext-install bcmath | |
FROM base AS dependencies | |
COPY --from=composer:1.7 /usr/bin/composer /usr/bin/composer | |
COPY composer.json /app/composer.json |
#! /usr/bin/env php | |
<?php | |
$usage = <<<USAGE | |
Usage: | |
./cot-statement-fixer starting-balance filename.csv | |
USAGE; | |
if (count($argv)!==3){ |
On M1 machines, Docker for Mac is running a lightweight linux ARM VM, then running containers within that, so containers are essentially running natively. Don't be fooled by the fact the UI or binary CLI tools (e.g. docker
) might require Rosetta.
Within that VM is an emulation layer called QEmu. This can be used by docker to run Intel containers. This does not use Rosetta at all, and has a roughly 5-6X performance penalty. (If you just upgraded your CPU this may result in a similar performance to your old machine!)
Many images in public registries are multi-architecture. For instance at the time of writing on Docker Hub the php:8.0-cli
image has the following digests: