PHP Deprecated when running drupal-rector 0.12.2 process in PHP 8.1.5
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3280908. -->
Reported by: [ccshannon](https://www.drupal.org/user/207602)
>>>
<p>I run rector against old custom module Upgrade Status says can be fixed. Here are the two fixable items in a custom Form controller:</p>
<p>"Call to deprecated function drupal_set_message(). Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use Drupal\Core\Messenger\MessengerInterface::addMessage() instead."</p>
<p>"Call to deprecated function entity_create(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use The method overriding Entity::create() for the entity type, e.g. \Drupal\node\Entity\Node::create() if the entity type is known. If the entity type is variable, use the entity storage's create() method to construct a new entity:"</p>
<p>So, I run rector against module containing the file in question:</p>
<p><code>% vendor/bin/rector process web/modules/custom/my_custom_module</code></p>
<p>I get a file counter and a green box with no specifics:</p>
<pre> 9/9 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%<br><br> <br> [OK] Rector is done! <br> </pre><p>Go to the files ... nothing has been updated or changed in the files. </p>
<p>I run this on other modules and things work, but not all of them.</p>
<p>Any ideas? Thanks.</p>
issue