BUG Implement or exclude all pending upgrader deltas

This commit is contained in:
Damian Mooyman 2017-07-03 12:21:27 +12:00
parent 40f8b04501
commit f65e3627dc
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
57 changed files with 168 additions and 22 deletions

View File

@ -1010,7 +1010,52 @@ mappings:
TableListField_PageControls_ss: SilverStripe\Forms\GridField\GridField
UploadField: SilverStripe\AssetAdmin\Forms\UploadField
Pagination: SilverStripe\Forms\GridField\GridField
skipYML:
- MySQLPDODatabase
- MySQLDatabase
- MySQLiConnector
- PDOConnector
- MySQLSchemaManager
- MySQLQueryBuilder
- EndsWithFilter
- ExactMatchFilter
- FulltextFilter
- GreaterThanFilter
- GreaterThanOrEqualFilter
- LessThanFilter
- LessThanOrEqualFilter
- PartialMatchFilter
- StartsWithFilter
- WithinRangeFilter
- Boolean
- Currency
- DBClassName
- Date
- Datetime
- DBDatetime
- Decimal
- Double
- Enum
- Float
- ForeignKey
- HTMLText
- HTMLFragment
- HTMLVarchar
- Int
- BigInt
- Locale
- DBLocale
- Money
- MultiEnum
- Percentage
- PolymorphicForeignKey
- PrimaryKey
- Text
- Time
- Varchar
- Year
skipConfigs:
- required_fields
- db
- casting
- table_name
@ -1022,5 +1067,8 @@ skipConfigs:
- owns
- searchable_fields
- summary_fields
- many_many_extraFields
- default_search_filter_class
- segment
excludedPaths:
- '*fixtures*'

View File

@ -2,10 +2,6 @@
Name: coreconfig
---
SilverStripe\Core\Injector\Injector:
FormSchema:
class: SilverStripe\Forms\Schema\FormSchema
FixtureFactory:
class: SilverStripe\Dev\FixtureFactory
SilverStripe\Core\Manifest\ResourceURLGenerator:
class: SilverStripe\Control\SimpleResourceURLGenerator
properties:

View File

@ -17,7 +17,7 @@ SilverStripe\Core\Injector\Injector:
constructor:
- "error-log"
calls:
DisplayErrorHandler: [ pushHandler, [ %$Monolog\Handler\HandlerInterface ] ]
pushDisplayErrorHandler: [ pushHandler, [ %$Monolog\Handler\HandlerInterface ] ]
---
Name: loggingformatters
---

View File

@ -8,7 +8,7 @@ SilverStripe\Core\Injector\Injector:
TrustedProxyMiddleware: %$SilverStripe\Control\Middleware\TrustedProxyMiddleware
AllowedHostsMiddleware: %$SilverStripe\Control\Middleware\AllowedHostsMiddleware
SessionMiddleware: %$SilverStripe\Control\Middleware\SessionMiddleware
RequestProcessor: %$SilverStripe\Control\RequestProcessor
RequestProcessorMiddleware: %$SilverStripe\Control\RequestProcessor
FlushMiddleware: %$SilverStripe\Control\Middleware\FlushMiddleware
SilverStripe\Control\AllowedHostsMiddleware:
properties:

View File

