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

Collect deprecated methods/classes to be removed in 3.0 #13199

Closed
Jako opened this issue Nov 27, 2016 · 41 comments
Closed

Collect deprecated methods/classes to be removed in 3.0 #13199

Jako opened this issue Nov 27, 2016 · 41 comments
Assignees
Labels
area-core proposal Proposal about improvement aka RFC. Need to be discussed before start implementation.
Milestone

Comments

@Jako
Copy link
Collaborator

Jako commented Nov 27, 2016

Summary

Collect deprecated methods/classes to be removed in 3.0 in the MODX core code and add logging code in those methods/classes.

This should be done before the release of 2.6 to have some warning time for extra authors.

This issue could be used to collect those methods/classes. Please add the methods/classes with the filename, classname and method name in a new comment.

Filename Classname Method
core/model/modx/rest/modrestclient.class.php modRestClient -
core/model/modx/rest/modrestcurlclient.class.php modRestCurlClient -
core/model/modx/rest/modrestserver.class.php modRestServer -
core/model/modx/rest/modrestsockclient.class.php modRestSockClient -
core/xpdo/xpdo.class.php xPDO toJson
core/xpdo/xpdo.class.php xPDO fromJson

modRestClient is used in core for Package Management. So the core methods have to be changed to use modRestService or the deprecated notice has to be removed.

Unsure:

Filename Classname Method Reason
core/model/modx/rest/modrest.class.php modRest - Is it replaced by modRestService?

Update (19/10/2021): I've gone through the topic and marked all things that have been addressed as crossed off. If not crossed off, that means it may require further discussion. ^Mark

@Jako Jako added this to the v2.6.0 milestone Nov 27, 2016
@Jako Jako added area-core proposal Proposal about improvement aka RFC. Need to be discussed before start implementation. urgent The issue requires attention and has higher priority over others. labels Nov 27, 2016
@Mark-H
Copy link
Collaborator

Mark-H commented Nov 27, 2016

I didn't realise the modRest utils were going to be removed? Got a source for that, or are you just proposing we do?

@Mark-H Mark-H removed the urgent The issue requires attention and has higher priority over others. label Nov 27, 2016
@Jako
Copy link
Collaborator Author

Jako commented Nov 27, 2016

All the classes mentioned above have a line like this:
https://github.com/modxcms/revolution/blob/2.x/core/model/modx/rest/modrestclient.class.php#L11

modRestService, modRestController etc. are not touched by this.

@Mark-H
Copy link
Collaborator

Mark-H commented Nov 28, 2016

Ah.. don't think I noticed that before :D Makes me wonder what other code we have that is marked as deprecated in that way from years ago, and how we feel about those things today. Some deprecations will be logical as things are refactored, but there might also be things that we want to take out just because it's not something MODX should provide.

@Jako
Copy link
Collaborator Author

Jako commented Nov 28, 2016

The classes of the first table seemed to be improved a lot in modRestService, so they could be deprecated. But I have no code using these classes, so I am maybe wrong.

@Jako
Copy link
Collaborator Author

Jako commented Jan 2, 2017

modRestClient is used in core. ^Mark: Not anymore!

@Jako
Copy link
Collaborator Author

Jako commented Jan 2, 2017

According to @theboxer the S3 Media Source code in the core can't be upgraded to the newest S3 API. So that part should be marked as deprecated. ^Mark: Has been upgraded to Flysystem 2.

@OptimusCrime
Copy link
Contributor

OptimusCrime commented Jan 2, 2017

Can't as in the S3 Media Source library dependency has changed, or some other reason? Does the S3 Media Source require some adjustments or a rewrite? ^Mark: has been addressed.

@Jako
Copy link
Collaborator Author

Jako commented Jan 2, 2017

There is an extra package available: https://github.com/modxcms/aws-s3-media-source

@Mark-H
Copy link
Collaborator

Mark-H commented Jan 30, 2017

@opengeek mentioned on the MAB call that he had a list of "hundreds" deprecations.

@whitebyte
Copy link

whitebyte commented Jan 31, 2017

Consider adding $modx->toJSON to the list. Can't recall when I've seen PHP withiut JSON enabled by default. ^Mark: as that's part of xPDO, I've created an issue there: modxcms/xpdo#212

@OptimusCrime
Copy link
Contributor

OptimusCrime commented Jan 31, 2017

I agree @whitebyte . That method made sense in the past, but no longer. ^Mark: see above

@Mark-H
Copy link
Collaborator

Mark-H commented Mar 30, 2017

The ability to use flat file processors (2.1-style) should also be removed in 3.0, in favour of the class based processors only. I believe that logic is located in the modConnectorRequest and/or modConnectorResponse class. ^Mark: Done!

@opengeek opengeek modified the milestones: v2.6.0, v2.7.0 Oct 16, 2017
@gpsietzema
Copy link
Contributor

gpsietzema commented Apr 23, 2018

System settings to be removed: ^Mark: have been removed!

  • filemanager_url
  • filemanager_url_relative

screen shot 2018-04-23 at 11 58 23

@JoshuaLuckers
Copy link
Contributor

JoshuaLuckers commented Jun 10, 2018

Are we still going to remove those in 3.x? ^Mark: yes, we did!

@meshkov
Copy link
Contributor

meshkov commented Jun 26, 2018

System setting to remove "server_protocol" #13269 ^Mark: removed!

@Mark-H
Copy link
Collaborator

Mark-H commented Nov 2, 2018

#14057 removes the legacy contentType (not content_type), should be documented/marked as deprecated in 2.7. ^Mark: replaced with #15822

@alroniks
Copy link
Collaborator

alroniks commented Nov 8, 2018

