Restful icon indicating copy to clipboard operation
Restful copied to clipboard

Nette 2.3 and composer with optimized autoloader crashes on missing interface

Open ZZromanZZ opened this issue 10 years ago • 6 comments

Current version of Nette (2.3.0) has feature which cooperates with Composer.

See: http://api.nette.org/2.3.0/source-Bridges.ApplicationDI.ApplicationExtension.php.html#131

However, command 'composer install --optimize-autoloader' causes adding an extra classes from Drahak/Restful to vendor/composer/autoload_classmap.php

And during construction Nette DI container there is a fatal error (Interface 'Drahak\OAuth2\Application\IOAuthPresenter' not found).

Simple workaround: nette: application: scanComposer: false

to config.neon.

ZZromanZZ avatar Mar 05 '15 12:03 ZZromanZZ

:+1:

lordjim666 avatar Mar 06 '15 08:03 lordjim666

:+1:

davidkudera avatar Mar 29 '15 13:03 davidkudera

This isn't the root of the issue OAuth2Presenter is implementing Drahak\OAuth2\Application\IOAuthPresenter which is listed as dev dependency.

mishak87 avatar Dec 08 '15 16:12 mishak87

:+1:

michallohnisky avatar Jan 22 '16 12:01 michallohnisky

:+1:

michal-loksik avatar Mar 03 '16 15:03 michal-loksik

IMHO it should be fixed to work also without turnoff scancomposer. But what is the best solution? Remove OAuth2Presenter and move it tu drahak/oauth2? Add IOauthPresenter here, or move drahak/oauth2 to require dependency?

jirinapravnik avatar Jun 21 '16 13:06 jirinapravnik