Comments

benjy’s picture

Status: Active » Needs review
StatusFileSize
new189.32 KB

Partial patch and a work in progress. Just gonna take advantage of the d.org test bot.

module_list
module_implements
drupal_alter
module_exists
module_hook

Status: Needs review » Needs work
dawehner’s picture

It seems to be helpful to not convert all at once, as this patch has the potential to have to be rerolled A LOT OF times.

#1895266: Convert views to use the ModuleHandler is one of those conversion issues. Catch explained there, that we maybe better wait on #1875086: Improve DX of drupal_container()->get()

benjy’s picture

@dawehner, yes I agree. I had to re-roll it twice in the time it took me to get it uploaded :)

Also I asked on IRC about #1875086 and someone said it wouldn't make a difference.

What do you think is the best approach from here? Hold off for a little longer or create 1 patch per function and keep re-rolling? Ideally I'd create the patches and we could get them in ASAP so we didn't have to keep re-rolling.

On a side note though module_invoke_* functions have a new prototype hence find and replace isn't possible. It may be worth writing a script to handle this for us.

Crell’s picture

First, yes, wait on #1875086: Improve DX of drupal_container()->get() because that issue intends to remove drupal_container() entirely.

Second, I'd then spin up, probably, an issue per module or something like that. Keep the changes localized, so they're easy to parallelize, easy to reroll, and are less fragile. Those are then easily Novice-able tasks, which means we can feed them to Core Office Hours to help onboard people.

benjy’s picture

Status: Needs work » Postponed

@Crell, that sounds good to me. I'll set this ticket to postponed until #1875086: Improve DX of drupal_container()->get() is finished.

cosmicdreams’s picture

Status: Postponed » Active

That issue is resolved now so let's reopen this for the TC Core Sprint.

benjy’s picture

Title: Replace module_* deprecated function calls. » [META] Replace module_* deprecated function calls.
benjy’s picture

I've created an issue per function after discussion on IRC. If we can get the patches reviewed nice and quick hopefully we won't have to re-roll so much.

Do we want to remove the function definitions in the same patch or should we have a follow up for that as well?

Crell’s picture

If we're breaking it up by function, remove in the same patch. That way we can easily see if we missed a spot because we'll get a fatal function not found error. :-)

benjy’s picture

Crell, that makes sense to me however I spoke with catch about it on IRC last night and he suggested to leave the functions in core as to not make any API changes with these patches?

I don't mind which we do but let's make them all the same :)

tim.plunkett’s picture

I would remove the functions when rolling the patches to help ensure you got everything perfect, but when rolling the final patch for commit, re-add it back in as a wrapper with @deprecated.

sam152’s picture

As per your suggestion Tim, I have left the deprecated function in the source of my module_exists patch. If the patch can be reviewed and committed, that would be sweet.

sam152’s picture

Issue summary: View changes

Added sub issues.

alexpott’s picture

Issue summary: View changes

Updated issue summary.

sun’s picture

Issue summary: View changes
Issue tags: +@deprecated
ianthomas_uk’s picture

Issue summary: View changes
ParisLiakos’s picture

Title: [META] Replace module_* deprecated function calls. » Remove module_* deprecated function calls.
Status: Active » Needs review
StatusFileSize
new10.75 KB

So, usages are removed, besides a few of module_uninstal(), but those are only in test files
this patch should be enough

Status: Needs review » Needs work

The last submitted patch, 16: drupal-remove_module_deprecated-1916134.patch, failed testing.

ParisLiakos’s picture

Title: Remove module_* deprecated function calls. » Remove module_* deprecated functions
Status: Needs work » Needs review
StatusFileSize
new10.58 KB

Output: [PHP Fatal error: Call to undefined function module_implements() in /opt/drush/includes/bootstrap.inc on line 895

Drush needs to be updated for module_implements(), so lets keep this there for now
Lets see what else

Status: Needs review » Needs work

The last submitted patch, 18: drupal-remove_module_deprecated-1916134-18.patch, failed testing.

ParisLiakos’s picture

Status: Needs work » Postponed
Related issues: +#2206501: Remove dependency on Drush from test reviews

Actually there is already an issue https://github.com/drush-ops/drush/issues/452
Lets postpone it on that

ParisLiakos’s picture

Issue summary: View changes
bfr’s picture

Status: Postponed » Needs review

I think i fixed all Drush issues so this can be reopened.

Status: Needs review » Needs work

The last submitted patch, 18: drupal-remove_module_deprecated-1916134-18.patch, failed testing.

ParisLiakos’s picture

i think we still need the drush version the testbot checks out updated as well..or this happened already, too?

bfr’s picture

Good question, I have no idea what version the testbot uses. However, I don't think there are any stable 7.x releases so I would guess it uses master. Maybe someone needs to go and do a manual pull.

ianthomas_uk’s picture

I'll leave a tell for jthorston, he maintains the test bots.

ParisLiakos’s picture

It uses 7.0.0-alpha1

bfr’s picture

Well, should we change the branch to master or wait for a release?

mile23’s picture

Issue tags: +Needs reroll

Patch in #18 doesn't apply, which is also why the test failed in #24.

$ git apply drupal-remove_module_deprecated-1916134-18.patch 
error: patch failed: core/includes/bootstrap.inc:1118
error: core/includes/bootstrap.inc: patch does not apply
error: patch failed: core/includes/module.inc:152
error: core/includes/module.inc: patch does not apply
error: core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php: No such file or directory
error: patch failed: core/modules/aggregator/src/Tests/UpdateFeedItemTest.php:73
error: core/modules/aggregator/src/Tests/UpdateFeedItemTest.php: patch does not apply
error: patch failed: core/modules/config/src/Tests/ConfigInstallWebTest.php:71
error: core/modules/config/src/Tests/ConfigInstallWebTest.php: patch does not apply
error: core/modules/system/src/Tests/Entity/EntityApiInfoTest.php: No such file or directory
error: patch failed: core/modules/system/src/Tests/Form/LanguageSelectElementTest.php:81
error: core/modules/system/src/Tests/Form/LanguageSelectElementTest.php: patch does not apply
error: patch failed: core/modules/system/src/Tests/Module/ClassLoaderTest.php:50
error: core/modules/system/src/Tests/Module/ClassLoaderTest.php: patch does not apply
error: patch failed: core/modules/system/src/Tests/Module/UninstallTest.php:36
error: core/modules/system/src/Tests/Module/UninstallTest.php: patch does not apply
error: patch failed: core/modules/taxonomy/src/Tests/VocabularyCrudTest.php:196
error: core/modules/taxonomy/src/Tests/VocabularyCrudTest.php: patch does not apply
ianthomas_uk’s picture

Status: Needs work » Fixed

That's because the functions have been removed in other issues.

mile23’s picture

Issue tags: -Needs reroll

Nice. :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.