Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| class AbstractManagerBase extends \PHPUnit_Framework_TestCase | |
| { | |
| protected function getEmMock() | |
| { | |
| $emMock = $this->getMock('\Doctrine\ORM\EntityManager', | |
| array('getRepository', 'getClassMetadata', 'persist', 'flush'), array(), '', false); | |
| $emMock->expects($this->any()) | |
| ->method('getRepository') |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:
oauth_user_provider in the security.yml with your custom created serviceHere are the steps:
routing.yml I have added all the routes for both bundles.config.yml mostly as it is presented in the HWIOAuthBundle.security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.- Affiliate network name - ¶meter=value_of_the_click_reference_here_CLICKREF
This is a requirement for brew in the next step. You can install XCode and then install Command Line Tools through the XCode preferences, or you can install just the Command Line Tools.
$ xcode-select --install| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| <?php | |
| namespace NoxLogic\DemoBundle\Form\Type; | |
| use Doctrine\ORM\EntityManager; | |
| use NoxLogic\DemoBundle\Entity\Province; | |
| use Symfony\Component\Form\AbstractType; | |
| use Symfony\Component\Form\FormBuilderInterface; | |
| use Symfony\Component\Form\FormEvent; | |
| use Symfony\Component\Form\FormEvents; |
| <?php | |
| namespace AppBundle\Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Symfony\Component\HttpFoundation\File\File; | |
| use Symfony\Component\HttpFoundation\File\UploadedFile; | |
| use Symfony\Component\Validator\Constraints as Assert; | |
| use Vich\UploaderBundle\Mapping\Annotation as Vich; |
| #if os(macOS) | |
| import Darwin | |
| #elseif os(Linux) | |
| import Glibc | |
| #endif | |
| // MARK: Tokens | |
| enum BinaryOperator: Character { | |
| case plus = "+" |