Support NULL services

Created on 24 June 2024, 4 months ago
Updated 18 July 2024, 3 months ago

Problem/Motivation

If a service is NULL you get an error: ReverseContainer::generateServiceIdHash(): Argument #1 ($object) must be of type object, null given Symfony supports optional dependencies so we should too.

Steps to reproduce

  1. Make a service that uses a factory.
  2. Have the factory return NULL for the service.
  3. Clear caches or install a module or do something to rebuild the container.

Proposed resolution

Remove NULL services before recording the container.

๐Ÿ“Œ Task
Status

Closed: works as designed

Version

11.0 ๐Ÿ”ฅ

Component
Baseย  โ†’

Last updated about 9 hours ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States Tim Bozeman

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024