From bcfc740f75101d90f4746960f73b9182ab639f10 Mon Sep 17 00:00:00 2001
From: Gisle Hannemyr <gisle@hannemyr.no>
Date: Thu, 19 Oct 2023 16:46:15 +0000
Subject: [PATCH] Issue #3395325 by gisle: Creation of dynamic property is
 deprecated in php 8.2

---
 README.md                      | 14 +++++++++-----
 src/Form/UserCsvImportForm.php |  7 +++++++
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 11fb05c..1a45af5 100644
--- a/README.md
+++ b/README.md
@@ -52,8 +52,8 @@ can upload the CSV file and configure the following options:
 
 - The role or set of roles that will be applied to the new users that
    are created. Authenticated user is mandatory.
-- The separation character (i.e. ";" if you're using a French version
-   of MS Excel.
+- The separation character (e.g. ";" if you're using a French version
+   of MS Excel).
 - The default password.
 - The initial status of the imported users.
 - Whether to notify the new user by email.
@@ -109,9 +109,13 @@ like this:
 `john,hohn@example.com,John,Smith,123-123-1234`  
 `jane,jane@esample.com,Jane,Doe,123-123-4567`
 
-The fields `name` and `mail` are defined by core. To look up custom
-fields in the user profile and their machine names, navigate to
-**Manage » Configuration » People » Account settings » Manage fields**.
+The fields `name` and `mail` are defined by core.  Additional fields
+may be added to the user entity by navigating to **Manage »
+Configuration » People » Account settings » Manage fields**.
+
+You can see all fields that can be imported near the bottom of the
+"Import users" form, in the section titled "Select fields to
+import". This also tells you what the machine name of the fields are.
 
 
 ## Maintainers
diff --git a/src/Form/UserCsvImportForm.php b/src/Form/UserCsvImportForm.php
index d993df0..ab20e38 100644
--- a/src/Form/UserCsvImportForm.php
+++ b/src/Form/UserCsvImportForm.php
@@ -31,6 +31,13 @@ class UserCsvImportForm extends FormBase {
    */
   protected $entityManager;
 
+  /**
+   * Provides file entity.
+   *
+   * @var \Drupal\file\Entity\File
+   */
+  protected $file;
+
   /**
    * User import Form constructor.
    *
-- 
GitLab