Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.Problem/Motivation
The message property is not currently defined as a property on the migrate executable. As such is is provided as a public property. This is sort of a defacto API since the executable is injected into most signatures and it provides a way to provide migrate messages.
Proposed resolution
Add the property so PHP can do its property optimizations and IDE's can see the documentations.
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | interdiff.txt | 524 bytes | arturs.v |
| #25 | 2778445-25.patch | 716 bytes | arturs.v |
| #20 | 2778445-19.patch | 643 bytes | anish.a |
Comments
Comment #3
neclimdulApparently we have to rely on MigrateExecutable to get the messaging object into a bunch of places where we don't explicitly supply it in the interface. Its not a service on the container so there isn't much we can do without refatoring a bunch our APIs... Public it is.
Comment #4
heddnWhy public? Can we use protected? Or explain why it is public?
Comment #6
Charlotte17 commentedChanged a file public function to protected in #3
Comment #7
heddnI'm going to assume this comes back green.
Comment #9
mikeryanSo, an issue summary would have helped... The point is that the public $message is actually being accessed from outside the executable, and this issue is merely trying to document it. The real problem is that the lower-level APIs are trying to talk directly to the front-end via the message interface, which they shouldn't - that should be the executable's job - but, it's not personally a priority to fix that right at this point.
Comment #10
mikeryanOh, didn't even notice it failed to apply, I was expecting test errors (which I still expect to see if rerolled to apply).
And, looking at the patches - it seems they're backwards - the real patch is labelled as the interdiff and vice versa.
Comment #11
neclimdulComment #12
neclimdulThat comment summary looks like its full of lies. The patch from #3still applies so I was hiding the other patches and providing the requested summary.
Comment #13
heddnComment #14
Charlotte17 commentedThank you neclimdul for correcting error
Comment #15
neclimdulNo problem. It was my fault for not writing the summary.
Comment #16
neclimdulComment #17
alexpottSo let's do this properly keep it public but add a @todo pointing to another issue to make it protected and add an @deprecated saving this is going to be made protected and tell the user which methods on the migrate executable to use.
Comment #18
imiksuPatch isn't applying against 8.3.x. Seems also like an novice issue.
Comment #19
anish.a commentedI have re rolled the patch for 8.3.x.
If I can get the issue number mentioned in #17 , I can update the patch with
@todoand@deprecatedtags.Comment #20
anish.a commentedUploading patch again as tests are not working
Comment #21
anish.a commentedComment #22
imiksuLets try to review this today.
Comment #23
imiksuRerolled! Now, comments in #17 still apply.
Comment #24
imiksuFollow up created in: #2822663: Convert MigrateExecutable::$message to protected property
Comment #25
arturs.v commentedI`m assuming that @deprecated tag is going to get added by the followup issue. We however didn`t find which method to use instead. @alexpott can you specify?
A.
Comment #26
biguzis commentedComment #27
mikeryanRight, it makes sense to add the @deprecated when we have the preferred method to point to (in the followup).
This looks good, thanks!
Comment #28
alexpottCommitted and pushed 4471e30 to 8.3.x and abb08c9 to 8.2.x. Thanks!
Swapping this around to make it more like other @todo's and I just prefer it :)