@@ -64,9 +64,20 @@ public function parse($filename) {
catch(\UnexpectedValueException){
thrownewInfoParserException("The 'core_version_requirement' constraint ({$parsed_info['core_version_requirement']}) is not a valid value in $filename");
@trigger_error("Using a non-string as the 'version' value in $filename is deprecated in drupal:11.4.0 and will be a fatal error in drupal:13.0.0. Instead, wrap the version value in single quotes. See https://www.drupal.org/node/3576311",E_USER_DEPRECATED);
$this->assertSame('1.0',$info_values['version'],'Version that looks like a float should be a string');
}
/**
* Tests a version string that is a float.
*
* @legacy-covers ::parse
*/
#[IgnoreDeprecations]
publicfunctiontestFloatVersion():void{
$float_version=<<<VERSION_TEST
core_version_requirement: '*'
name: 'Float version'
type: module
version: 1.1
VERSION_TEST;
vfsStream::setup('modules');
vfsStream::create([
'fixtures'=>[
'float_version.info.txt'=>$float_version,
],
]);
$this->expectUserDeprecationMessage("Using a non-string as the 'version' value in vfs://modules/fixtures/float_version.info.txt is deprecated in drupal:11.4.0 and will be a fatal error in drupal:13.0.0. Instead, wrap the version value in single quotes. See https://www.drupal.org/node/3576311");