Closed kaystrobach closed 4 years ago
related to
No, can you provide more info and how to reproduce that?
thanks a lot, @holgerkraemer both are fixed in with 0c115f9 now
And by the way - I have not tested if it still works after all the changes ...
phpstan with typo3 extension enabled:
------ ----------------------------------------------------------------------------------------------------------------
Line Classes/Em/AjaxController.php
------ ----------------------------------------------------------------------------------------------------------------
140 Undefined variable: $ajaxObj
191 PHPDoc tag @param has invalid value (string &$publicUrl): Unexpected token "&", expected variable at offset 91
------ ----------------------------------------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line Classes/Em/ConfigurationHelper.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
59 Parameter $pObj of method Causal\Extractor\Em\ConfigurationHelper::createTikaJarPath() has invalid typehint type TYPO3\CMS\Install\ViewHelpers\Form\TypoScriptConstantsViewHelper.
102 Parameter $pObj of method Causal\Extractor\Em\ConfigurationHelper::createTikaServerHost() has invalid typehint type TYPO3\CMS\Install\ViewHelpers\Form\TypoScriptConstantsViewHelper.
150 Parameter $pObj of method Causal\Extractor\Em\ConfigurationHelper::createToolInput() has invalid typehint type TYPO3\CMS\Install\ViewHelpers\Form\TypoScriptConstantsViewHelper.
200 Parameter $pObj of method Causal\Extractor\Em\ConfigurationHelper::createCheckboxForExtensionManager() has invalid typehint type TYPO3\CMS\Install\ViewHelpers\Form\TypoScriptConstantsViewHelper.
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line Classes/Em/MappingController.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
55 Parameter $pObj of method Causal\Extractor\Em\MappingController::render() has invalid typehint type TYPO3\CMS\Install\ViewHelpers\Form\TypoScriptConstantsViewHelper.
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line Classes/Report/ServicesListReport.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
37 Property Causal\Extractor\Report\ServicesListReport::$reportsModule has unknown class TYPO3\CMS\Reports\Controller\ReportController as its type.
44 Parameter $reportsModule of method Causal\Extractor\Report\ServicesListReport::__construct() has invalid typehint type TYPO3\CMS\Reports\Controller\ReportController.
44 Parameter $reportsModule of method Causal\Extractor\Report\ServicesListReport::__construct() has invalid typehint type TYPO3\CMS\Reports\Controller\ReportController.
47 Call to method includeLLFile() on an unknown class TYPO3\CMS\Core\LanguageService.
70 Call to method getLL() on an unknown class TYPO3\CMS\Core\LanguageService.
82 Call to method getLL() on an unknown class TYPO3\CMS\Core\LanguageService.
89 Call to method getLL() on an unknown class TYPO3\CMS\Core\LanguageService.
90 Call to method getLL() on an unknown class TYPO3\CMS\Core\LanguageService.
91 Call to method getLL() on an unknown class TYPO3\CMS\Core\LanguageService.
92 Call to method getLL() on an unknown class TYPO3\CMS\Core\LanguageService.
93 Call to method getLL() on an unknown class TYPO3\CMS\Core\LanguageService.
188 Return typehint of method Causal\Extractor\Report\ServicesListReport::getLanguageService() has invalid type TYPO3\CMS\Core\LanguageService.
188 Return typehint of method Causal\Extractor\Report\ServicesListReport::getLanguageService() has invalid type TYPO3\CMS\Core\LanguageService.
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
------ -------------------------------------------------------------------
Line Classes/Service/Extraction/AbstractExtractionService.php
------ -------------------------------------------------------------------
291 Variable $processor in isset() always exists and is not nullable.
------ -------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------------------------------------------
Line Classes/Service/Extraction/PdfinfoMetadataExtraction.php
------ -----------------------------------------------------------------------------------------------------------------------------
106 Strict comparison using === between Causal\Extractor\Service\Pdfinfo\PdfinfoService and null will always evaluate to false.
------ -----------------------------------------------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------------------------
Line Classes/Service/Extraction/PhpMetadataExtraction.php
------ ---------------------------------------------------------------------------------------------------------------------
95 Strict comparison using === between Causal\Extractor\Service\Php\PhpService and null will always evaluate to false.
------ ---------------------------------------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------------------------------------------------
Line Classes/Service/Extraction/TikaLanguageDetector.php
------ --------------------------------------------------------------------------------------------------------------------------------
85 Strict comparison using === between Causal\Extractor\Service\Tika\TikaServiceInterface and null will always evaluate to false.
------ --------------------------------------------------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------------------------------------------------
Line Classes/Service/Extraction/TikaMetadataExtraction.php
------ --------------------------------------------------------------------------------------------------------------------------------
108 Strict comparison using === between Causal\Extractor\Service\Tika\TikaServiceInterface and null will always evaluate to false.
------ --------------------------------------------------------------------------------------------------------------------------------
------ -------------------------------------------------------
Line Classes/Service/Php/PhpService.php
------ -------------------------------------------------------
146 Unreachable statement - code above always terminates.
149 Unreachable statement - code above always terminates.
235 Access to an undefined property DOMNode::$tagName.
246 Access to an undefined property DOMNode::$tagName.
------ -------------------------------------------------------
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line Classes/Service/Tika/AppService.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
132 Parameter #1 $fileName (TYPO3\CMS\Core\Resource\File) of method Causal\Extractor\Service\Tika\AppService::extractMetadataFromLocalFile() should be compatible with parameter $fileName (string) of method
Causal\Extractor\Service\ServiceInterface::extractMetadataFromLocalFile()
132 Parameter #1 $fileName (TYPO3\CMS\Core\Resource\File) of method Causal\Extractor\Service\Tika\AppService::extractMetadataFromLocalFile() should be compatible with parameter $fileName (string) of method
Causal\Extractor\Service\ServiceInterface::extractMetadataFromLocalFile()
132 Parameter #1 $fileName (TYPO3\CMS\Core\Resource\File) of method Causal\Extractor\Service\Tika\AppService::extractMetadataFromLocalFile() should be compatible with parameter $fileName (string) of method
Causal\Extractor\Service\ServiceInterface::extractMetadataFromLocalFile()
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------
Line Classes/Service/Tika/ServerService.php
------ ---------------------------------------------------------------------------------------------------
116 PHPDoc tag @param references unknown parameter: $file
170 Method Causal\Extractor\Service\Tika\ServerService::send() should return string but returns null.
------ ---------------------------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------------------------
Line Classes/Utility/Gps.php
------ ----------------------------------------------------------------------------------------------------
69 Method Causal\Extractor\Utility\Gps::toDecimal() should return string|null but returns float|null.
------ ----------------------------------------------------------------------------------------------------
------ -------------------------------------------------------------------------------------------------------------------------------------------
Line Classes/Utility/Number.php
------ -------------------------------------------------------------------------------------------------------------------------------------------
47 Call to function is_array() with string will always evaluate to false.
💡 Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your phpstan.neon.
51 Method Causal\Extractor\Utility\Number::extractIntegerAtEnd() should return string but returns int.
54 Method Causal\Extractor\Utility\Number::extractIntegerAtEnd() should return string but returns null.
66 Call to function is_array() with string will always evaluate to false.
💡 Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your phpstan.neon.
------ -------------------------------------------------------------------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------
Line Tests/Functional/AbstractFunctionalTestCase.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------
Class Causal\Extractor\Tests\Functional\AbstractFunctionalTestCase was not found while trying to analyse it - autoloading is probably not configured properly.
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------
Line Tests/Functional/Service/Php/PhpServiceTest.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------
Class Causal\Extractor\Tests\Functional\Service\Php\PhpServiceTest was not found while trying to analyse it - autoloading is probably not configured properly.
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------------------------------------------------------------
Line Tests/Unit/Configuration/ConfigurationTest.php
------ ---------------------------------------------------------------------------------------------------------------------------------------------------------
Class Causal\Extractor\Tests\Unit\Utility\ConfigurationTest was not found while trying to analyse it - autoloading is probably not configured properly.
------ ---------------------------------------------------------------------------------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------------------------------------------------------------------------
Line Tests/Unit/Utility/MimeTypeTest.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------
Class Causal\Extractor\Tests\Unit\Utility\MimeTypeTest was not found while trying to analyse it - autoloading is probably not configured properly.
------ ----------------------------------------------------------------------------------------------------------------------------------------------------
------ ------------------------------
Line ext_emconf.php
------ ------------------------------
13 Undefined variable: $_EXTKEY
------ ------------------------------
------ -----------------------------------
Line ext_localconf.php
------ -----------------------------------
2 Right side of || is always false.
46 Undefined variable: $_EXTKEY
------ -----------------------------------
------ --------------------------------------------------------------------------------
Line ext_tables.php
------ --------------------------------------------------------------------------------
2 Right side of || is always false.
6 Undefined variable: $_EXTKEY
7 Undefined variable: $_EXTKEY
8 Undefined variable: $_EXTKEY
9 Class TYPO3\CMS\Reports\ReportInterface not found and could not be autoloaded.
------ --------------------------------------------------------------------------------
I
And by the way - I have not tested if it still works after all the changes ...
Nope.
There is at least a = null
missing in the Causal\Extractor\Utility\DateTime::timestamp method.
It should be:
public static function timestamp(string $str = null): ?int
Otherwise an exception will be thrown after uploading a image.
This PR is partially integrated into https://github.com/xperseguers/t3ext-extractor/tree/feature/typo3-v10
Thanks for the work on this patch @kaystrobach and Jigal. Not needed anymore since master branch is starting to be compatible with v8, v9 and v10.
kudos to https://twitter.com/jigalvh and @4viewture for providing the patches
Original Patch files: