Reflections on PHP-DI configuration.
Currently, the configuration is in PHP or annotations, PHP config has the following advantages:
- PHP developpers know PHP
- IDE autocompletion/error detection
- Bean definition using closures
Disadvantages of PHP:
; PHP developer shortcuts for BÉPO keyboard layouts | |
; Need AutoHotkey_L to support unicode encoding (http://www.autohotkey.com/download/) | |
; "->" for PHP (when typing <Alt>+8) | |
!-:: | |
Send -> | |
return | |
Reflections on PHP-DI configuration.
Currently, the configuration is in PHP or annotations, PHP config has the following advantages:
Disadvantages of PHP:
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import requests | |
import time | |
import sys | |
ua = 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1' | |
referer = 'http://www.lequipe.fr/Tennis/Directs' |
vendor | |
composer.lock |
<?php | |
# Add the following to /etc/phpmyadmin/conf.d/export.inc.php | |
$cfg['Export']['sql_drop_database'] = true; | |
$cfg['Export']['sql_drop_table'] = true; | |
$cfg['Export']['compression'] = 'zip'; | |
$cfg['Export']['sql_disable_fk'] = true; | |
$cfg['Export']['sql_use_transaction'] = true; |
import { v4 as uuidv4 } from 'uuid'; | |
import { SQSRecord } from 'aws-lambda'; | |
const now = Math.round((new Date()).getTime() / 1000).toString(); | |
export default (params?: Partial<SQSRecord>): SQSRecord => ({ | |
messageId: uuidv4(), | |
receiptHandle: uuidv4(), | |
body: '', |
##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html | |
MyEntity: | |
type: entity | |
repositoryClass: MyRepositoryClass | |
table: my_entity | |
namedQueries: | |
all: "SELECT u FROM __CLASS__ u" | |
# Class-Table-Inheritance |
# Given | |
Given I am on [the] homepage | |
Given I am on "url" | |
# When | |
When I go to [the] homepage | |
When I go to "url" | |
When I reload the page |