Commit 295bc4e0 authored by Markus Kalkbrenner's avatar Markus Kalkbrenner Committed by GitHub

remove obsolete Autoloader.php (#567)

* remove obsolete Autoloader implementation

* marked range query injection prevention as security fix

* added all integration tests to group "integration"
parent 761daf4d
...@@ -23,7 +23,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ...@@ -23,7 +23,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Isolated search components from the select query type and made them re-usable - Isolated search components from the select query type and made them re-usable
- BC break: Suggester component is now compatible to Solr v6/7 (the existing one was renamed to Spellcheck) - BC break: Suggester component is now compatible to Solr v6/7 (the existing one was renamed to Spellcheck)
- BC break: Suggester query type is now compatible to Solr v6/7 (the existing one was renamed to Spellcheck) - BC break: Suggester query type is now compatible to Solr v6/7 (the existing one was renamed to Spellcheck)
- Prevented query injection inside range queries
- Lots of source code re-structuring and clean-up - Lots of source code re-structuring and clean-up
### Removed ### Removed
...@@ -31,6 +30,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ...@@ -31,6 +30,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Exclude test suite from distribution - Exclude test suite from distribution
- Dropped support for Solr versions before 6 - Dropped support for Solr versions before 6
### Security
- Prevented query injection inside range queries
## [3.8.1] ## [3.8.1]
### Fixed ### Fixed
......
...@@ -21,9 +21,6 @@ ...@@ -21,9 +21,6 @@
<filter> <filter>
<whitelist> <whitelist>
<directory suffix=".php">src</directory> <directory suffix=".php">src</directory>
<exclude>
<file>src/Solarium/Autoloader.php</file>
</exclude>
</whitelist> </whitelist>
</filter> </filter>
......
...@@ -19,9 +19,6 @@ ...@@ -19,9 +19,6 @@
<filter> <filter>
<whitelist> <whitelist>
<directory suffix=".php">src</directory> <directory suffix=".php">src</directory>
<exclude>
<file>src/Solarium/Autoloader.php</file>
</exclude>
</whitelist> </whitelist>
</filter> </filter>
......
<?php
namespace Solarium;
/**
* Autoloader.
*
* This class is included to allow for easy usage of Solarium in environments missing a PSR-O autoloader.
*
* It's recommended to install Solarium using composer, which will also provide autoloading for you. In that
* case you don't need to use this autoloader.
*
* Solarium is PSR-0 compliant, so you can also use any other compatible autoloader
* (most modern frameworks include one)
*/
class Autoloader
{
/**
* Register the Solarium autoloader.
*
* The autoloader only acts for classnames that start with 'Solarium'. It
* will be appended to any other autoloaders already registered.
*
* Using this autoloader will disable any existing __autoload function. If
* you want to use multiple autoloaders please use spl_autoload_register.
*
* @static
*/
public static function register()
{
spl_autoload_register([new self(), 'load']);
}
/**
* Autoload a class.
*
* This method is automatically called after registering this autoloader.
* The autoloader only acts for classnames that start with 'Solarium'.
*
* @static
*
* @param string $class
*/
public static function load($class)
{
if ('Solarium' == substr($class, 0, 8)) {
$class = str_replace(
['Solarium', '\\'],
['', '/'],
$class
);
$file = __DIR__.$class.'.php';
require $file;
}
}
}
...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters; ...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters;
use Solarium\Tests\Integration\AbstractTechproductsTest; use Solarium\Tests\Integration\AbstractTechproductsTest;
/**
* @group integration
*/
class TechproductsCurlTest extends AbstractTechproductsTest class TechproductsCurlTest extends AbstractTechproductsTest
{ {
} }
...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters; ...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters;
use Solarium\Tests\Integration\AbstractTechproductsTest; use Solarium\Tests\Integration\AbstractTechproductsTest;
/**
* @group integration
*/
class TechproductsGuzzle3Test extends AbstractTechproductsTest class TechproductsGuzzle3Test extends AbstractTechproductsTest
{ {
public function setUp() public function setUp()
......
...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters; ...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters;
use Solarium\Tests\Integration\AbstractTechproductsTest; use Solarium\Tests\Integration\AbstractTechproductsTest;
/**
* @group integration
*/
class TechproductsGuzzleTest extends AbstractTechproductsTest class TechproductsGuzzleTest extends AbstractTechproductsTest
{ {
public function setUp() public function setUp()
......
...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters; ...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters;
use Solarium\Tests\Integration\AbstractTechproductsTest; use Solarium\Tests\Integration\AbstractTechproductsTest;
/**
* @group integration
*/
class TechproductsHttpTest extends AbstractTechproductsTest class TechproductsHttpTest extends AbstractTechproductsTest
{ {
public function setUp() public function setUp()
......
...@@ -5,6 +5,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters; ...@@ -5,6 +5,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters;
use Solarium\Core\Client\Adapter\PeclHttp; use Solarium\Core\Client\Adapter\PeclHttp;
use Solarium\Tests\Integration\AbstractTechproductsTest; use Solarium\Tests\Integration\AbstractTechproductsTest;
/**
* @group integration
*/
class TechproductsPeclHttpTest extends AbstractTechproductsTest class TechproductsPeclHttpTest extends AbstractTechproductsTest
{ {
public function setUp() public function setUp()
......
...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters; ...@@ -4,6 +4,9 @@ namespace Solarium\Tests\Integration\TechproductsAdapters;
use Solarium\Tests\Integration\AbstractTechproductsTest; use Solarium\Tests\Integration\AbstractTechproductsTest;
/**
* @group integration
*/
class TechproductsZendHttpTest extends AbstractTechproductsTest class TechproductsZendHttpTest extends AbstractTechproductsTest
{ {
public function setUp() public function setUp()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment