This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function new_redis($server, $prefix = '', $password = '') { | |
$redis = new Redis(); | |
// Check if it isn't a Unix socket to set default port. | |
$port = ($server[0] === '/') ? null : 6379; | |
// NOTE: This is the change we added | |
// You can supply eg tls://my.redis.host:6380/ for it to work | |
// Check for any protocol requirements eg TLS that have been specified. | |
if (strpos($server, ':')) { | |
$serverconf = parse_url($server); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
excludesfile = /Users/<your user>/.gitignore_global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
platform :ios do | |
lane :qa do | |
increment_build_number | |
# Produce the build here | |
commit_version_bump | |
add_git_tag | |
push_to_git_remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\DemoBundle\Security\Encoder; | |
use Symfony\Component\Security\Core\Encoder\BasePasswordEncoder; | |
class MySQLPasswordEncoder extends BasePasswordEncoder | |
{ | |
/** | |
* {@inheritdoc} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DefaultController extends Controller | |
{ | |
/** | |
* Dashboard page. | |
* @Permissions(perm="dashboard_view") | |
* @Route("/", name="ITEDashboardBundle_index") | |
* @Template() | |
* @return array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gets all field errors | |
* | |
* @param $form | |
* @return array | |
*/ | |
protected function getAllErrors($form) | |
{ | |
$errors = array(); | |
foreach ($form->getErrors() as $key => $error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
my.twig.helperextension: | |
class: My\OwnBundle\Twig\Extension\MyHelperExtension | |
tags: | |
- { name: twig.extension, alias: myhelperextension } | |
my.notificationsextension: | |
class: My\OwnBundle\Twig\Extension\NotificationsExtension | |
arguments: | |
container: "@service_container" | |
context: "@security.context" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
security: | |
providers: | |
my_facebook_provider: | |
id: my.facebook.user | |
my_normaluser_provider: | |
id: my.normal.user | |
firewalls: | |
public: | |
pattern: ^/.* | |
anonymous: ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assume all generic use statements up here for Controller, RedirectResponse etc | |
class AccessController extends Controller | |
{ | |
/** | |
* Called when a user attempts to sign in with facebook | |
* | |
* @Route("/signin/facebook", name="signin_facebook") | |
* @return \Symfony\Bundle\FrameworkBundle\Controller\Response | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$steps->Given('/^I am logged into the admin area as rich_81$/', function($world) { | |
$session = $world->getSession(); | |
$doc = $session->getPage(); | |
// Ensure we're logged out for cases where the session isn't | |
// reset between Behat steps | |
$session->visit($world->locatePath("/admin/logout")); | |
$session->visit($world->locatePath("/admin")); |
NewerOlder