Skip to content

Commit

Permalink
MNT Remove TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Oct 30, 2023
1 parent cf78a9d commit 56511c8
Show file tree
Hide file tree
Showing 114 changed files with 5 additions and 378 deletions.
2 changes: 0 additions & 2 deletions sake
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ if [ "$1" = "-start" ]; then
url=$3
fi

# TODO: Give a globally unique processname by including the projectname as well
processname=$2

daemon -n $processname -r -D $base --pidfile=$pidfile --stdout=$outlog --stderr=$errlog $sake $url
Expand All @@ -105,7 +104,6 @@ if [ "$1" = "-stop" ]; then
if [ -f $pidfile ]; then
echo "Stopping service $2"

# TODO: This is a bad way of killing the process
kill -KILL `cat $pidfile`
unlink $pidfile
else
Expand Down
6 changes: 0 additions & 6 deletions src/Control/ContentNegotiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
*
* Please see http://webkit.org/blog/68/understanding-html-xml-and-xhtml/ for further information.
*
* @todo Check for correct XHTML doctype in xhtml()
* @todo Allow for other HTML4 doctypes (e.g. Transitional) in html()
* @todo Make content replacement and doctype setting two separately configurable behaviours
*
* Some developers might know what they're doing and don't want ContentNegotiator messing with their
* HTML4 doctypes, but still find it useful to have self-closing tags removed.
*/
Expand Down Expand Up @@ -169,8 +165,6 @@ public static function process(HTTPResponse $response)
* <input>, checked, selected).
*
* @param HTTPResponse $response
*
* @todo Search for more xhtml replacement
*/
public function xhtml(HTTPResponse $response)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Control/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ public function setRequest(HTTPRequest $request): static
/**
* A bootstrap for the handleRequest method
*
* @todo setDataModel and setRequest are redundantly called in parent::handleRequest() - sort this out
*
* @param HTTPRequest $request
*/
protected function beforeHandleRequest(HTTPRequest $request)
Expand Down
4 changes: 0 additions & 4 deletions src/Control/CookieJar.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
* This backend allows one to better test Cookie setting and separate cookie
* handling from the core
*
* @todo Create a config array for defaults (eg: httpOnly, secure, path, domain, expiry)
* @todo A getter for cookies that haven't been sent to the browser yet
* @todo Tests / a way to set the state without hacking with $_COOKIE
* @todo Store the meta information around cookie setting (path, domain, secure, etc)
*/
class CookieJar implements Cookie_Backend
{
Expand Down
1 change: 0 additions & 1 deletion src/Control/HTTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public static function urlRewriter($content, $code)
$regExps[] = "/(<{$tagPrefix}[^>]*$attrib *= *)([^\"' ]*)( )/i";
}
// Replace css styles
// @todo - http://www.css3.info/preview/multiple-backgrounds/
$styles = ['background-image', 'background', 'list-style-image', 'list-style', 'content'];
foreach ($styles as $style) {
$regExps[] = "/($style:[^;]*url *\\(\")([^\"]+)(\"\\))/i";
Expand Down
2 changes: 0 additions & 2 deletions src/Control/Middleware/HTTPCacheControlMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
/**
* Generate response for the given request
*
* @todo Refactor HTTP::add_cache_headers() (e.g. etag handling) into this middleware
*
* @param HTTPRequest $request
* @param callable $delegate
* @return HTTPResponse
Expand Down
3 changes: 0 additions & 3 deletions src/Control/RSS/RSSFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* RSSFeed class
*
* This class is used to create an RSS feed.
* @todo Improve documentation
*/
class RSSFeed extends ViewableData
{
Expand Down Expand Up @@ -215,8 +214,6 @@ public function Description()
/**
* Output the feed to the browser.
*
* TODO: Pass $response object to ->outputToBrowser() to loosen dependence on global state for easier testing/prototyping so dev can inject custom HTTPResponse instance.
*
* @return DBHTMLText
*/
public function outputToBrowser()
Expand Down
2 changes: 0 additions & 2 deletions src/Control/RequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ public function handleRequest(HTTPRequest $request)
// We used to put "handleAction" as the action on controllers, but (a) this could only be called when
// you had $Action in your rule, and (b) RequestHandler didn't have one. $Action is better
if ($action == 'handleAction') {
// TODO Fix LeftAndMain usage
// Deprecation::notice('3.2.0', 'Calling handleAction directly is deprecated - use $Action instead');
$action = '$Action';
}

Expand Down
1 change: 0 additions & 1 deletion src/Control/SimpleResourceURLGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ protected function resolveModuleResource(ModuleResource $resource)
// All resources mapped directly to _resources/
$relativePath = Path::join(RESOURCES_DIR, $relativePath);
} elseif (stripos($relativePath ?? '', ManifestFileFinder::VENDOR_DIR . DIRECTORY_SEPARATOR) === 0) {
// @todo Non-public dir support will be removed in 5.0, so remove this block there
// If there is no public folder, map to _resources/ but trim leading vendor/ too (4.0 compat)
$relativePath = Path::join(
RESOURCES_DIR,
Expand Down
1 change: 0 additions & 1 deletion src/Core/BaseKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public function __construct($basePath)
$this->setModuleLoader($moduleLoader);

// Config loader
// @todo refactor CoreConfigFactory
$configFactory = new CoreConfigFactory($manifestCacheFactory);
$configManifest = $configFactory->createRoot();
$configLoader = ConfigLoader::inst();
Expand Down
4 changes: 0 additions & 4 deletions src/Core/ClassInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ public static function exists($class)
}

/**
* @todo Move this to SS_Database or DB
*
* @param string $tableName
* @return bool
*/
Expand Down Expand Up @@ -130,8 +128,6 @@ public static function getValidSubClasses($class = SiteTree::class, $includeUnba
* Returns an array of the current class and all its ancestors and children
* which require a DB table.
*
* @todo Move this into {@see DataObjectSchema}
*
* @param string|object $nameOrObject Class or object instance
* @return array
*/
Expand Down
1 change: 0 additions & 1 deletion src/Core/Convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ public static function symbol2sql($identifier, $separator = '.')
* Warning: Does not decode array keys
*
* @uses html2raw()
* @todo Currently &#xxx; entries are stripped; they should be converted
* @param mixed $val
* @return array|string
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Core/Extensible.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ public static function add_extension($classOrExtension, $extension = null)
* Clears any previously created singletons through {@link singleton()}
* to avoid side-effects from stale extension information.
*
* @todo Add support for removing extensions with parameters
*
* @param string $extension class name of an {@link Extension} subclass, without parameters
*/
public static function remove_extension($extension)
Expand Down
4 changes: 0 additions & 4 deletions src/Core/Injector/Injector.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,6 @@ protected function instantiate($spec, $id = null, $type = null)
/**
* Inject $object with available objects from the service cache
*
* @todo Track all the existing objects that have had a service bound
* into them, so we can update that binding at a later point if needbe (ie
* if the managed service changes)
*
* @param object $object
* The object to inject
* @param string $asType
Expand Down
5 changes: 0 additions & 5 deletions src/Dev/BulkLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
*
* You can configure column-handling,
*
* @todo Add support for adding/editing has_many relations.
* @todo Add support for deep chaining of relation properties (e.g. Player.Team.Stats.GoalCount)
* @todo Character conversion
*
* @see http://tools.ietf.org/html/rfc4180
* @author Ingo Schommer, Silverstripe Ltd. (<firstname>@silverstripe.com)
*/
Expand Down Expand Up @@ -217,7 +213,6 @@ public function Title()
* ]
* </code>
*
* @todo Mix in custom column mappings
*
* @return array
**/
Expand Down
2 changes: 0 additions & 2 deletions src/Dev/BulkLoader_Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
* Encapsulates the result of a {@link BulkLoader} import
* (usually through the {@link BulkLoader->processAll()} method).
*
* @todo Refactor to support lazy-loaded DataObjectSets once they are implemented.
*
* @author Ingo Schommer, Silverstripe Ltd. (<firstname>@silverstripe.com)
*/
class BulkLoader_Result implements \Countable
Expand Down
2 changes: 0 additions & 2 deletions src/Dev/CliDebugView.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
/**
* A basic HTML wrapper for stylish rendering of a development info view.
* Used to output error messages, and test results.
*
* @todo Perhaps DebugView should be an interface / ABC, implemented by HTMLDebugView and CliDebugView?
*/
class CliDebugView extends DebugView
{
Expand Down
2 changes: 0 additions & 2 deletions src/Dev/Constraint/ViewableDataContains.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ public function evaluate($other, $description = '', $returnResult = false): ?boo

/**
* Returns a string representation of the object.
*
* @todo: add representation for more than one match
*/
public function toString(): string
{
Expand Down
9 changes: 0 additions & 9 deletions src/Dev/CsvBulkLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
* input.
*
* @see http://tools.ietf.org/html/rfc4180
*
* @todo Support for deleting existing records not matched in the import
* (through relation checks)
*/
class CsvBulkLoader extends BulkLoader
{
Expand Down Expand Up @@ -160,9 +157,6 @@ protected function getNormalisedColumnMap()
}

/**
* @todo Better messages for relation checks and duplicate detection
* Note that columnMap isn't used.
*
* @param array $record
* @param array $columnMap
* @param BulkLoader_Result $results
Expand Down Expand Up @@ -261,7 +255,6 @@ protected function processRecord($record, $columnMap, &$results, $preview = fals
$obj->write();
}

// @todo better message support
$message = '';

// save to results
Expand Down Expand Up @@ -289,8 +282,6 @@ protected function processRecord($record, $columnMap, &$results, $preview = fals
* Find an existing objects based on one or more uniqueness columns
* specified via {@link self::$duplicateChecks}.
*
* @todo support $columnMap
*
* @param array $record CSV data column
* @param array $columnMap
* @return DataObject
Expand Down
4 changes: 0 additions & 4 deletions src/Dev/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
* Errors handled by this class are passed along to {@link SS_Log}.
* For configuration information, see the {@link SS_Log}
* class documentation.
*
* @todo add support for user defined config: Debug::die_on_notice(true | false)
* @todo better way of figuring out the error context to display in highlighted source
*/
class Debug
{
Expand Down Expand Up @@ -212,7 +209,6 @@ public static function require_developer_login()
// being called again.
// This basically calls Permission::checkMember($_SESSION['loggedInAs'], 'ADMIN');

// @TODO - Rewrite safely using DataList::filter
$memberID = $_SESSION['loggedInAs'];
$permission = DB::prepared_query(
'
Expand Down
5 changes: 0 additions & 5 deletions src/Dev/DevelopmentAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
*
* Configured in framework/_config/dev.yml, with the config key registeredControllers being
* used to generate the list of links for /dev.
*
* @todo documentation for how to add new unit tests and tasks
* @todo do we need buildDefaults and generatesecuretoken? if so, register in the list
* @todo cleanup errors() it's not even an allowed action, so can go
* @todo cleanup index() html building
*/
class DevelopmentAdmin extends Controller
{
Expand Down
3 changes: 0 additions & 3 deletions src/Dev/State/ExtensionTestState.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ public function setUpOnce($class)

public function tearDownOnce($class)
{
// @todo: This isn't strictly necessary to restore extensions, but only to ensure that
// Object::$extra_methods is properly flushed. This should be replaced with a simple
// flush mechanism for each $class.
/** @var string|DataObject $dataClass */

// Remove extensions added for testing
Expand Down
8 changes: 0 additions & 8 deletions src/Forms/CheckboxSetField.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,13 @@
* the database records.
* - If the field name matches a database field, a comma-separated list of values will be saved to that field. The
* keys can be text or numbers.
*
* @todo Document the different source data that can be used
* with this form field - e.g ComponentSet, ArrayList,
* array. Is it also appropriate to accept so many different
* types of data when just using an array would be appropriate?
*/
class CheckboxSetField extends MultiSelectField
{

protected $schemaDataType = FormField::SCHEMA_DATA_TYPE_MULTISELECT;

/**
* @todo Explain different source data that can be used with this field,
* e.g. SQLMap, ArrayList or an array.
*
* @param array $properties
* @return DBHTMLText
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Forms/CompositeField.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ public function getChildren()
* If the CompositeField doesn't have a name, but we still want the ID/name to be set.
* This code generates the ID from the nested children.
*
* @todo this is temporary, and should be removed when FormTemplateHelper is updated to handle ID for CompositeFields with no name
*
* @return String $name
*/
public function getName()
Expand Down
2 changes: 0 additions & 2 deletions src/Forms/CurrencyField.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* Limited to US-centric formats, including a hardcoded currency
* symbol and decimal separators.
* See {@link MoneyField} for a more flexible implementation.
*
* @todo Add localization support, see http://open.silverstripe.com/ticket/2931
*/
class CurrencyField extends TextField
{
Expand Down
2 changes: 0 additions & 2 deletions src/Forms/DefaultFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public function getForm(RequestHandler $controller = null, $name = FormFactory::
protected function getFormFields(RequestHandler $controller = null, $name, $context = [])
{
// Fall back to standard "getCMSFields" which itself uses the FormScaffolder as a fallback
// @todo Deprecate or formalise support for getCMSFields()
$fields = $context['Record']->getCMSFields();
$this->invokeWithExtensions('updateFormFields', $fields, $controller, $name, $context);
return $fields;
Expand All @@ -83,7 +82,6 @@ protected function getFormFields(RequestHandler $controller = null, $name, $cont
*/
protected function getFormActions(RequestHandler $controller = null, $name, $context = [])
{
// @todo Deprecate or formalise support for getCMSActions()
$actions = $context['Record']->getCMSActions();
$this->invokeWithExtensions('updateFormActions', $actions, $controller, $name, $context);
return $actions;
Expand Down
3 changes: 0 additions & 3 deletions src/Forms/FieldGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ public function __construct($titleOrField = null, $otherFields = null)
* Returns the name (ID) for the element.
* In some cases the FieldGroup doesn't have a title, but we still want
* the ID / name to be set. This code, generates the ID from the nested children
*
* TODO this is temporary, and should be removed when FormTemplateHelper is updated to handle ID
* for CompositeFields with no name
*/
public function getName()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Forms/FieldList.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ public function findTab($tabName)
/**
* Returns the specified tab object, creating it if necessary.
*
* @todo Support recursive creation of TabSets
*
* @param string $tabName The tab to return, in the form "Tab.Subtab.Subsubtab".
* Caution: Does not recursively create TabSet instances, you need to make sure everything
* up until the last tab in the chain exists.
Expand Down Expand Up @@ -462,8 +460,6 @@ public function findOrMakeTab($tabName, $title = null)
* Returns a named field.
* You can use dot syntax to get fields from child composite fields
*
* @todo Implement similarly to dataFieldByName() to support nested sets - or merge with dataFields()
*
* @param string $name
* @return FormField|null
*/
Expand Down
Loading

0 comments on commit 56511c8

Please sign in to comment.