-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from egeloen/refacto
[3.0] Sync with egeloen/google-map library
- Loading branch information
Showing
424 changed files
with
5,703 additions
and
22,873 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
# Composer | ||
/bin | ||
/.php_cs.cache | ||
/build | ||
/composer.lock | ||
/vendor | ||
|
||
# PHPUnit | ||
/phpunit.xml | ||
/clover.xml | ||
/report | ||
|
||
# Coveralls | ||
/coveralls.json | ||
/vendor |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
29
DependencyInjection/Compiler/LegacyRegisterHelperListenerPass.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
34
DependencyInjection/Compiler/RegisterControlRendererPass.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
45
DependencyInjection/Compiler/RegisterExtendableRendererPass.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
29
DependencyInjection/Compiler/RegisterHelperListenerPass.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
); | ||
} | ||
} |
Oops, something went wrong.