Skip to content

Instantly share code, notes, and snippets.

View bramstroker's full-sized avatar

Bram Gerritsen bramstroker

View GitHub Profile
object(distribProposals2Type)#315 (1) {
["distribProposal"]=>
object(distribProposal2Type)#312 (14) {
["etab_id"]=>
string(4) "5038"
["etab_name"]=>
string(15) "EDEN (30) *****"
["room_type_code"]=>
string(4) "MP46"
["room_type_label"]=>
@bramstroker
bramstroker / euler1
Last active August 29, 2015 13:57
euler
$x = 0;
for ($i=1; $i<1000; $i++) {
if ($i % 3 == 0 || $i % 5 == 0) {
$x += $i;
}
}
var_dump($x);
'router' => array(
'routes' => array(
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Index',
'action' => 'index',
return array(
'controllers' => array(
'invokables' => array(
'Application\Controller\User' => 'Application\Controller\UserController'
)
)
);
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
array (size=4)
'invokableClasses' =>
array (size=4)
0 => string 'sharedeventmanager' (length=18)
1 => string 'dispatchlistener' (length=16)
2 => string 'routelistener' (length=13)
3 => string 'sendresponselistener' (length=20)
'factories' =>
array (size=42)
0 => string 'eventmanager' (length=12)
/**
* @return AbstractOptions
*/
public function getOptions()
{
return $this->options;
}
/**
* @param array $options
[09:43] <bramstroker> Hi, does composer provide some option to use 'prefer-source' for a particular package and 'prefer-dist' for all other packages?
[09:45] <bramstroker> My question arrises because I want to subclass Zend Framework 2 classes in my own testsuite, but the tests directory is ignored for export (ignore-export in .gitattributes).
[09:46] <bramstroker> prefer-source for all packages is not really an option because I don't need all the VCS overhead on my build server and composer install will take like 15 minutes.
[09:55] <ocramius> bramstroker: you shouldn't import classes from the zf2 test suite, they're not reusable code
[09:58] <bramstroker> @ocramius, I've created my own cache storage adapter and ZF2 provides a CommonAdapterTest, so it seems common sense to me to extend from it instead of duplicating the code into my own library.
[09:59] <ocramius> bramstroker: yes, but the test suite is not stable
[10:01] <bramstroker> ocramius: ok. that's a good argument.
[10:01] <bramstroker> So only opti
Cookie: __gads=ID%3D41ab1faa088b6af9%3AT%3D1372863629%3AS%3DALNI_MbqutE_47luKYkng9NDbMuIY5xL0A; XDEBUG_SESSION=PHPSTORM
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: null
Accept-Encoding: gzip, deflate
Content-Type: application/json; charset=UTF-8
Content-Length: 21
Connection: keep-alive
Status Code: 500 Internal Server Error
Cache-Control: max-age=3600, must-revalidate, public
Connection: close
Content-Type: text/html
Host: localhost
X-Powered-By: A lot of coffee, blood, sweat and tears