# (30 segundos) Instalar el Instalador de Symfony
$ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony
# (10 segundos) Crear un nuevo proyecto Symfony
$ symfony new nombre_proyecto
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 | |
// Transforms a HAR (HTTP Archive) file into a BK file to analyze it using | |
// Blackfire Profiler (https://blackfire.io/) | |
// | |
// USAGE: | |
// $ php har2blackfire.php name-of-the-HAR-file.har | |
$harFile = $argv[1]; | |
$harData = json_decode(file_get_contents($harFile), true); |
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
// original code | |
public function getFunctions() | |
{ | |
return array( | |
new \Twig_SimpleFunction('show_source_code', array($this, 'showSourceCode'), array('is_safe' => array('html'), 'needs_environment' => true)), | |
); | |
} | |
// new code |
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
<VirtualHost *:80> | |
DocumentRoot "/Users/javier/sf/cupon.local/web" | |
DirectoryIndex app.php | |
ServerName cupon.local | |
<Directory "/Users/javier/sf/cupon.local/web"> | |
AllowOverride All | |
Allow from All | |
</Directory> | |
</VirtualHost> |
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 Sismo\Contrib; | |
use Sismo\Notifier\Notifier; | |
use Sismo\Commit; | |
/** | |
* Notifies builds via the wallpaper (Mac only). | |
* |
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
```css | |
body { | |
background-color: #F9F9F9; | |
color: #222; | |
font-family: Helvetica, Arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.4; | |
padding: 0; | |
margin: 0; | |
} |
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 | |
// app/config/routing.php | |
use Symfony\Component\Routing\RouteCollection; | |
use Symfony\Component\Routing\Route; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
$collection = new RouteCollection(); | |
$collection->add('closure_controller', new Route('/closure', [ | |
'_controller' => function (Request $request) { |
In order to generate and log a warning message about a deprecated Symfony feature, use the trigger_error()
function as follows:
trigger_error('The enctype method of the form helper was removed. You should use the new method start instead.', E_USER_DEPRECATED);
Please, be as explicit as possible in the deprecation message and always explain the alternative way to use that feature, property, method or class.
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
Step 1. Download Docker Community edition (https://store.docker.com/search?type=edition&offering=community) | |
and install it in your computer. | |
Step 2. Clone the Symfony Demo app in your computer: `git clone git@github.com:symfony/demo.git` | |
Step 3. ???? | |
Step 4. ???? | |
Step 5. ???? | |
Step 6. ???? | |
Step 7. ???? | |
Step 8. ???? | |
Step 9. ???? |
OlderNewer