Spot the bug in the PSR-4 mapping

from Namespaces
PHP 8.3.33 intermediate 4 min 2 issues to find

Composer maps App\ to src/. Find the namespace and case mismatches that can break PSR-4 loading.

php
<?php
// File: src/Service/TaxCalculator.php
namespace App\Services;

final class TaxCalculator {}

namespace App\Checkout;

use app\Services\TaxCalculator;

final class Checkout
{
    public function tax(): TaxCalculator
    {
        return new TaxCalculator();
    }
}
Open in playground
Report an error