Open Deadpikle opened 5 years ago
Well, the Composer autoload pointed Models\
and Controllers\
to the YAMF vendor directories and not the local directory, which isn't what I want... 🤔 I want those namespaces to point to the user's stuff, not YAMF's stuff. I don't know if that is possible, unfortunately. We might need to think of a different solution. Laravel has a separate installer project that downloads the latest laravel package and unzips it in order to get around this. I don't really want to have a separate project just for setup...YAMF is supposed to be small and light!
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Yamf\\' => array($vendorDir . '/deadpikle/yamf-php/src/Yamf'),
'Models\\' => array($vendorDir . '/deadpikle/yamf-php/app/models'),
'Controllers\\' => array($vendorDir . '/deadpikle/yamf-php/app/controllers'),
);
I'd like to get this package on Packagist/Composer, but don't know all the steps. I did some work in the
packagist-setup
branch and got it onto Packagist, but thecomposer require
command didn't work too great, and the setup phase is awful. I need to figure out an easy way to get the user to have theapp
,init.php
, etc. folders/files after thecomposer require
step, and I'm not sure how to do that. I also want to warn the user if those files already exist so that they can fix things manually. Then, I need to figure out if things work. In my one test locally usingcomposer require
, I got the files to copy properly, but then the autoload wasn't working properly, and I don't know why.