mschwemer / typo3scan

Scans TYPO3 extensions for usage of deprecated and or changed code
MIT License
94 stars 15 forks source link

require uses wrong folder for vendor/autoload.php #4

Closed jpmschuler closed 6 years ago

jpmschuler commented 6 years ago

I installed latest dev with

composer config minimum-stability dev
composer config repositories.tuurlijk-scanner vcs https://github.com/Tuurlijk/scanner
composer require --update-no-dev  "michielroos/typo3scan:*"

(thus #2 is fixed and typo3scan finally shows up). Nevertheless I can't run the command:

$ pwd
/path/to/myext
$ vendor/bin/typo3scan 
PHP Warning:  require_once(/path/to/myext/vendor/michielroos/typo3scan/bin/../vendor/autoload.php): failed to open stream: No such file or directory in /path/to/myext/vendor/michielroos/typo3scan/bin/typo3scan on line 26

Warning: require_once(/path/to/myext/vendor/michielroos/typo3scan/bin/../vendor/autoload.php): failed to open stream: No such file or directory in /path/to/myext/vendor/michielroos/typo3scan/bin/typo3scan on line 26
PHP Fatal error:  require_once(): Failed opening required '/path/to/myext/vendor/michielroos/typo3scan/bin/../vendor/autoload.php' (include_path='.:/usr/local/Cellar/php@7.1/7.1.22/share/php@7.1/pear') in /path/to/myext/vendor/michielroos/typo3scan/bin/typo3scan on line 26

Fatal error: require_once(): Failed opening required '/path/to/myext/vendor/michielroos/typo3scan/bin/../vendor/autoload.php' (include_path='.:/usr/local/Cellar/php@7.1/7.1.22/share/php@7.1/pear') in /path/to/myext/vendor/michielroos/typo3scan/bin/typo3scan on line 26

typo3 bin itself works

$ vendor/bin/typo3

Uncaught TYPO3 Exception #1381507733: The PackageStates.php file is either corrupt or unavailable.
thrown in file /path/to/myext/typo3/sysext/core/Classes/Package/PackageManager.php
in line 247

I used my local ext dev folder, not a complete TYPO3 install as the install suggested that this wouldn't be necessary due to the composer init. Is this perhaps a regression due to #2?

Tuurlijk commented 6 years ago

@jpmschuler Did that fix it for you?