I guess modparser095.class.php yet one candidate for deleting in 3.0 ^Mark: it's gone!

@Mark-H
Copy link
Collaborator

Mark-H commented Nov 8, 2018

I'd be in favour of removing that as well. It probably makes sense to also remove modTranslate095 and modTranslator in that case, which is the only core usage of modParser095 and designed as a one-time conversion utility. The only usage of modParser095 that I can find is Provisioner, which could be updated to include its own copy of the parser class if there's still demand for that. ^Mark: all gone!

@Jako
Copy link
Collaborator Author

Jako commented Nov 12, 2018

modClassMap is deprecated with 2.2. I am not sure, if that could be logged. Would $xpdo contain $modx methods in __construct? ^Mark: removed!

@JoshuaLuckers
Copy link
Contributor

"Role" in "Access Control Lists". In my opinion, it is not used by anyone, and it is not clear how it works :)

Why do you think it's not being used by anyone? There are a lot of features in MODX you and I might not use because we don't know about them or don't understand them, that doesn't mean they are not being used.

See for more info about Roles the docs.

@ghost
Copy link

ghost commented Jul 5, 2020

Well, it would take a complete reworking of the entire permissions system, including all the permissions checks to get rid of them, so it's not really worth the bother. Easy enough to simply ignore them, or else give everybody 0. Then those who do use them can continue to happily do so.

In some ways, they resemble contexts in that regard. Except for situations like multiple domains using a single Manager, you can get the basic resource structure to do anything that contexts can be used for.

@Ruslan-Aleev
Copy link
Collaborator

Ruslan-Aleev commented Aug 12, 2020

"Recent Resources" tab in the "Account" section.

recent_resources

This tab is superfluous in my opinion. Firstly, there is a widget on the "Home" section, and secondly, there is a section "Manager log" to which, by the way, the widget refers on the "Home" section.

@alroniks
Copy link
Collaborator

"Recent Resources" tab in the "Account" section.

But in the widget general information, when here only related to this specific user.

@Ruslan-Aleev
Copy link
Collaborator

Ruslan-Aleev commented Aug 13, 2020

But in the widget general information...

It's strange, is access control taken into account in the widget? For example, some user should not see some resources, but he will see all of them in the widget? And can he start editing? The same question to the "Manager log" section, there is a filter by users.

@Ruslan-Aleev
Copy link
Collaborator

... when here only related to this specific user.

If it works like that, then there is logic in it. Although, I thought that only the current user is shown in the widget.

@alroniks
Copy link
Collaborator

In both cases, it calls GetRecentlyEditedResources processor with limit by the current user.

@wshawn
Copy link

wshawn commented Oct 22, 2020

Flash in the manager. Not a method / class, but it needs to be added to the list for removal.

@JoshuaLuckers
Copy link
Contributor

Flash in the manager. Not a method / class, but it needs to be added to the list for removal.

Can you be more specific? I believe the swf files are removed already.

@wshawn
Copy link

wshawn commented Oct 28, 2020

/manager/assets/ext3/resources {expressinstall.swf, charts.swf}
/core/packages/core/MODX/Revolution

Also in the packages:
/core/packages/core/MODX/Revolution/modContext/e74fa3f7bc1acb8b732de8e70427c6e4/0/assets/ext3/resources

The affects MODX 2 and MODX 3. Firefox throws a warning (in the address bar) to use the outdated version of Flash. As I do not have Flash installed.

I believe they are called in /manager/assets/ext3/ {ext-all-debug.js, exct-all.js} :

Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.8.2/build/charts/assets/charts.swf';
...

Ext.FlashComponent.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf';

@JoshuaLuckers
Copy link
Contributor

Good catch, those are ExtJS dependencies and I'm not sure if we can remove them.

@wshawn
Copy link

wshawn commented Oct 28, 2020

I heard at one point, that sites running any Flash will be actively blocked by Chrome. If that is the case, that would be a huge problem.

@Jako
Copy link
Collaborator Author

Jako commented Oct 28, 2020

If we don't use the 'chart', 'piechart', 'cartesianchart' and the derived xtypes, we are safe. The code of those components could be stripped away in ext-all-debug.js and be minified again in ext-all.js

@ghost
Copy link

ghost commented Dec 3, 2020

Having two "deprecated" errors every time you use the Installer is just annoying, and embarrassing that it should still be an issue after four years. Is there someone, anyone, who can look at it and see if, at the least, the errors can be removed? Are they actually not working correctly? Are they actually going to be removed in MODX 3? ^Mark: deprecated logging has been removed to a separate table so package installer wont show them anymore #15002

@Ruslan-Aleev
Copy link
Collaborator

By the way, there is also a "Recent Documents" tab in "System Information" section, in addition to #13199 (comment)

@Mark-H
Copy link
Collaborator

Mark-H commented Oct 19, 2021

I've gone through the topic and edited everyone's comments to cross things off that have been addressed. Only a few things remain which I don't think are necessarily blockers for beta, or need more discussion to reach a consensus. I've removed importing resources in the process, and opened an issue in the xPDO repository about toJSON/fromJSON.

I'm tempted to close the issue now (and request others to open new issues for things we should further cleanup) but will leave it open a little longer.

@opengeek opengeek modified the milestones: v3.0.0-alpha3, v3.0.0-beta1 Oct 27, 2021
@opengeek opengeek modified the milestones: v3.0.0-beta1, v3.0.0-beta2 Nov 9, 2021
@opengeek opengeek modified the milestones: v3.0.0-beta2, v3.0.0-rc1 Nov 23, 2021
@Mark-H Mark-H closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core proposal Proposal about improvement aka RFC. Need to be discussed before start implementation.
Projects
None yet
Development

No branches or pull requests