Skip to content

Commit

Permalink
Merge 2ab3cb1 into 9704d4e
Browse files Browse the repository at this point in the history
  • Loading branch information
GeLoLabs committed Aug 16, 2016
2 parents 9704d4e + 2ab3cb1 commit bebf932
Show file tree
Hide file tree
Showing 424 changed files with 5,703 additions and 22,873 deletions.
4 changes: 0 additions & 4 deletions .coveralls.yml

This file was deleted.

13 changes: 3 additions & 10 deletions .gitignore
@@ -1,12 +1,5 @@
# Composer
/bin
/.php_cs.cache
/build
/composer.lock
/vendor

# PHPUnit
/phpunit.xml
/clover.xml
/report

# Coveralls
/coveralls.json
/vendor
18 changes: 18 additions & 0 deletions .php_cs
@@ -0,0 +1,18 @@
<?php

use Symfony\CS\Config\Config;
use Symfony\CS\Finder\DefaultFinder;

$finder = DefaultFinder::create()
->in([__DIR__])
->exclude(['vendor']);

return Config::create()
->setUsingCache(true)
->fixers([
'align_double_arrow',
'short_array_syntax',
'ordered_use',
'-psr0',
])
->finder($finder);
59 changes: 44 additions & 15 deletions .travis.yml
@@ -1,24 +1,53 @@
language: php

php: 5.3.3
php:
- 5.6
- 7.0
- hhvm

env:
- SYMFONY_VERSION="2.1.*"
- SYMFONY_VERSION="2.2.*"
- SYMFONY_VERSION="2.3.*"
- SYMFONY_VERSION="2.4.*"
- SYMFONY_VERSION="2.5.*"
global:
- COMPOSER_PREFER_LOWEST=false
- SYMFONY_DEPRECATIONS_HELPER=weak
- SYMFONY_VERSION=2.3.*

before_script:
- export DISPLAY=:99
- /sbin/start-stop-daemon -Sbmq -p /tmp/xvfb_99.pid -x /usr/bin/Xvfb -- ${DISPLAY} -ac -screen 0, 1600x1200x24
- curl http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.0.jar > selenium.jar
- curl http://chromedriver.storage.googleapis.com/2.12/chromedriver_linux64.zip > chromedriver.zip
- unzip chromedriver.zip
- java -jar selenium.jar -Dwebdriver.chrome.driver=./chromedriver > /dev/null 2>&1 &
- composer self-update
- composer require --no-update symfony/framework-bundle:${SYMFONY_VERSION}
- composer install --prefer-source
- composer require --no-update --dev symfony/form:${SYMFONY_VERSION}
- composer require --no-update --dev symfony/yaml:${SYMFONY_VERSION}
- if [[ "$SYMFONY_VERSION" = *dev* ]]; then sed -i "s/\"MIT\"/\"MIT\",\"minimum-stability\":\"dev\"/g" composer.json; fi
- composer update --prefer-source `if [[ $COMPOSER_PREFER_LOWEST = true ]]; then echo "--prefer-lowest --prefer-stable"; fi`

script: bin/phpunit --coverage-clover clover.xml
script: vendor/bin/phpunit --configuration phpunit.travis.xml

after_script: bin/coveralls

branches:
only: master

notifications:
email: geloen.eric@gmail.com
matrix:
include:
- php: 5.6
env: SYMFONY_VERSION=2.3.* COMPOSER_PREFER_LOWEST=true
- php: 5.6
env: SYMFONY_VERSION=3.0.* COMPOSER_PREFER_LOWEST=true
- php: 5.6
env: SYMFONY_VERSION=2.4.*
- php: 5.6
env: SYMFONY_VERSION=2.5.*
- php: 5.6
env: SYMFONY_VERSION=2.6.*
- php: 5.6
env: SYMFONY_VERSION=2.7.*
- php: 5.6
env: SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=strict
- php: 5.6
env: SYMFONY_VERSION=3.0.* SYMFONY_DEPRECATIONS_HELPER=strict
- php: 5.6
env: SYMFONY_VERSION=3.1.* SYMFONY_DEPRECATIONS_HELPER=strict
- php: 5.6
env: SYMFONY_VERSION=3.2.*@dev SYMFONY_DEPRECATIONS_HELPER=strict
allow_failures:
- env: SYMFONY_VERSION=3.2.*@dev SYMFONY_DEPRECATIONS_HELPER=strict
39 changes: 39 additions & 0 deletions DependencyInjection/Compiler/CleanTemplatingPass.php
@@ -0,0 +1,39 @@
<?php

