Auto Discovery not functional on XAMPP & Disable Auto Discovery

Published 2 months ago by XJoeyV

  • Laravel Version: 5.5.*
  • PHP Version: 7.1.6
  • Database Driver & Version: 10.1.24-MariaDB

Description:

Currently I have the newest version of Laravel installed ( 5.5.* ). And recently tried some packages to install. All packages didn't work with auto discover until I figure out it only worked when you visit the website by serving it via artisan.

Now I disabled auto discover via "dont-discover": ["*"] and added the service provider to my app.php file and it still doesn't work.

realtebo

I've the same problem on my shard host.

Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
You made a reference to a non-existent script @php artisan package:discover

After updating the code (automatic deployed and updated using envoy) I manually must connect via ssh and run php artisan package:discover. And it works.

I don't know why the command won't work when executed from composer. Probably my shared host's composer is too old ...

bashy
bashy
2 months ago (1,090,030 XP)

What does it say when you do php artisan package:discover? Maybe it can't write to where it saves the manifest file.

realtebo

So i installed a local copy of composer.phar, and did the update

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
remove composer.lock
php composer.phar install --no-dev --prefer-dist

Now works without any problem. So composer itself seems to be the problem if too old

bashy
bashy
2 months ago (1,090,030 XP)

@realtebo It probably doesn't recognise the @php prefix which was updated in Laravel composer.json file.

XJoeyV

@bashy It does everything pretty well except the packages even when I disable auto-package discovery. People over at voyager sad it had todo with my XAMPP / apache. idk if that is a thing but if this is soo much afford to fix with this new Package update Ill stop using Laravel or only use L5.4. Cause this is not worth my time.

XJoeyV

About package discovery:

D:\xampp\htdocs\Pixelatez>php artisan package:discover
Package manifest generated successfully.

Apache Fix:

When I change my DocumentRoot in my XAMPP apache/conf/httpd.conf to D:/xampp/htdocs/pixelatez/public/ instead of D:/xampp/htdocs/ it is fixed.

But this does not allow me to change website to work on unless I change DocumentRoot everytime. That is annoying. Also when I upload it I cannot change it... So I the website need to work from the root folder and not the public folder.

Also^^

Moving the index.php and .htaccess files to the root folder will fix it still I need to change the DocumentRoot to D:/xampp/htdocs/pixelatez/ but the package route is available only does not proper load. public is required somehow

bashy
bashy
2 months ago (1,090,030 XP)

And the packages support AutoDiscovery?

Please sign in or create an account to participate in this conversation.