@ -27,6 +27,7 @@ use SilverStripe\View\TemplateGlobalProvider;
* @see Director::handleRequest()
* @see Director::$rules
* @see Director::$environment_type
* @skipUpgrade
*/
class Director implements TemplateGlobalProvider
{

View File

@ -44,7 +44,7 @@ class FixtureBlueprint
/** @config */
private static $dependencies = array(
'factory' => '%$FixtureFactory'
'factory' => '%$'.FixtureFactory::class,
);
/**

View File

@ -113,6 +113,7 @@ foreach ($databaseClasses as $class => $details) {
}
// Load database config
/** @skipUpgrade */
if (isset($_REQUEST['db'])) {
if (isset($_REQUEST['db']['type'])) {
$type = $_REQUEST['db']['type'];

View File

@ -48,6 +48,7 @@ class CompositeField extends FormField
protected $schemaDataType = FormField::SCHEMA_DATA_TYPE_STRUCTURAL;
/** @skipUpgrade */
protected $schemaComponent = 'CompositeField';
public function __construct($children = null)

View File

@ -60,7 +60,7 @@ use SilverStripe\ORM\ValidationResult;
*/
class FieldGroup extends CompositeField
{
/** @skipUpgrade */
protected $schemaComponent = 'FieldGroup';
protected $zebra;

View File

@ -55,6 +55,8 @@ class GroupedDropdownField extends DropdownField
{
// TODO remove this when GroupedDropdownField is implemented
// This should be one of SCHEMA_DATA_TYPE_* constants instead
/** @skipUpgrade */
protected $schemaDataType = 'GroupedDropdownField';
/**

View File

@ -10,9 +10,10 @@ namespace SilverStripe\Forms;
class LabelField extends DatalessField
{
protected $schemaDataType = FormField::SCHEMA_DATA_TYPE_STRUCTURAL;
/** @skipUpgrade */
protected $schemaComponent = 'LabelField';
/**
* @param string $name
* @param null|string $title

View File

@ -15,7 +15,7 @@ use SilverStripe\Core\Convert;
*/
class LookupField extends MultiSelectField
{
/** @skipUpgrade */
protected $schemaComponent = 'LookupField';
/**

View File

@ -18,6 +18,7 @@ class MoneyField extends FormField
{
// TODO replace with `FormField::SCHEMA_DATA_TYPE_TEXT` when MoneyField is implemented
/** @skipUpgrade */
protected $schemaDataType = 'MoneyField';
/**

View File

@ -56,7 +56,7 @@ use SilverStripe\View\ArrayData;
*/
class OptionsetField extends SingleSelectField
{
/** @skipUpgrade */
protected $schemaComponent = 'OptionsetField';
/**

View File

@ -58,6 +58,7 @@ class TreeDropdownField extends FormField
{
protected $schemaDataType = self::SCHEMA_DATA_TYPE_SINGLESELECT;
/** @skipUpgrade */
protected $schemaComponent = 'TreeDropdownField';
private static $url_handlers = array(

View File

@ -500,6 +500,7 @@ class DataObjectSchema
// look for indexable field types
foreach ($this->databaseFields($class, false) as $field => $type) {
/** @skipUpgrade */
if ($type === 'ForeignKey' || $type === 'DBClassName') {
$indexes[$field] = [
'type' => 'index',

View File

@ -32,6 +32,7 @@ use InvalidArgumentException;
* </code>
*
* @todo Add localization support, see http://open.silverstripe.com/ticket/2931
* @skipUpgrade
*/
class DBDatetime extends DBDate implements TemplateGlobalProvider
{

View File

@ -107,6 +107,7 @@ class Group extends DataObject
* Caution: Only call on instances, not through a singleton.
* The "root group" fields will be created through {@link SecurityAdmin->EditForm()}.
*
* @skipUpgrade
* @return FieldList
*/
public function getCMSFields()
@ -150,7 +151,7 @@ class Group extends DataObject
$config->addComponents(new GridFieldExportButton('buttons-after-left'));
$config->addComponents(new GridFieldPrintButton('buttons-after-left'));
/** @var GridFieldAddExistingAutocompleter $autocompleter */
$autocompleter = $config->getComponentByType('SilverStripe\\Forms\\GridField\\GridFieldAddExistingAutocompleter');
$autocompleter = $config->getComponentByType(GridFieldAddExistingAutocompleter::class);
/** @skipUpgrade */
$autocompleter
->setResultsFormat('$Title ($Email)')
@ -274,6 +275,7 @@ class Group extends DataObject
/**
* @param bool $includerelations Indicate if the labels returned include relation fields
* @return array
* @skipUpgrade
*/
public function fieldLabels($includerelations = true)
{

View File

@ -47,6 +47,7 @@ class LoginAttempt extends DataObject
private static $table_name = "LoginAttempt";
/**
* @skipUpgrade
* @param bool $includerelations Indicate if the labels returned include relation fields
* @return array
*/

View File

@ -346,6 +346,7 @@ class Member extends DataObject
/**
* Returns true if this user is locked out
*
* @skipUpgrade
* @return bool
*/
public function isLockedOut()
@ -1413,6 +1414,7 @@ class Member extends DataObject
* Return a {@link FieldList} of fields that would appropriate for editing
* this member.
*
* @skipUpgrade
* @return FieldList Return a FieldList of fields that would appropriate for
* editing this member.
*/

View File

@ -16,6 +16,9 @@ class CMSLoginHandler extends LoginHandler
/**
* Return the CMSMemberLoginForm form
*
* @skipUpgrade
* @return CMSMemberLoginForm
*/
public function loginForm()
{
@ -26,6 +29,9 @@ class CMSLoginHandler extends LoginHandler
);
}
/**
* @return HTTPResponse
*/
public function redirectBackToForm()
{
// Redirect back to form

View File

@ -18,6 +18,7 @@ class CMSMemberAuthenticator extends MemberAuthenticator
}
/**
* @skipUpgrade
* @param array $data
* @param ValidationResult|null $result
* @param Member|null $member

View File

@ -86,6 +86,7 @@ class LoginHandler extends RequestHandler
/**
* Return the MemberLoginForm form
*
* @skipUpgrade
* @return MemberLoginForm
*/
public function loginForm()

View File

@ -19,6 +19,7 @@ class LostPasswordForm extends MemberLoginForm
* Create a single EmailField form that has the capability
* of using the MemberLoginForm Authenticator
*
* @skipUpgrade
* @return FieldList
*/
public function getFormFields()

View File

@ -5,7 +5,6 @@ namespace SilverStripe\Security\MemberAuthenticator;
use InvalidArgumentException;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Core\Extensible;
use SilverStripe\Dev\Debug;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Authenticator;
use SilverStripe\Security\DefaultAdminService;
@ -49,6 +48,7 @@ class MemberAuthenticator implements Authenticator
/**
* Attempt to find and authenticate member if possible from the given data
*
* @skipUpgrade
* @param array $data Form submitted data
* @param ValidationResult $result
* @param Member $member This third parameter is used in the CMSAuthenticator(s)

View File

@ -119,6 +119,7 @@ class MemberLoginForm extends BaseLoginForm
/**
* Build the FieldList for the login form
*
* @skipUpgrade
* @return FieldList
*/
protected function getFormFields()

View File

@ -777,6 +777,7 @@ class Security extends Controller implements TemplateGlobalProvider
/**
* Aggregate tabbed forms from each handler to fragments ready to be rendered.
*
* @skipUpgrade
* @param array $results
* @return array
*/

View File

@ -9,6 +9,7 @@ if (!getenv('SS_ENVIRONMENT_TYPE')) {
$loader->setEnvironmentVariable('SS_ENVIRONMENT_TYPE', 'dev');
}
/** @skipUpgrade */
if (!getenv('SS_DATABASE_CLASS') && !getenv('SS_DATABASE_USERNAME')) {
// The default settings let us define the database config via environment vars
// Database connection, including PDO and legacy ORM support

View File

@ -83,6 +83,9 @@ class RSSFeedTest extends SapphireTest
);
}
/**
* @skipUpgrade
*/
public function testRenderWithTemplate()
{
$rssFeed = new RSSFeed(new ArrayList(), "", "", "");
@ -99,7 +102,7 @@ class RSSFeedTest extends SapphireTest
protected function setUp()
{
parent::setUp();
Config::inst()->update(Director::class, 'alternate_base_url', '/');
Config::modify()->set(Director::class, 'alternate_base_url', '/');
if (!self::$original_host) {
self::$original_host = $_SERVER['HTTP_HOST'];
}

View File

@ -27,6 +27,7 @@ use SilverStripe\Versioned\Versioned;
* @todo tests for addStaticVars()
* @todo tests for setting statics which are not defined on the object as built-in PHP statics
* @todo tests for setting statics through extensions (#2387)
* @skipUpgrade
*/
class ObjectTest extends SapphireTest
{

View File

@ -9,6 +9,9 @@ use SilverStripe\Forms\RequiredFields;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\FieldType\DBDatetime;
/**
* @skipUpgrade
*/
class DateFieldTest extends SapphireTest
{
protected function setUp()

View File

@ -9,6 +9,7 @@ use SilverStripe\Versioned\Versioned;
/**
* Edit controller for this form
* @skipUpgrade
*/
class TestController extends Controller
{

View File

@ -12,6 +12,9 @@ use SilverStripe\Forms\FormRequestHandler;
use SilverStripe\Forms\Tests\FormRequestHandlerTest\TestForm;
use SilverStripe\Forms\Tests\FormRequestHandlerTest\TestFormRequestHandler;
/**
* @skipUpgrade
*/
class FormRequestHandlerTest extends SapphireTest
{
public function testCallsActionOnFormHandler()

View File

@ -15,6 +15,9 @@ use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\PopoverField;
/**
* @skipUpgrade
*/
class FormSchemaTest extends SapphireTest
{
protected function setUp()

View File

@ -13,6 +13,9 @@ use SilverStripe\Forms\Tests\GridField\GridFieldTest\Player;
use SilverStripe\Forms\Tests\GridField\GridFieldTest\Team;
use SilverStripe\ORM\ArrayList;
/**
* @skipUpgrade
*/
class GridFieldAddExistingAutocompleterTest extends FunctionalTest
{

View File

@ -17,9 +17,11 @@ use SilverStripe\Forms\Tests\GridField\GridFieldDetailFormTest\GroupController;
use SilverStripe\Forms\Tests\GridField\GridFieldDetailFormTest\PeopleGroup;
use SilverStripe\Forms\Tests\GridField\GridFieldDetailFormTest\Person;
/**
* @skipUpgrade
*/
class GridFieldDetailFormTest extends FunctionalTest
{
protected static $fixture_file = 'GridFieldDetailFormTest.yml';
protected static $extra_dataobjects = array(

View File

@ -14,6 +14,9 @@ use SilverStripe\Forms\GridField\GridFieldEditButton;
use SilverStripe\Forms\GridField\GridFieldToolbarHeader;
use SilverStripe\Forms\TextField;
/**
* @skipUpgrade
*/
class CategoryController extends Controller implements TestOnly
{
private static $allowed_actions = array('Form');

View File

@ -12,6 +12,9 @@ use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldEditButton;
use SilverStripe\Forms\GridField\GridFieldToolbarHeader;
/**
* @skipUpgrade
*/
class GroupController extends Controller implements TestOnly
{

View File

@ -13,6 +13,9 @@ use SilverStripe\Forms\GridField\GridFieldEditButton;
use SilverStripe\Forms\GridField\GridFieldToolbarHeader;
use SilverStripe\Forms\GridField\GridFieldViewButton;
/**
* @skipUpgrade
*/
class TestController extends Controller implements TestOnly
{
public function __construct()

View File

@ -6,6 +6,9 @@ use SilverStripe\ORM\FieldType\DBClassName;
use SilverStripe\ORM\DataObject;
use SilverStripe\Dev\SapphireTest;
/**
* @skipUpgrade
*/
class DBClassNameTest extends SapphireTest
{

View File

@ -6,6 +6,9 @@ use SilverStripe\ORM\FieldType\DBMoney;
use SilverStripe\ORM\DataObject;
use SilverStripe\Dev\SapphireTest;
/**
* @skipUpgrade
*/
class DBCompositeTest extends SapphireTest
{

View File

@ -2,15 +2,15 @@
namespace SilverStripe\ORM\Tests;
use PHPUnit_Framework_Error_Notice;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\i18n\i18n;
use SilverStripe\ORM\FieldType\DBDate;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\DataObject;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Security\Member;
use SilverStripe\ORM\FieldType\DBField;
/**
* @skipUpgrade
*/
class DBDateTest extends SapphireTest
{
protected $oldError = null;

View File

@ -5,6 +5,9 @@ namespace SilverStripe\ORM\Tests\DataExtensionTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataExtension;
/**
* @skipUpgrade
*/
class PlayerExtension extends DataExtension implements TestOnly
{

View File

@ -21,6 +21,9 @@ use SilverStripe\ORM\Tests\DataObjectTest\TeamComment;
use SilverStripe\ORM\Tests\DataObjectTest\ValidatedObject;
use SilverStripe\ORM\Tests\DataObjectTest\Staff;
/**
* @skipUpgrade
*/
class DataListTest extends SapphireTest
{

View File

@ -9,6 +9,9 @@ use SilverStripe\ORM\Connect\MySQLiConnector;
use SilverStripe\ORM\Queries\SQLUpdate;
use SilverStripe\Dev\SapphireTest;
/**
* @skipUpgrade
*/
class MySQLDatabaseTest extends SapphireTest
{

View File

@ -8,9 +8,11 @@ use SilverStripe\ORM\Connect\PDOConnector;
use SilverStripe\ORM\Queries\SQLUpdate;
use SilverStripe\Dev\SapphireTest;
/**
* @skipUpgrade
*/
class PDODatabaseTest extends SapphireTest
{
protected static $fixture_file = 'MySQLDatabaseTest.yml';
protected static $extra_dataobjects = array(

View File

@ -6,6 +6,9 @@ use SilverStripe\Control\Controller;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Security\BasicAuth;
/**
* @skipUpgrade
*/
class ControllerSecuredWithPermission extends Controller implements TestOnly
{

View File

@ -6,6 +6,9 @@ use SilverStripe\Control\Controller;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Security\BasicAuth;
/**
* @skipUpgrade
*/
class ControllerSecuredWithoutPermission extends Controller implements TestOnly
{

View File

@ -19,6 +19,9 @@ use SilverStripe\Security\MemberAuthenticator\MemberAuthenticator;
use SilverStripe\Security\MemberAuthenticator\MemberLoginForm;
use SilverStripe\Security\Security;
/**
* @skipUpgrade
*/
class MemberAuthenticatorTest extends SapphireTest
{

View File

@ -8,6 +8,9 @@ use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionCheckboxSetField;
use SilverStripe\Dev\SapphireTest;
/**
* @skipUpgrade
*/
class PermissionCheckboxSetFieldTest extends SapphireTest
{
protected static $fixture_file = 'PermissionCheckboxSetFieldTest.yml';

View File

@ -8,6 +8,9 @@ use SilverStripe\Security\PermissionCheckboxSetField;
use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\SapphireTest;
/**
* @skipUpgrade
*/
class PermissionTest extends SapphireTest
{

View File

@ -22,6 +22,8 @@ use SilverStripe\Security\SecurityToken;
/**
* Test the security class, including log-in form, change password form, etc
*
* @skipUpgrade
*/
class SecurityTest extends FunctionalTest
{

View File

@ -5,6 +5,9 @@ namespace SilverStripe\Security\Tests\SecurityTest;
use SilverStripe\Control\Controller;
use SilverStripe\Dev\TestOnly;
/**
* @skipUpgrade
*/
class NullController extends Controller implements TestOnly
{

View File

@ -7,6 +7,9 @@ use SilverStripe\Dev\TestOnly;
use SilverStripe\Security\Permission;
use SilverStripe\Security\Security;
/**
* @skipUpgrade
*/
class SecuredController extends Controller implements TestOnly
{
private static $allowed_actions = array('index');

View File

@ -17,6 +17,7 @@ use SilverStripe\Control\SimpleResourceURLGenerator;
/**
* @todo Test that order of combine_files() is correct
* @todo Figure out how to clear the modified state of Requirements class - might affect other tests.
* @skipUpgrade
*/
class RequirementsTest extends SapphireTest
{

View File

@ -32,6 +32,9 @@ use SilverStripe\View\Tests\SSViewerTest\SSViewerTestModel;
use SilverStripe\View\Tests\SSViewerTest\SSViewerTestModelController;
use SilverStripe\View\ViewableData;
/**
* @skipUpgrade
*/
class SSViewerTest extends SapphireTest
{

View File

@ -69,6 +69,9 @@ trait i18nTestManifest
*/
protected $originalLocale = null;
/**
* @skipUpgrade
*/
public function setupManifest()
{
// force SSViewer_DataPresenter to cache global template vars before we switch to the