- Comment migrer vers Symfony3 ?
- De meilleures applications avec le composant Workflow
- La performance par défaut avec le composant Cache
- Comment contribuer à Symfony?
- Des applications performantes avec Blackfire
- Silex 2, le micro framework simple et performant
- Que peux-t-on attendre de Twig 2?
- Gérez votre projet MonoRepo avec splitsh
- Les projets de Fabien que vous ne connaissez peut être pas: Sami, Goutte, Sismo, PHP CS Fixer, MonoRepo, Pimple, Switmailer...
- Object Calisthenics (aucune idée de la traduction fr exacte)
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 | |
<<<CONFIG | |
packages: | |
- "symfony/yaml: ~2.3" | |
CONFIG; | |
use Symfony\Component\Yaml\Exception\ParseException; | |
use Symfony\Component\Yaml\Parser; | |
$content = file_get_contents($argv[1]); |
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
[ | |
{ | |
"id": 1, | |
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", | |
"repository_url": "https://api.github.com/repos/octocat/Hello-World", | |
"labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", | |
"comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", | |
"events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", | |
"html_url": "https://github.com/octocat/Hello-World/issues/1347", | |
"number": 1347, |
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 | |
use \ZipArchive; | |
/** | |
* @see http://php.net/manual/en/zip.constants.php | |
*/ | |
class OpenFailureException extends \Exception | |
{ | |
public static $errorCodeToMessage = array( | |
ZipArchive::ER_EXISTS => 'The file %filename% already exists. (ZipArchive::ER_EXISTS)', |
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 | |
/* minimal functional tests @author Mickaël Andrieu <mickael.andrieu@prestashop.com> */ | |
stream_context_set_default(['http'=>['method'=>'HEAD']]); | |
function it($m,$p){echo"\033[3",$p?'2m✔︎':'1m✘'.register_shutdown_function(function(){die(1);})," It $m\033[0m\n";} // thanks everzet! | |
function ok($url){return false!==strpos(get_headers($url)[0], '200');} | |
// go tests ! | |
it('GitHub Ok',ok('https://github.com/')); |
First of all, ensure you don't have any deprecated!
The Symfony documentation explains it well, but let's sum up:
- install the phpunit bridge (
$ composer require --dev symfony/phpunit-bridge
) - also check all your pages using web profiler and be ensure there is no
deprecation error
handled - found errors and need help about how to fix it ? I did a sort of guide.
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 Standalone\Form; | |
use \Symfony\Component\HttpFoundation as SHttp; | |
use \Symfony\Component\Form as SForm; | |
use \Symfony\Component\DependencyInjection as SDI; | |
use \Symfony\Bridge as SBridge; | |
//Register all your autoloaded functions here | |
//... |
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 | |
// sources: http://stackoverflow.com/a/4719222 | |
class A { | |
public static function className(){ | |
echo __CLASS__; | |
} | |
public static function test(){ | |
self::className(); | |
} |
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
RewriteCond %{DOCUMENT_ROOT}/../vendor/backbee/bb-core-js/$1 -f | |
RewriteRule ^/resources/toolbar/(.*)$ %{DOCUMENT_ROOT}/../vendor/backbee/bb-core-js/$1 [L] |