/*
* This file is part of the Ivory Google Map bundle package.
*
* (c) Eric GELOEN <geloen.eric@gmail.com>
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/

namespace Ivory\GoogleMapBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* @author GeLo <geloen.eric@gmail.com>
*/
class CleanTemplatingPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('templating.engine.php')) {
$container->removeDefinition('ivory.google_map.templating.api');
$container->removeDefinition('ivory.google_map.templating.map');
$container->removeDefinition('ivory.google_map.templating.place_autocomplete');
}

if (!$container->hasDefinition('twig')) {
$container->removeDefinition('ivory.google_map.twig.extension.api');
$container->removeDefinition('ivory.google_map.twig.extension.map');
$container->removeDefinition('ivory.google_map.twig.extension.place_autocomplete');
}
}
}
29 changes: 29 additions & 0 deletions DependencyInjection/Compiler/LegacyRegisterHelperListenerPass.php
@@ -0,0 +1,29 @@
<?php

/*
* This file is part of the Ivory Google Map bundle package.
*
* (c) Eric GELOEN <geloen.eric@gmail.com>
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/

namespace Ivory\GoogleMapBundle\DependencyInjection\Compiler;

use Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass;

/**
* @author GeLo <geloen.eric@gmail.com>
*/
class LegacyRegisterHelperListenerPass extends RegisterListenersPass
{
public function __construct()
{
parent::__construct(
'ivory.google_map.helper.event_dispatcher',
'ivory.google_map.helper.listener',
'ivory.google_map.helper.subscriber'
);
}
}
34 changes: 34 additions & 0 deletions DependencyInjection/Compiler/RegisterControlRendererPass.php
@@ -0,0 +1,34 @@
<?php

/*
* This file is part of the Ivory Google Map bundle package.
*
* (c) Eric GELOEN <geloen.eric@gmail.com>
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/

namespace Ivory\GoogleMapBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
* @author GeLo <geloen.eric@gmail.com>
*/
class RegisterControlRendererPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
$controlManagerRenderer = $container->getDefinition('ivory.google_map.helper.renderer.control.manager');

foreach ($container->findTaggedServiceIds('ivory.google_map.helper.renderer.control') as $id => $attributes) {
$controlManagerRenderer->addMethodCall('addRenderer', [new Reference($id)]);
}
}
}
45 changes: 45 additions & 0 deletions DependencyInjection/Compiler/RegisterExtendableRendererPass.php
@@ -0,0 +1,45 @@
<?php

/*
* This file is part of the Ivory Google Map bundle package.
*
* (c) Eric GELOEN <geloen.eric@gmail.com>
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/

namespace Ivory\GoogleMapBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
* @author GeLo <geloen.eric@gmail.com>
*/
class RegisterExtendableRendererPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
$tag = 'ivory.google_map.helper.renderer.extendable';
$extendableRenderer = $container->getDefinition('ivory.google_map.helper.renderer.overlay.extendable');

foreach ($container->findTaggedServiceIds($tag) as $id => $attributes) {
foreach ($attributes as $attribute) {
if (!isset($attribute['class'])) {
throw new \RuntimeException(sprintf(
'No "class" attribute found for the tag "%s" on the service "%s".',
$tag,
$id
));
}

$extendableRenderer->addMethodCall('setRenderer', [$attribute['class'], new Reference($id)]);
}
}
}
}
29 changes: 29 additions & 0 deletions DependencyInjection/Compiler/RegisterHelperListenerPass.php
@@ -0,0 +1,29 @@
<?php

/*
* This file is part of the Ivory Google Map bundle package.
*
* (c) Eric GELOEN <geloen.eric@gmail.com>
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/

namespace Ivory\GoogleMapBundle\DependencyInjection\Compiler;

use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass;

/**
* @author GeLo <geloen.eric@gmail.com>
*/
class RegisterHelperListenerPass extends RegisterListenersPass
{
public function __construct()
{
parent::__construct(
'ivory.google_map.helper.event_dispatcher',
'ivory.google_map.helper.listener',
'ivory.google_map.helper.subscriber'
);
}
}

0 comments on commit bebf932

Please sign in to comment.