8 Commits
1.0.0 ... 1.0.1

Author SHA1 Message Date
Kris Wallsmith
bc9d59affb updated constraints 2013-06-03 13:37:24 -06:00
Christophe Coevoet
e3ef1f1317 Merge pull request #5 from pulse00/composerpatch
Updated symfony dependencies for 2.2 support
2013-01-12 03:56:19 -08:00
Robert Gruendler
2726627405 updated symfony dependencies for 2.2 support 2013-01-12 09:25:31 +01:00
Christophe Coevoet
9c69e092db Switched the testsuite to composer 2012-06-20 00:05:09 +02:00
Christophe Coevoet
f30fc908ac Fixed CS 2012-06-19 23:56:41 +02:00
Christophe Coevoet
531cf302bc Updated the constraint to require 2.1 2012-06-20 00:33:36 +03:00
Christophe Coevoet
c75786a658 Merge pull request #4 from FabienPennequin/symfony2.1
Update for latest changes in Security component of Symfony2.1
2012-06-19 14:32:30 -07:00
Fabien Pennequin
0ffd8b1ce9 Update for latest changes in Security component of Symfony2.1 2012-06-19 23:20:24 +02:00
10 changed files with 20 additions and 109 deletions

6
.gitignore vendored
View File

@@ -1,4 +1,4 @@
phpunit.xml
Tests/autoload.php
vendor/symfony
vendor/
composer.lock
composer.phar

View File

@@ -1,16 +1,13 @@
language: php
php:
- 5.3
- 5.4
- 5.3
- 5.4
env:
- SYMFONY_VERSION=v2.0.12
- SYMFONY_VERSION=origin/2.0
- SYMFONY_VERSION=origin/master
before_script: php vendor/vendors.php
before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
notifications:
email:
- friendsofsymfony-dev@googlegroups.com
email:
- friendsofsymfony-dev@googlegroups.com

View File

@@ -11,4 +11,4 @@
</service>
</services>
</container>
</container>

View File

@@ -11,8 +11,6 @@
namespace FOS\AdvancedEncoderBundle\Security\Encoder;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
/**
* @author Christophe Coevoet <stof@notk.org>
*/
@@ -26,5 +24,5 @@ interface EncoderAwareInterface
*
* @return string
*/
function getEncoderName();
public function getEncoderName();
}

View File

@@ -13,7 +13,6 @@ namespace FOS\AdvancedEncoderBundle\Security\Encoder;
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @author Christophe Coevoet <stof@notk.org>
@@ -26,8 +25,8 @@ class EncoderFactory implements EncoderFactoryInterface
/**
* Constructor.
*
* @param \Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface $genericFactory
* @param array $encoders
* @param EncoderFactoryInterface $genericFactory
* @param array $encoders
*/
public function __construct(EncoderFactoryInterface $genericFactory, array $encoders)
{
@@ -35,7 +34,7 @@ class EncoderFactory implements EncoderFactoryInterface
$this->encoders = $encoders;
}
public function getEncoder(UserInterface $user)
public function getEncoder($user)
{
if (!$user instanceof EncoderAwareInterface) {
return $this->genericFactory->getEncoder($user);
@@ -61,8 +60,8 @@ class EncoderFactory implements EncoderFactoryInterface
/**
* Creates an encoder for the given algorithm.
*
* @param array $config
* @return \Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface
* @param array $config
* @return PasswordEncoderInterface
*/
protected function createEncoder(array $config)
{

View File

@@ -1,32 +0,0 @@
<?php
/*
* This file is part of the FOSAdvancedEncoderBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$vendorDir = __DIR__.'/../vendor';
require_once $vendorDir.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'Symfony' => $vendorDir.'/symfony/src',
));
$loader->register();
spl_autoload_register(function($class) {
if (0 === strpos($class, 'FOS\\AdvancedEncoderBundle\\')) {
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
if (!stream_resolve_include_path($path)) {
return false;
}
require_once $path;
return true;
}
});

View File

@@ -1,16 +0,0 @@
<?php
/*
* This file is part of the FOSAdvancedEncoderBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (file_exists($file = __DIR__.'/autoload.php')) {
require_once $file;
} elseif (file_exists($file = __DIR__.'/autoload.php.dist')) {
require_once $file;
}

View File

@@ -13,8 +13,8 @@
],
"require": {
"php": ">=5.3.2",
"symfony/framework-bundle": ">=2.0,<2.2",
"symfony/security-bundle": ">=2.0,<2.2"
"symfony/framework-bundle": "~2.1",
"symfony/security-bundle": "~2.1"
},
"autoload": {
"psr-0": { "FOS\\AdvancedEncoderBundle": "" }

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./Tests/bootstrap.php" colors="true">
<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="FOSAdvancedEncoderBundle">
<directory suffix="Test.php">./Tests</directory>

35
vendor/vendors.php vendored
View File

@@ -1,35 +0,0 @@
#!/usr/bin/env php
<?php
/*
* This file is part of the FOSAdvancedEncoderBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
set_time_limit(0);
if (isset($argv[1])) {
$_SERVER['SYMFONY_VERSION'] = $argv[1];
}
$vendorDir = __DIR__;
$deps = array(
array('symfony', 'http://github.com/symfony/symfony', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'),
);
foreach ($deps as $dep) {
list($name, $url, $rev) = $dep;
echo "> Installing/Updating $name\n";
$installDir = $vendorDir.'/'.$name;
if (!is_dir($installDir)) {
system(sprintf('git clone -q %s %s', escapeshellarg($url), escapeshellarg($installDir)));
}
system(sprintf('cd %s && git fetch -q origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
}