Object: $result ($this)
Expectation: should or shouldNot
Matcher: Be...()
Types of Matchers:
| <?php | |
| use Symfony\Component\PropertyAccess\PropertyAccess; | |
| use Symfony\Component\Validator\Constraints\All; | |
| use Symfony\Component\Validator\Constraints\Choice; | |
| use Symfony\Component\Validator\Constraints\Collection; | |
| use Symfony\Component\Validator\Constraints\Length; | |
| use Symfony\Component\Validator\Constraints\NotBlank; | |
| use Symfony\Component\Validator\Constraints\Optional; | |
| use Symfony\Component\Validator\Constraints\Required; |
| VAGRANTFILE_API_VERSION = "2" | |
| digital_ocean_client_id = '' | |
| digital_ocean_api_key = '' | |
| Vagrant.require_plugin "vagrant-librarian-chef" | |
| Vagrant.require_plugin "vagrant-omnibus" | |
| Vagrant.require_plugin "vagrant-vbguest" | |
| Vagrant.require_plugin "vagrant-digitalocean" |
| #!/usr/bin/python | |
| # | |
| # This script will provides a reverse-search on Packagist to find which libraries uses a given library package | |
| # as a dependency. | |
| # | |
| # Usage: | |
| # First, you need to fetch dependencies: ./packagist.py --fetch | |
| # After, you can start checking packages: ./packagist.py --package <package-name> | |
| # | |
| # Author: Vincent Composieux <vincent.composieux@gmail.com> |
| <?php | |
| mb_internal_encoding("UTF-8"); | |
| function λ($fn) { | |
| list($args, $body) = explode('=>', $fn, 2); | |
| $args = trim($args); | |
| $args = ltrim($args, '('); | |
| $args = rtrim($args, ')'); |
| <?php | |
| use Symfony\Component\HttpFoundation\RequestStack; | |
| class HttpFacade | |
| { | |
| /** | |
| * @var RequestStack | |
| */ | |
| private $requestStack; |
I wanted to be able to use Sculpin to generate GitHub pages. Here's what I did...
Created a super awesome Sculpin site from the Sculpin Blog Skeleton
Make sure everything is under version control in my master branch (except things that shouldn't be. see the .gitignore)
Updated publish.sh:
#!/bin/bash
A user provider reading users from the filesystem.
This is useful when you have an API with just a few different users (different frontends, not end users). Our data comes from elasticsearch for most API calls, so we don't want to block all access just because MySQL has gone away.
As we have a multi server setup, we have a cronjob to trigger the UserProvider::dumpUsers method regularly.
| <?php | |
| return Symfony\CS\Config\Config::create() | |
| ->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL) | |
| ->fixers([ | |
| 'short_array_syntax', | |
| 'ordered_use', | |
| ]) | |
| ; |