Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMW 3.0 Remove depreciated function, class task list #1014

Closed
17 tasks done
kghbln opened this issue May 13, 2015 · 8 comments
Closed
17 tasks done

SMW 3.0 Remove depreciated function, class task list #1014

kghbln opened this issue May 13, 2015 · 8 comments

Comments

@kghbln
Copy link
Member

kghbln commented May 13, 2015

List potential functions, classes, or marked FIXED comments to be removed with SMW 3.0 to make use of the semver "make incompatible API changes" [0] policy.

  • It is expected that SMW 3.0 no longer supports MW 1.19 to 1.26 therefore remove all code that was introduced as compatibility layer
  • Drop PHP 5.3 and 5.4 support #698 / It is expected that SMW 3.0 requires at least PHP 5.4 (or PHP 5.5) therefore check callbacks/Closure for potential improvement in the use (local vs $this)

List of

These are definitely not used by SMW itself:

  • Remove ResultPrinter::m_params
  • Remove ResultPrinter::textDisplayParameters
  • Remove ResultPrinter::exportFormatParameters
  • Remove SMWQueryProcessor::processFunctionParams
  • Remove SMWQueryProcessor::getResultFromFunctionParams
  • Remove SMWQueryProcessor::getResultFromQueryString
  • Remove SMWResultArray::getNextObject
  • Remove SMWJsonResultPrinter class_alias

Notes

[0] http://semver.org/

wget http://get.sensiolabs.org/php-cs-fixer.phar
php php-cs-fixer.phar fix src/ --fixers=short_array_syntax
@kghbln kghbln added this to the SMW 3.0 milestone May 13, 2015
@kghbln kghbln changed the title Remove depreciated 'SEMANTIC_EXTENSION_TYPE' Remove depreciated SEMANTIC_EXTENSION_TYPE May 13, 2015
@mwjames mwjames changed the title Remove depreciated SEMANTIC_EXTENSION_TYPE SMW 3.0 Remove depreciated function, class task list May 13, 2015
@mwjames
Copy link
Contributor

mwjames commented May 13, 2015

@JeroenDeDauw @kghbln I made this into a 3.0 task list to get all old cruft removed otherwise trying to do this without a list will be pain. It further allows users/developers of extensions to track API changes more visibly before changes are made.

If you find a comment in the source, just list them here for reference.

@mwjames
Copy link
Contributor

mwjames commented May 15, 2015

Remove the Title object usage from objects and encapsulate it with DIWikiPage instead:

  • SQLStore and SPARQLStore which requires some changes to its public methods (delete / changeTitle etc.)
  • Subobject
  • ParserData ?

@joelkp
Copy link
Contributor

joelkp commented Jun 10, 2015

Here's additional things found by grepping the SMW source for "deprecated", "vanish" and "Vanish". At first I included the deprecation messages (many of which called for removal in 1.7, 1.10, etc.), but it grew rather long. So I boiled it down to the below list by topic.

Hope you find it useful - I thought this might be a simple contribution to make.

Classes

  • SMWParamFormat (includes/params/SMW_ParamFormat.php)

Class aliases:

  • Remove includes/dataitems/SMW_DI_String.php
  • SMWCsvResultPrinter (includes/queryprinters/CsvResultPrinter.php)
  • SMWJsonResultPrinter (includes/queryprinters/JsonResultPrinter.php)

Hooks

  • SMWSQLStore3::deleteSubjectBefore (includes/storage/SQLStore/SMW_SQLStore3_Writers.php)
  • SMWSQLStore3::deleteSubjectAfter (includes/storage/SQLStore/SMW_SQLStore3_Writers.php)
  • smwShowFactbox (src/Factbox/Factbox.php)
  • smwUpdatePropertySubjects (src/MediaWiki/Jobs/UpdateDispatcherJob.php)

Member methods and variables

  • Remove deprecated methods in SMWPropertyValue (includes/datavalues/SMW_DV_Property.php)
  • Remove SMWRecordValue::getDVs() (includes/datavalues/SMW_DV_Record.php)
  • Remove SMWTimeValue::getXMLSchemaDate() (includes/datavalues/SMW_DV_Time.php)
  • Remove deprecated methods in SMWWikiPageValue (includes/datavalues/SMW_DV_WikiPage.php)
  • Remove SMWDataValue::clearErrors() (includes/datavalues/SMW_DataValue.php) - noted as a todo and seems unused by all subclasses
  • Remove deprecated methods in SMWQueryProcessor (includes/query/SMW_QueryProcessor.php
  • Remove deprecated methods in SMW\RawResultPrinter (includes/queryprinters/RawResultPrinter.php)
  • Remove deprecated SMWQueryResult::getQueryLink() (includes/storage/SMW_QueryResult.php)
  • Remove deprecated $m_params and methods in SMW\ResultPrinter (includes/queryprinters/ResultPrinter.php)
  • Remove ValueDescription::getDataValue() (src/Query/Language/ValueDescription.php)

Other

  • Remove deprecated SMW_HEADER_* defines (includes/Defines.php) and deprecated support in SMWOutput::requireHeadItem() (includes/SMW_Outputs.php)
  • Remove deprecated TYPE_STRING (includes/dataitems/SMW_DataItems.php) and _str entries in SMW\DataTypeRegistry::initDatatypes() (src/DataTypeRegistry.php)

@JeroenDeDauw
Copy link
Member

Thanks all for compiling these lists. Really useful!

@JeroenDeDauw
Copy link
Member

Is there anything that will be a breaking change to the normal end user not yet in the list? So far I have just these things for my SMWCon presentation: MW compat break, PHP compat break, type NS removal, SemanticStatistics removal, maintenance script alias removal.

@mwjames
Copy link
Contributor

mwjames commented Jan 14, 2016

See #1371

mwjames referenced this issue Jul 4, 2016
@mwjames
Copy link
Contributor

mwjames commented Jul 4, 2016

Some extensions rely on certain interfaces/static methods therefore only a major release can be used to break the interface (those that use Composer will unlikely break because dependencies need to be updated manually)

  • SMWQueryProcessor
  • SMWStore
  • SMWExporter

ID related changes

Others

@JeroenDeDauw
Copy link
Member

PRs up for all the things that remained

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants