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

Created on 4 October 2023, 9 months ago
Updated 25 November 2023, 7 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 1 minute 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.69.0 2024