Skip to content

Instantly share code, notes, and snippets.

View floriansemm's full-sized avatar

Florian Semm floriansemm

  • LeapHub GmbH
  • Hamburg
View GitHub Profile
@floriansemm
floriansemm / xdebug.ini
Created January 22, 2021 08:22
PHPStorm, Vagrant and Xdebug3 config
[xdebug]
zend_extension = xdebug.so
xdebug.max_nesting_level = 2000 ; for PHPUnit tests
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_port=9003
xdebug.remote_handler=dbgp
xdebug.client_host=10.0.2.2 ; IDE-Environments IP
@floriansemm
floriansemm / Xdebug.ini
Last active January 22, 2021 09:14
PHPStorm, Vagrant and Xdebug2 config
zend_extension=xdebug.so
xdebug.max_nesting_level = 2000 ; for PHPUnit tests
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_port = 9000
xdebug.remote_handler=dbgp
xdebug.remote_host=10.0.2.2 ; IDE-Environments IP
@floriansemm
floriansemm / index-fields-fixture.php
Created November 12, 2018 09:44
index fields fixture
/**
* @Route("/index-fields")
*/
public function indexFieldsPropertyAction()
{
$post = new Post();
$post->setTitle('post with fields');
$post->setText('text');
$tag1 = new Tag();
@floriansemm
floriansemm / gist:d7421fcbf0a43ab3611a
Last active August 29, 2015 14:07
array structure to post it to a Symfony controller and use formtype for mapping
Just a little reminder for me how my arrays should look like, to post them to a Symfony Rest-Endpoint and use $form->handleRequest($request); for mappings .
// plain PHP array structure
$post = array(
'form_type_name' => array(
'fieldname' => 'value'
));
// javascript
@floriansemm
floriansemm / gist:4fc30d347b7307029881
Last active August 29, 2015 14:06
named parameter
// usage in the paper
json_encode($jsonString, assocArray = true)
// use a variable to descibe the parameter
json_encode($jsonString, $assocArray = true)
@floriansemm
floriansemm / gist:89b2cd2e37f31a2df1d1
Last active August 29, 2015 14:01
Dynamic SoapUI Response from Xml-File
import groovy.xml.XmlUtil
import com.eviware.soapui.support.GroovyUtils
def groovyUtils = new GroovyUtils(context)
def xmlParser = new XmlParser()
def responseContent = xmlParser.parse(groovyUtils.projectPath + "/responses/100-response.xml")
// XmlParser gibt kein String zurueck
//context.content enthaelt das komplette XML das in der Response steht. Das heisst das nur ein Platzhalter definiert ist naemlich content.
context.content = XmlUtil.serialize(responseContent)
@floriansemm
floriansemm / gist:10019489
Created April 7, 2014 12:35
phantom.js timeout
Command execution time limit reached: `_sahi.setServerVarPlain('___lastValue___50ff0bcf186da', _sahi._getText(_sahi._byXPath("//html")))`
monolog:
handlers:
main:
type: gelf
publisher:
hostname: ip-of-your-graylogserver
level: debug
@floriansemm
floriansemm / bootstrap.php
Last active October 12, 2015 23:47
bootstrap.php
<?php
require_once __DIR__ . '/../vendor/autoload.php';
\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists');
\Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver::registerAnnotationClasses();
@floriansemm
floriansemm / travis.yml
Last active October 12, 2015 23:48
travis.yml minimal config
language: php
php:
- 5.3
before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install