Skip to content

Error message for missing abstract methods: incorrect plural #15992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DanielEScherzer opened this issue Sep 22, 2024 · 1 comment · Fixed by #15993
Closed

Error message for missing abstract methods: incorrect plural #15992

DanielEScherzer opened this issue Sep 22, 2024 · 1 comment · Fixed by #15993

Comments

@DanielEScherzer
Copy link
Member

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

@DanielEScherzer
Copy link
Member Author

PR at #15993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant