Skip to content

Error message for missing abstract methods: incorrect plural #15992

Closed
@DanielEScherzer

Description

@DanielEScherzer

Description

The following code:

<?php

class C {
    abstract public function f();
}

Resulted in this output:

Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (C::f) in /in/W34sb on line 7

Process exited with code 255.

But I expected this output instead:

Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining method (C::f) in /in/W34sb on line 7

Process exited with code 255.

("remaining methods" should be "remaining method" - we already have pluralization handling for "1 abstract method" vs multiple)

PHP Version

PHP 8.2+

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions