Hi,
Have an odd situation. It seems like composer has a different base directory than laravel. On the M1 chip with latest laravel version at v8.78.1.
<?php
namespace App;
class Application extends \Illuminate\Foundation\Application
{
protected $namespace = 'App\';
}
// composer.json
"autoload": {
"psr-4": {
"App\": "src/App",
"Domain\" : "src/Domain/",
"Support\" : "src/Support/"
},
// bootstrap/App.php
use App\Application;
$app = (new Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
))->useAppPath('src/App');
// Printout using valet and Ignition
Symfony\Component\Finder\Exception\DirectoryNotFoundException
The "src/App" directory does not exist.
However, when adding .. to ->useAppPath('../src/App'); the site is served but when running composer dump-autoload to refresh where files are looked/served from I get this error from composer:
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Symfony\Component\Finder\Exception\DirectoryNotFoundException
The "../src/App" directory does not exist.
I've tried:
- removing
..
- removing
->useAppPath('../src/App');
- removing
"autoload": { "psr-4": { "App\\": "src/App", "Domain\\" : "src/Domain/", "Support\\" : "src/Support/" },
in various permutations but still they are not "lining up."
Have you run into this?
Is this a symfony issue?