Skip to content

Instantly share code, notes, and snippets.

View jonsa's full-sized avatar

Jonas Sandström jonsa

View GitHub Profile
@jonsa
jonsa / *.global.php
Created September 28, 2018 09:40
Alternative Zend Expressive Session Authentication Workflow
<?php
// in a config/autoload/*.global.php file:
declare(strict_types=1);
use App\Authentication\LoginAdapter;
use Zend\Expressive\Authentication\AuthenticationInterface;
use Zend\Expressive\Authentication\UserRepositoryInterface;
use Zend\Expressive\Authentication\UserRepository\PdoDatabase;
@jonsa
jonsa / php.ini
Created August 30, 2017 20:13
Xdebug ini doc WIP
[Xdebug]
;zend_extension=
; When this setting is set to on, the tracing of function calls will be enabled
; just before the script is run. This makes it possible to trace code in the
; auto_prepend_file.
;
; Type: boolean
; Default value: 0
;xdebug.auto_trace=
@jonsa
jonsa / phpx.cmd
Created April 7, 2016 20:33
PHP with custom XDebug ini file
@ECHO OFF
SETLOCAL
IF [%TERMINATE_BATCH_SCRIPT%] == [YES] (
%~dp0php.exe -c %~dp0php.ini-xdebug %*
) ELSE (
SET TERMINATE_BATCH_SCRIPT=YES
CALL %0 %* <NUL
)