Files: 
CommentFileSizeAuthor
#9 examples_cron-example_1867662-9.patch13.61 KBwesleydv
PASSED: [[SimpleTest]]: [MySQL] 163 pass(es).
[ View ]
#7 examples_cron-example_1867662-7.patch13.6 KBwesleydv
PASSED: [[SimpleTest]]: [MySQL] 163 pass(es).
[ View ]
#6 1867662-6.patch11.8 KBmarvil07
FAILED: [[SimpleTest]]: [MySQL] 147 pass(es), 13 fail(s), and 6 exception(s).
[ View ]
#1 0001-Port-cron_example-to-D8.patch12.44 KBmarvil07
PASSED: [[SimpleTest]]: [MySQL] 35 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new12.44 KB
PASSED: [[SimpleTest]]: [MySQL] 35 pass(es).
[ View ]

Here a first functional version!

Please let me know what more needed here.

Assigned:marvil07» Unassigned

Thanks, marvil07.

+++ b/cron_example/cron_example.moduleundefined
@@ -0,0 +1,250 @@
+/**
+ * Implements hook_cron().
+ *
+ * hook_cron() is the traditional (pre-Drupal 7) hook for doing "background"
+ * processing. It gets called every time the Drupal cron runs and must decide
+ * what it will do.

Many references to Drupal 7.

Adopting the structure of a D8 module is great (with lib directory, etc.), but the documentation needs some editorial attention as well.

Status:Needs review» Postponed

You're welcome to submit more patches, but we're holding off on D8 a bit: #1861598: Examples for Drupal 8 needs relatively stable feature set

Status:Postponed» Needs work

StatusFileSize
new11.8 KB
FAILED: [[SimpleTest]]: [MySQL] 147 pass(es), 13 fail(s), and 6 exception(s).
[ View ]

minor re-roll with info file to yml, still needs real changes

Status:Needs work» Needs review
StatusFileSize
new13.6 KB
PASSED: [[SimpleTest]]: [MySQL] 163 pass(es).
[ View ]

Rewrote the patch to use a form controller and new Drupal 8 function like config mgmt

Status:Needs review» Needs work

+++ b/cron_example/cron_example.moduleundefined
@@ -0,0 +1,120 @@
+ * hook_cron_queue_info() and family are new since Drupal 7, and allow any

hook_cron_queue_info should be hook_queue_info and the comment needs updating as this is a new hook in D8.

+++ b/cron_example/lib/Drupal/cron_example/Forms/CronExampleForm.phpundefined
@@ -0,0 +1,176 @@
+ * Contains \Drupal\cron_example\Form\CronExampleForm.

No full stop on contains

+++ b/cron_example/lib/Drupal/cron_example/Forms/CronExampleForm.phpundefined
@@ -0,0 +1,176 @@
+ * Defines a form to configure maintenance settings for this site.

This comment is a little odd

+++ b/cron_example/lib/Drupal/cron_example/Forms/CronExampleForm.phpundefined
@@ -0,0 +1,176 @@
+      '%time' => date_iso8601(variable_get('cron_example_next_execution', time())),
+      '%seconds' => variable_get('cron_example_next_execution', time()) - time(),

Shouldn't these be got from $config->get()

+++ b/cron_example/lib/Drupal/cron_example/Forms/CronExampleForm.phpundefined
@@ -0,0 +1,176 @@
\ No newline at end of file

no newline at end of file?

Status:Needs work» Needs review
StatusFileSize
new13.61 KB
PASSED: [[SimpleTest]]: [MySQL] 163 pass(es).
[ View ]

Fixed issues raised by tsphethean

@wesleydv: Thanks for the new patch implementing new APIs!

I will try to make a closer look as soon as I fix the tests for other submodules already added to 8.x-1.x, so your patch can be tested by testbot. I only could fix block_example today.

Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

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

Issue summary:View changes

Note: This module is now very broken because it relies on variable_set().

#2197267: Remove variable_set()/variable_get() from cron_example