erisu commented on issue #1386:
URL: https://github.com/apache/cordova-docs/issues/1386#issuecomment-2560929470

   The documentation appears to be outdated.
   
   This `override` example was added 11 years ago (2013), while 
`pluginInitialize` was introduced 10 years ago (2014). 
   
   Somewhere in between, the `initialize` method was marked as `@Deprecated`, 
but the flag was later removed. I am unsure if `@Deprecated` was ever part of a 
production release of the platform.
   
   The [commit 
message](https://github.com/apache/cordova-android/commit/3792f752815fd5aa5a23198a56e6d12bee01217b#diff-0eb090eb54d21e25435fb41729439ac635a76c30e3b9b6e959fec77ea7405275L50)
 states:
   
   > Thinking here is that we need a while for both initialize and 
pluginInitialize to exist before plugin authors would bother not using the 
deprecated one anyways. Really, no harm in keeping both for some time.
   
   This explains why the `@Deprecated` flag was removed. However, it seems that 
this area was never revisited to remove the `initialize` method, nor was the 
documentation updated to reflect the introduction of the `pluginInitialize` 
method.
   
   Although I was not contributing at the time, I would have suggested 
retaining the `@Deprecated` flag. Without the warning, developers might remain 
unaware of the new method and lack an incentive to make changes. Additionally, 
the documentation should have been updated to ensure that new plugin 
developers, especially those building their first plugin, would use 
`pluginInitialize`.
   
   ---
   
   I believe we should update the documentation to recommend using 
`pluginInitialize` and remove any references to `initialize`.
   
   Regarding the `cordova-android` repository, we could consider reintroducing 
the `@Deprecated` flag for the upcoming major release. This would give 
developers a clear warning about the method’s deprecation. Then, in one of the 
subsequent major releases, we could proceed with removing the `initialize` 
method entirely.... Maybe?
   
   Thoughts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to