InfoParser returns an empty array if passed a non-existing file

Created on 4 October 2023, about 1 year ago
Updated 25 November 2023, 12 months ago

Problem/Motivation

\Drupal\Core\Extension\InfoParserDynamic::parse() returns an empty array if passed an invalid file but if you pass it a valid file missing a required key it will throw an exception. This doesn't really make any sense.

The behaviour was added in #80952: Add .info files to modules to store meta information as a way to not have to provide a .info for a module. I'm not sure that wouldn't work now...

Steps to reproduce

Pass a file that does not exist to the info parser.

Proposed resolution

Deprecate this functionality and inform users that in D11 this will result in an exception. Or maybe skip the deprecation and go straight to an exception?

per #4 + #5 this will not throw any deprecation but instead just an exception

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.2

Component
Base 

Last updated about 7 hours ago

Created by

🇬🇧United Kingdom alexpott 🇪🇺🌍

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024