This guide is now available under this URL:
http://docs.behat.org/cookbook/bdd_in_symfony2_with_behat_mink_and_zombiejs.html
#!/bin/bash | |
# Expand globs to null when there are no matches | |
shopt -s nullglob | |
# Look for either a '<subdir>/console' or a 'symfony' file | |
until | |
file=(*/console symfony); [[ -f "$file" ]] && php "$file" "$@" && exit; | |
do | |
[[ "$PWD" == "/" ]] && break; |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
<?php | |
/* | |
* This file is part of the Assetic package. | |
* | |
* (c) Kris Wallsmith <kris.wallsmith@gmail.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
server { | |
set $website_host "mywonderfulwebsite.org"; | |
set $website_root "/var/www/mywonderfulwebsite/web"; | |
set $default_controller "index.php"; | |
set $symfony_root "/var/www/mywonderfulwebsite/lib/vendor/symfony"; | |
listen 80; | |
server_name $website_host; | |
# Gzip |
This guide is now available under this URL:
http://docs.behat.org/cookbook/bdd_in_symfony2_with_behat_mink_and_zombiejs.html
namespace :symfony do | |
namespace :assets do | |
desc "Updates assets version" | |
task :update_version do | |
run "sed -i 's/\\(assets_version: \\)\\(.*\\)$/\\1 #{real_revision}/g' #{latest_release}/app/config/config.yml" | |
end | |
end | |
end | |
before "symfony:assetic:dump" do |
<?php | |
/** | |
* I'd like to use IPC sockets (ipc://foo.ipc) but my virtual machine won't let me ... :) | |
* IPC sockets will be faster than TCP, so this script could run even faster than it does! | |
*/ | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Input\InputOption; |
<?php | |
namespace Acme\FooBundle\Command; | |
use Doctrine\Common\Persistence\ManagerRegistry; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
class FindInvalidReferencesCommand extends ContainerAwareCommand |
<?php | |
// Are your fastcgi processes spread out evenly over the available hyperthreads on your server? | |
// This script will tell you. | |
// | |
// If your php-cgi process is not /usr/local/bin/php-cgi, tweak accordingly. | |
// | |
// In my experience they do tend to distribute pretty well over time, but see also | |
// assignhyperthreads.php. | |
// |