ECCENTRIC DEVELOPER
Oscar Fanelli
Engineering Manager
Zend Framework / Symfony
Doctrine
ReactJS
Docker
PhpStorm
Faccio cose
Conosco gente
Stringo mani
Pigio sulla tastiera
(italian) Legal limitations
Provider
Cache
Cloudflare
Deploy
Actors
Third-party services
AD placements
Back-office AD tools
AD placements
"The Coalition for Better Ads will leverage consumer insights and cross-industry expertise to develop and implement new global standards for online advertising that address consumer expectations."
About AdBlock
Custom anti-AdBlock strategy
Golden rules
w(h)ell yes, sometimes we write some lines of code
SEO
TTFB and more
Third-party JS
Third-party JS
Traits
/**
* An Entity that implement VisitableTrait has a visit counter
* Needed an additional implementation of the job in the ControllerFactory and in the Controller
*/
trait VisitableTrait
{
/**
* @ORM\Column(type="integer")
* @var int
*/
protected $visits = 0;
public function visit()
{
$this->visits++;
}
/**
* @return int
*/
public function getVisits()
{
return $this->visits;
}
/**
* @param int $visits
*/
public function setVisits($visits)
{
$this->visits = $visits;
}
}
Interfaces
Golden rules
Back-office
DRY
Dependency Injection
class ContentControllerFactory implements FactoryInterface
{
public function createService(ServiceLocatorInterface $controllerManager)
{
$parentLocator = $controllerManager->getServiceLocator();
/** @var EntityManager $em */
$em = $parentLocator->get('Doctrine\ORM\EntityManager');
/** @var ContentService $contentService */
$contentService = $parentLocator->get('Toms\Service\ContentService');
/** @var ContentViewService $contentViewService */
$contentViewService = $parentLocator->get('Toms\Service\ContentViewService');
/** @var EmailService $emailService */
$emailService = $parentLocator->get('Toms\Service\EmailService');
return new Controller($em, $contentService, $contentViewService, $emailService);
}
}
/**
* @param EntityManager $em
* @param ContentService $contentService
* @param ContentViewService $contentViewService
* @param EmailService $emailService
*/
public function __construct(EntityManager $em, ContentService $contentService, ContentViewService $contentViewService, EmailService $emailService)
{
parent::__construct($em);
$this->contentService = $contentService;
$this->contentViewService = $contentViewService;
$this->emailService = $emailService;
}
Configuration files
Feature toggling
"Rilasciare funzionalità in modo progressivo"
by Fabio Mora
Assets
RWOverdijk/AssetManager
'filters' => [
'css' => [
['filter' => 'ScssphpFilter'],
getenv('CACHE') && getenv('CACHE_ASSETS')
? ['service' => __NAMESPACE__ . '\Filter\UglifyCssFilter']
: null,
],
'js' => [
getenv('CACHE') && getenv('CACHE_ASSETS')
? ['service' => __NAMESPACE__ . '\Filter\UglifyJsFilter']
: null,
],
],
Queues
juriansluiman/SlmQueueDoctrine
'job_manager' => [
'factories' => [
'Toms\Job\VisitJob' => 'Toms\JobFactory\VisitJobFactory',
'Toms\Job\ShareOnSocialJob' => 'Toms\JobFactory\ShareOnSocialJobFactory',
'Toms\Job\UpdateEpriceProductJob' => 'Toms\JobFactory\UpdateEpriceProductJobFactory',
],
],
Debug
Cronjobs
Deploy
Release notes for lazy guys
php public/index.php github create-minor-release
oscar.fanelli@gmail.com
@nesis
@pensiero