diff --git a/.gitignore b/.gitignore
index 1dbdcb2..3eec762 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,3 @@
phpunit.xml
coverage
-vendor/symfony
-vendor/twig
-vendor/twitteroauth
\ No newline at end of file
+vendor/
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 16bb3e4..f06edb7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,11 +4,7 @@ php:
- 5.3
- 5.4
-env:
- - SYMFONY_VERSION=v2.0.7
- - SYMFONY_VERSION=origin/2.0
-
-before_script: php vendor/vendors.php
+before_script: composer install --dev
notifications:
email:
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index dd0a884..fd369e6 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -40,7 +40,7 @@ public function getConfigTreeBuilder()
})
->end()
->children()
- ->scalarNode('file')->defaultValue('%kernel.root_dir%/../vendor/twitteroauth/twitteroauth/twitteroauth.php')->end()
+ ->scalarNode('file')->info('DEPRECATED. To be removed.')->end()
->scalarNode('consumer_key')->isRequired()->cannotBeEmpty()->end()
->scalarNode('consumer_secret')->isRequired()->cannotBeEmpty()->end()
->scalarNode('access_token')->defaultNull()->end()
diff --git a/DependencyInjection/FOSTwitterExtension.php b/DependencyInjection/FOSTwitterExtension.php
index c627485..dd52921 100644
--- a/DependencyInjection/FOSTwitterExtension.php
+++ b/DependencyInjection/FOSTwitterExtension.php
@@ -38,7 +38,7 @@ public function load(array $configs, ContainerBuilder $container)
$container->setAlias($config['alias'], 'fos_twitter.service');
}
- foreach (array('file', 'consumer_key', 'consumer_secret', 'callback_url', 'access_token', 'access_token_secret', 'anywhere_version') as $attribute) {
+ foreach (array('consumer_key', 'consumer_secret', 'callback_url', 'access_token', 'access_token_secret', 'anywhere_version') as $attribute) {
if (isset($config[$attribute])) {
$container->setParameter('fos_twitter.'.$attribute, $config[$attribute]);
}
diff --git a/README.md b/README.md
index 2ac8c8d..6729198 100644
--- a/README.md
+++ b/README.md
@@ -14,23 +14,15 @@ database based solution provided by FOSUserBundle.
Installation
============
- 1. Add this bundle and Abraham Williams' Twitter library to your project as Git submodules:
+ 1. Add this bundle to your project's ```composer.json``` :
- $ git submodule add git://github.com/FriendsOfSymfony/FOSTwitterBundle.git vendor/bundles/FOS/TwitterBundle
- $ git submodule add git://github.com/kertz/twitteroauth.git vendor/twitteroauth
+ "require": {
+ "_some_package": "*",
->**Note:** The kertz/twitteroauth is patched to be compatible with FOSTwitterBundle
-
- 2. Register the namespace `FOS` to your project's autoloader bootstrap script:
-
- //app/autoload.php
- $loader->registerNamespaces(array(
- // ...
- 'FOS' => __DIR__.'/../vendor/bundles',
- // ...
- ));
+ "friendsofsymfony/twitter-bundle": "1.1.*"
+ }
- 3. Add this bundle to your application's kernel:
+ 2. Add this bundle to your application's kernel:
//app/AppKernel.php
public function registerBundles()
@@ -42,11 +34,10 @@ Installation
);
}
- 4. Configure the `twitter` service in your YAML configuration:
+ 3. Configure the `twitter` service in your YAML configuration:
#app/config/config.yml
fos_twitter:
- file: %kernel.root_dir%/../vendor/twitteroauth/twitteroauth/twitteroauth.php
consumer_key: xxxxxx
consumer_secret: xxxxxx
callback_url: http://www.example.com/login_check
diff --git a/Resources/config/schema/twitter-1.0.xsd b/Resources/config/schema/twitter-1.0.xsd
index 0063ada..c5bec8d 100644
--- a/Resources/config/schema/twitter-1.0.xsd
+++ b/Resources/config/schema/twitter-1.0.xsd
@@ -9,11 +9,12 @@
-
+
+
diff --git a/Resources/config/twitter.xml b/Resources/config/twitter.xml
index 9b23ea5..d49bef1 100644
--- a/Resources/config/twitter.xml
+++ b/Resources/config/twitter.xml
@@ -5,7 +5,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
- null
null
null
null
@@ -29,7 +28,6 @@