Skip to content

Instantly share code, notes, and snippets.

View Majkl578's full-sized avatar
💥
breaking builds

Michael Moravec Majkl578

💥
breaking builds
View GitHub Profile
@Majkl578
Majkl578 / results
Last active August 29, 2015 14:07
Nette-dev + HHVM-dev status | All components master + Tester 1.3.0@RC + HHVM 3.4.0-dev@gd54eed7 (including merged fix for facebook/hhvm#2684).
application/ FAILED 2x (FileResponse.contentDisposition.phpt, Presenter.paramChecking.phpt)
caching/ FAILED 2x (FileStorage.call.phpt, FileStorage.wrap.phpt)
database/ FAILED 1x [mysql, sqlite] (ResultSet.normalizeRow.mysql.phpt[mysql])
finder/ PASSED
forms/ PASSED
latte/ PASSED
neon/ PASSED
reflection/ FAILED 5x (Extension.phpt, GlobalFunction.phpt, ClassType.phpt, Parameter.defaultValues.phpt, Parameter.php53.phpt)
routing/ FAILED 1x (Route.utf8Param.phpt)
security/ PASSED
@Majkl578
Majkl578 / test-all.sh
Last active August 29, 2015 14:07
Tests runner for all Nette Components
#!/bin/bash
set -e
# Tests runner for all Nette Components
# Author: Majkl578
if [ "$1" == "--help" ] || [ "$1" == "-h" ] ; then
echo "Usage: $0 [HHVM_BINARY=hhvm] [DIR=random]"
exit 1
fi
Directory: /tmp/tmp.nWfNtHaIV3
Using HipHop VM 3.4.0-dev (dbg), version:
HipHop VM 3.4.0-dev (dbg)
Compiler: heads/master-0-g29f63872cff9839512ead9823b135d3c929da2b1
Repo schema: 42b47346b9ffaec357e9ce4dc94469b6f9e6a47c
Extension API: 20140829
Downloading composer...
Composer version 1.0-dev (a309e1d89ded6919935a842faeaed8e888fbfe37) 2014-10-20 19:16:14
@Majkl578
Majkl578 / gist:eb69a620b00117bde91e
Created October 24, 2014 15:54
CURLFile fix for HHVM w/o 83a84147866fc73db7d2e0299f69c94738150436
<?php
class FixedCurlFile extends CurlFile
{
public function __construct($filename, $mimetype = '', $postname = '')
{
parent::__construct($filename, $mimetype, $postname ?: $filename;
}
}
@Majkl578
Majkl578 / composer.json
Last active August 29, 2015 14:08
Nette sessions + custom save path and automatic GC, IT WORKS
{
"require": {
"nette/http": "2.2.*"
}
}
Directory: /tmp/tmp.SMAKC5sSqN
Using PHP 7.0.0alpha2 (cli) (built: Jun 27 2015 22:30:17) (DEBUG)
Copyright (c) 1997-2015 The PHP Group, version:
PHP 7.0.0alpha2 (cli) (built: Jun 27 2015 22:30:17) (DEBUG)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
Downloading composer...
Composer version 1.0-dev (943107cfe717a74aa791f57b87fa514c88582b0d) 2015-06-26 13:40:26
Starting program: /usr/bin/php -n www/index.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x0000000000c152b9 in zend_hash_index_find_bucket (ht=0x7fffea6fac00, h=0) at Zend/zend_hash.c:464
464 idx = HT_HASH_EX(arData, nIndex);
bt:
@Majkl578
Majkl578 / DoctrineLogger.php
Created May 9, 2010 13:11
Simple Doctrine 2 SQL Logger
<?php
namespace App;
use Nette\Web\Html;
class DoctrineLogger implements \Doctrine\DBAL\Logging\SQLLogger, \Nette\IDebugPanel
{
private $events = array();
/******** Doctrine\DBAL\Logging\SQLLogger *********/
<?php
namespace App\Controls;
class Foo extends \App\Basis\Control
{
}
<?php
use Nette\Application\AppForm;
class TestPresenter extends Nette\Application\Presenter
{
public function renderDefault()
{
$this['test']->render();