Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

marcohern's avatar

composer package:discover --ansi fails the first time it runs with Class MyClass does not exists

Laravel Version: 7.2.2

PHP Version: 7.3.9

Database Driver & Version: mysql 5.7.29-log

Description:

So i'm developing a site using Laravel and a PHP library called dracula which I am attaching as a submodule. At the moment the website is empty, but I am developing commands that I wish to execute in a schedule. Im deploying to Heroku. Laravel runs fine locally, and the first few times It deployed to Heroku fine. At some point all Heroku builds started to fail, but locally it would still work fine.

I was able to reproduce the issue when I cloned my laravel app repo from scratch into a new folder. as soon as I ran composer update on the newly cloned repo, composer fails, run it a second time and it works. But since the first time always fails, this breaks my build in Heroku.

Steps To Reproduce:

The following are the list of commands to reproduce:

git clone https://github.com/marcohern/onsale.git
cd onsale
composer update
#this fails, but do it again...
composer update
#...and now it works, but build broke the last time, so Heroku rejects

below my composer update log

E:\Src\onsale2>composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 97 installs, 0 updates, 0 removals
  - Installing voku/portable-ascii (1.4.10): Loading from cache
  - Installing symfony/polyfill-ctype (v1.14.0): Loading from cache
  - Installing phpoption/phpoption (1.7.3): Loading from cache
  - Installing vlucas/phpdotenv (v4.1.2): Loading from cache
  - Installing symfony/css-selector (v5.0.5): Loading from cache
  - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.14.0): Loading from cache
  - Installing symfony/var-dumper (v5.0.5): Loading from cache
  - Installing symfony/routing (v5.0.5): Loading from cache
  - Installing symfony/process (v5.0.5): Loading from cache
  - Installing symfony/polyfill-php72 (v1.14.0): Loading from cache
  - Installing symfony/polyfill-intl-idn (v1.14.0): Loading from cache
  - Installing symfony/mime (v5.0.5): Loading from cache
  - Installing psr/log (1.1.2): Loading from cache
  - Installing symfony/polyfill-php73 (v1.14.0): Loading from cache
  - Installing symfony/http-foundation (v5.0.5): Loading from cache
  - Installing psr/event-dispatcher (1.0.0): Loading from cache
  - Installing symfony/event-dispatcher-contracts (v2.0.1): Loading from cache
  - Installing symfony/event-dispatcher (v5.0.5): Loading from cache
  - Installing symfony/error-handler (v5.0.5): Loading from cache
  - Installing symfony/http-kernel (v5.0.5): Loading from cache
  - Installing symfony/finder (v5.0.5): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/service-contracts (v2.0.1): Loading from cache
  - Installing symfony/console (v5.0.5): Loading from cache
  - Installing symfony/polyfill-iconv (v1.14.0): Loading from cache
  - Installing doctrine/lexer (1.2.0): Loading from cache
  - Installing egulias/email-validator (2.1.17): Loading from cache
  - Installing swiftmailer/swiftmailer (v6.2.3): Loading from cache
  - Installing paragonie/random_compat (v9.99.99): Loading from cache
  - Installing ramsey/uuid (3.9.3): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing opis/closure (3.5.1): Loading from cache
  - Installing symfony/translation-contracts (v2.0.1): Loading from cache
  - Installing symfony/translation (v5.0.5): Loading from cache
  - Installing nesbot/carbon (2.31.0): Loading from cache
  - Installing monolog/monolog (2.0.2): Loading from cache
  - Installing league/flysystem (1.0.66): Loading from cache
  - Installing league/commonmark (1.3.1): Loading from cache
  - Installing dragonmantank/cron-expression (v2.3.0): Loading from cache
  - Installing doctrine/inflector (1.3.1): Loading from cache
  - Installing laravel/framework (v7.2.2): Loading from cache
  - Installing fideloper/proxy (4.3.0): Loading from cache
  - Installing asm89/stack-cors (1.3.0): Loading from cache
  - Installing fruitcake/laravel-cors (v1.0.5): Loading from cache
  - Installing ralouphie/getallheaders (3.0.3): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
  - Installing guzzlehttp/guzzle (6.5.2): Loading from cache
  - Installing jakub-onderka/php-console-color (v0.2): Loading from cache
  - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache
  - Installing nikic/php-parser (v4.3.0): Loading from cache
  - Installing dnoegel/php-xdg-base-dir (v0.1.1): Loading from cache
  - Installing psy/psysh (v0.10.2): Loading from cache
  - Installing laravel/tinker (v2.3.0): Loading from cache
  - Installing symfony/http-client-contracts (v2.0.1): Loading from cache
  - Installing symfony/http-client (v5.0.5): Loading from cache
  - Installing symfony/dom-crawler (v5.0.5): Loading from cache
  - Installing symfony/browser-kit (v5.0.5): Loading from cache
  - Installing fabpot/goutte (v4.0.0): Loading from cache
  - Installing scrivo/highlight.php (v9.18.1.1): Loading from cache
  - Installing filp/whoops (2.7.1): Loading from cache
  - Installing facade/ignition-contracts (1.0.0): Loading from cache
  - Installing facade/flare-client-php (1.3.2): Loading from cache
  - Installing facade/ignition (2.0.2): Loading from cache
  - Installing fzaninotto/faker (v1.9.1): Loading from cache
  - Installing hamcrest/hamcrest-php (v2.0.0): Loading from cache
  - Installing mockery/mockery (1.3.1): Loading from cache
  - Installing nunomaduro/collision (v4.1.3): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/resource-operations (2.0.1): Loading from cache
  - Installing sebastian/recursion-context (3.0.0): Loading from cache
  - Installing sebastian/object-reflector (1.1.1): Loading from cache
  - Installing sebastian/object-enumerator (3.0.3): Loading from cache
  - Installing sebastian/global-state (2.0.0): Loading from cache
  - Installing sebastian/exporter (3.1.2): Loading from cache
  - Installing sebastian/environment (4.2.3): Loading from cache
  - Installing sebastian/diff (3.0.2): Loading from cache
  - Installing sebastian/comparator (3.0.2): Loading from cache
  - Installing phpunit/php-timer (2.1.2): Loading from cache
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing phpunit/php-file-iterator (2.0.2): Loading from cache
  - Installing theseer/tokenizer (1.1.3): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  - Installing phpunit/php-token-stream (3.1.1): Loading from cache
  - Installing phpunit/php-code-coverage (6.1.4): Loading from cache
  - Installing doctrine/instantiator (1.3.0): Loading from cache
  - Installing webmozart/assert (1.7.0): Loading from cache
  - Installing phpdocumentor/reflection-common (2.0.0): Loading from cache
  - Installing phpdocumentor/type-resolver (1.1.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (5.1.0): Loading from cache
  - Installing phpspec/prophecy (v1.10.3): Loading from cache
  - Installing phar-io/version (2.0.1): Loading from cache
  - Installing phar-io/manifest (1.0.3): Loading from cache
  - Installing myclabs/deep-copy (1.9.5): Loading from cache
  - Installing phpunit/phpunit (7.5.20): Loading from cache
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
symfony/event-dispatcher suggests installing symfony/dependency-injection
symfony/http-kernel suggests installing symfony/config
symfony/http-kernel suggests installing symfony/dependency-injection
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/lock
swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).)
ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
ramsey/uuid suggests installing paragonie/random-lib (Provides RandomLib for use with the RandomLibAdapter)
symfony/translation suggests installing symfony/config
symfony/translation suggests installing symfony/yaml
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing elasticsearch/elasticsearch (Allow sending log messages to an Elasticsearch server via official client)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver))
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library))
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
league/flysystem suggests installing ext-ftp (Allows you to use FTP server storage)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
laravel/framework suggests installing ext-memcached (Required to use the memcache cache driver.)
laravel/framework suggests installing ext-pcntl (Required to use all features of the queue worker.)
laravel/framework suggests installing ext-posix (Required to use all features of the queue worker.)
laravel/framework suggests installing ext-redis (Required to use the Redis cache and queue drivers (^4.0|^5.0).)
laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).)
laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (^2.6).)
laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).)
laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).)
laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).)
laravel/framework suggests installing moontoast/math (Required to use ordered UUIDs (^1.1).)
laravel/framework suggests installing nyholm/psr7 (Required to use PSR-7 bridging features (^1.2).)
laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (^4.0).)
laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^4.0).)
laravel/framework suggests installing symfony/cache (Required to PSR-6 cache bridge (^5.0).)
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use PSR-7 bridging features (^2.0).)
laravel/framework suggests installing wildbit/swiftmailer-postmark (Required to use Postmark mail driver (^3.0).)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-posix (If you have PCNTL, you'll want the POSIX extension as well.)
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
facade/ignition suggests installing laravel/telescope (^3.1)
sebastian/global-state suggests installing ext-uopz (*)
sebastian/environment suggests installing ext-posix (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0)
phpunit/phpunit suggests installing ext-soap (*)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
[2020-03-22 01:45:31] production.ERROR: Class Marcohern\Dracula\Manager does not exist {"exception":"[object] (ReflectionException(code: 0): Class Marcohern\Dracula\Manager does not exist at E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Container\Container.php:875)
[stacktrace]
#0 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Container\Container.php(875): ReflectionParameter->getClass()
#1 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Container\Container.php(838): Illuminate\Container\Container->resolveDependencies(Array)
#2 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Container\Container.php(685): Illuminate\Container\Container->build('App\\Console\\Com...')
#3 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(794): Illuminate\Container\Container->resolve('App\\Console\\Com...', Array, true)
#4 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Container\Container.php(633): Illuminate\Foundation\Application->resolve('App\\Console\\Com...', Array)
#5 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(779): Illuminate\Container\Container->make('App\\Console\\Com...', Array)
#6 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Console\Application.php(261): Illuminate\Foundation\Application->make('App\\Console\\Com...')
#7 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(233): Illuminate\Console\Application->resolve('App\\Console\\Com...')
#8 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Console\Application.php(152): Illuminate\Foundation\Console\Kernel->Illuminate\Foundation\Console\{closure}(Object(Illuminate\Console\Application))
#9 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Console\Application.php(75): Illuminate\Console\Application->bootstrap()
#10 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(331): Illuminate\Console\Application->__construct(Object(Illuminate\Foundation\Application), Object(Illuminate\Events\Dispatcher), '7.2.2')
#11 E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(130): Illuminate\Foundation\Console\Kernel->getArtisan()
#12 E:\Src\onsale2\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 {main}
"}


   ReflectionException

  Class Marcohern\Dracula\Manager does not exist

  at E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Container\Container.php:875
    871|
    872|             // If the class is null, it means the dependency is a string or some other
    873|             // primitive type which we can not resolve since it is not a class and
    874|             // we will just bomb out with an error since we have no-where to go.
  > 875|             $results[] = is_null($dependency->getClass())
    876|                             ? $this->resolvePrimitive($dependency)
    877|                             : $this->resolveClass($dependency);
    878|         }
    879|

  1   E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Container\Container.php:875
      ReflectionParameter::getClass()

  2   E:\Src\onsale2\vendor\laravel\framework\src\Illuminate\Container\Container.php:838
      Illuminate\Container\Container::resolveDependencies()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

The following is the Heroku composer update log.

-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
       - php (7.4.4)
       - ext-mbstring (bundled with php)
       - apache (2.4.41)
       - nginx (1.16.1)
-----> Installing dependencies...
       Composer version 1.10.1 2020-03-13 20:34:27
       Loading composer repositories with package information
       Installing dependencies from lock file
       Package operations: 61 installs, 0 updates, 0 removals
         - Installing doctrine/inflector (1.3.1): Loading from cache
         - Installing doctrine/lexer (1.2.0): Loading from cache
         - Installing dragonmantank/cron-expression (v2.3.0): Loading from cache
         - Installing symfony/polyfill-mbstring (v1.14.0): Loading from cache
         - Installing symfony/polyfill-php72 (v1.14.0): Loading from cache
         - Installing symfony/polyfill-intl-idn (v1.14.0): Loading from cache
         - Installing symfony/mime (v5.0.5): Loading from cache
         - Installing psr/container (1.0.0): Loading from cache
         - Installing symfony/service-contracts (v2.0.1): Loading from cache
         - Installing symfony/polyfill-php73 (v1.14.0): Loading from cache
         - Installing symfony/http-client-contracts (v2.0.1): Loading from cache
         - Installing psr/log (1.1.2): Loading from cache
         - Installing symfony/http-client (v5.0.5): Loading from cache
         - Installing symfony/polyfill-ctype (v1.14.0): Loading from cache
         - Installing symfony/dom-crawler (v5.0.5): Loading from cache
         - Installing symfony/css-selector (v5.0.5): Loading from cache
         - Installing symfony/browser-kit (v5.0.5): Loading from cache
         - Installing fabpot/goutte (v4.0.0): Loading from cache
         - Installing voku/portable-ascii (1.4.10): Loading from cache
         - Installing phpoption/phpoption (1.7.3): Downloading (100%)
         - Installing vlucas/phpdotenv (v4.1.2): Loading from cache
         - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Loading from cache
         - Installing symfony/var-dumper (v5.0.5): Loading from cache
         - Installing symfony/routing (v5.0.5): Loading from cache
         - Installing symfony/process (v5.0.5): Loading from cache
         - Installing symfony/http-foundation (v5.0.5): Loading from cache
         - Installing psr/event-dispatcher (1.0.0): Loading from cache
         - Installing symfony/event-dispatcher-contracts (v2.0.1): Loading from cache
         - Installing symfony/event-dispatcher (v5.0.5): Loading from cache
         - Installing symfony/error-handler (v5.0.5): Loading from cache
         - Installing symfony/http-kernel (v5.0.5): Loading from cache
         - Installing symfony/finder (v5.0.5): Loading from cache
         - Installing symfony/console (v5.0.5): Loading from cache
         - Installing symfony/polyfill-iconv (v1.14.0): Loading from cache
         - Installing egulias/email-validator (2.1.17): Loading from cache
         - Installing swiftmailer/swiftmailer (v6.2.3): Loading from cache
         - Installing paragonie/random_compat (v9.99.99): Loading from cache
         - Installing ramsey/uuid (3.9.3): Loading from cache
         - Installing psr/simple-cache (1.0.1): Loading from cache
         - Installing opis/closure (3.5.1): Loading from cache
         - Installing symfony/translation-contracts (v2.0.1): Loading from cache
         - Installing symfony/translation (v5.0.5): Loading from cache
         - Installing nesbot/carbon (2.31.0): Loading from cache
         - Installing monolog/monolog (2.0.2): Loading from cache
         - Installing league/flysystem (1.0.66): Downloading (100%)
         - Installing league/commonmark (1.3.1): Loading from cache
         - Installing laravel/framework (v7.2.2): Downloading (100%)
         - Installing fideloper/proxy (4.3.0): Loading from cache
         - Installing asm89/stack-cors (1.3.0): Loading from cache
         - Installing fruitcake/laravel-cors (v1.0.5): Loading from cache
         - Installing ralouphie/getallheaders (3.0.3): Loading from cache
         - Installing psr/http-message (1.0.1): Loading from cache
         - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
         - Installing guzzlehttp/promises (v1.3.1): Loading from cache
         - Installing guzzlehttp/guzzle (6.5.2): Loading from cache
         - Installing jakub-onderka/php-console-color (v0.2): Loading from cache
         - Installing nikic/php-parser (v4.3.0): Loading from cache
         - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache
         - Installing dnoegel/php-xdg-base-dir (v0.1.1): Loading from cache
         - Installing psy/psysh (v0.10.2): Downloading (100%)
         - Installing laravel/tinker (v2.3.0): Downloading (100%)         
       Generating optimized autoload files
       > Illuminate\Foundation\ComposerScripts::postAutoloadDump
       > @php artisan package:discover --ansi
       [2020-03-22 01:31:56] production.ERROR: Class Marcohern\Dracula\Manager does not exist {"exception":"[object] (ReflectionException(code: 0): Class Marcohern\Dracula\Manager does not exist at /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Container/Container.php:875)
       [stacktrace]
       #0 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Container/Container.php(875): ReflectionParameter->getClass()
       #1 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Container/Container.php(838): Illuminate\Container\Container->resolveDependencies()
       #2 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Container/Container.php(685): Illuminate\Container\Container->build()
       #3 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(794): Illuminate\Container\Container->resolve()
       #4 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Foundation\Application->resolve()
       #5 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(779): Illuminate\Container\Container->make()
       #6 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Console/Application.php(261): Illuminate\Foundation\Application->make()
       #7 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(233): Illuminate\Console\Application->resolve()
       #8 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Console/Application.php(152): Illuminate\Foundation\Console\Kernel->Illuminate\Foundation\Console\{closure}()
       #9 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Console/Application.php(75): Illuminate\Console\Application->bootstrap()
       #10 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(331): Illuminate\Console\Application->__construct()
       #11 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(130): Illuminate\Foundation\Console\Kernel->getArtisan()
       #12 /tmp/build_b3f57874e74d9025381dc3a95ca2b3d7/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
       #13 {main}
       "} 
       
       
       In Container.php line 875:
                                                         
         Class Marcohern\Dracula\Manager does not exist  
                                                         
       
       Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
 !     WARNING: A post-autoload-dump script terminated with an error
 !     ERROR: Dependency installation failed!
 !     
 !     The 'composer install' process failed with an error. The cause
 !     may be the download or installation of packages, or a pre- or
 !     post-install hook (e.g. a 'post-install-cmd' item in 'scripts')
 !     in your 'composer.json'.
 !     
 !     Typical error cases are out-of-date or missing parts of code,
 !     timeouts when making external connections, or memory limits.
 !     
 !     Check the above error output closely to determine the cause of
 !     the problem, ensure the code you're pushing is functioning
 !     properly, and that all local changes are committed correctly.
 !     
 !     For more information on builds for PHP on Heroku, refer to
 !     https://devcenter.heroku.com/articles/php-support
 !     
 !     REMINDER: the following warnings were emitted during the build;
 !     check the details above, as they may be related to this error:
 !     - A post-autoload-dump script terminated with an error
 !     Push rejected, f

Finally, my composer.json

{
  "name": "laravel/laravel",
  "type": "project",
  "description": "The Laravel Framework.",
  "keywords": [
      "framework",
      "laravel"
  ],
  "license": "MIT",
  "require": {
    "php": "^7.2.5",
    "fideloper/proxy": "^4.2",
    "fruitcake/laravel-cors": "^1.0",
    "guzzlehttp/guzzle": "^6.3",
    "laravel/framework": "^7.0",
    "laravel/tinker": "^2.0",
    "fabpot/goutte": "^4.0"
  },
  "require-dev": {
    "facade/ignition": "^2.0",
    "fzaninotto/faker": "^1.9.1",
    "mockery/mockery": "^1.3.1",
    "nunomaduro/collision": "^4.1",
    "phpunit/phpunit": "^7"
  },
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
  },
  "extra": {
    "laravel": {
      "dont-discover": ["marcohern/dracula"]
    }
  },
  "autoload": {
    "psr-4": {
      "Marcohern\Dracula\": "dracula/src/",
      "App\": "app/"
    },
    "classmap": [
      "database/seeds",
      "database/factories"
    ]
  },
  "autoload-dev": {
      "psr-4": {
        "Tests\": "tests/"
      }
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "scripts": {
    "post-autoload-dump": [
      "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
      "@php artisan package:discover --ansi"
    ],
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
      "@php artisan key:generate --ansi"
    ]
  }
}
0 likes
0 replies

Please or to participate in this conversation.