CiviMRF / cmrf_core

Drupal Core for CMRF
GNU Affero General Public License v3.0
2 stars 6 forks source link

`CMRFDatasetForm` should have method `exists` #61

Closed dontub closed 1 year ago

dontub commented 2 years ago

The class CMRFDatasetForm should have a method named exists because it is called by MachineName:

Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Drupal\cmrf_views\Form\CMRFDatasetForm' does not have a method 'exists' in Drupal\Core\Render\Element\MachineName::validateMachineName() (line 275 of core/lib/Drupal/Core/Render/Element/MachineName.php).

https://github.com/drupal/drupal/blob/5839fb2cab4ffe35911d614879e4ac7e6a5cf0ce/core/lib/Drupal/Core/Render/Element/MachineName.php#L275

jensschuppe commented 2 years ago

For reference, this has been worked on to be generic for config entities: https://www.drupal.org/project/drupal/issues/2091871

kainuk commented 1 year ago

On PHP 8.1 this is not a warning anymore but a blocking error. See https://www.drupal.org/project/cmrf_core/issues/3339619

kainuk commented 1 year ago

Is fixed in https://www.drupal.org/project/cmrf_core/releases/2.0.3