Skip to content

Commit

Permalink
[TASK] Fix PHP warnings and 404 for files (#27)
Browse files Browse the repository at this point in the history
* [TASK] Add .DS_Store to .gitignore

* [TASK] Update to use minimum PHP 8.1

* [TASK] Change runTests.sh

* [TASK] Additional update for  Build/Scripts/runTests.sh

* [BUGFIX] Check if languageField isset

* [BUGFIX] Remove unused connector_overrides from JS

* [TASK] Update to version ''2.0.2''
  • Loading branch information
MattiasNilsson committed Dec 1, 2023
1 parent cf03df6 commit ce3e49d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
/*.idea
.DS_Store
/.Build/*
/.fleet
/.php-cs-fixer.cache
Expand Down
9 changes: 3 additions & 6 deletions Build/Scripts/runTests.sh
Expand Up @@ -57,17 +57,14 @@ Options:
- postgres: use postgres
- sqlite: use sqlite
-p <7.4|8.0|8.1|8.2>
-p <8.1|8.2>
Specifies the PHP minor version to be used
- 7.4: (default) use PHP 7.4
- 8.0: use PHP 8.0
- 8.1: use PHP 8.1
- 8.2: use PHP 8.2
-t <11|12>
-t <12>
Only with -s composerUpdate
Specifies the TYPO3 core major version to be used
- 11: (default) use TYPO3 core v11
- 12: use TYPO3 core v12
-e "<phpunit options>"
Expand Down Expand Up @@ -119,7 +116,7 @@ cd ../testing-docker || exit 1
ROOT_DIR=`realpath ${PWD}/../../`
TEST_SUITE="unit"
DBMS="mariadb"
PHP_VERSION="8.1"
PHP_VERSION="8.2"
TYPO3_VERSION="12"
PHP_XDEBUG_ON=0
PHP_XDEBUG_PORT=9003
Expand Down
6 changes: 4 additions & 2 deletions Classes/Xclass/Form/Container/FilesControlContainer.php
Expand Up @@ -114,9 +114,11 @@ protected function getExtensionConfigurationManager(): ExtensionConfigurationMan
/** @var ExtensionConfigurationManager $extensionConfigurationManager */
$extensionConfigurationManager = GeneralUtility::makeInstance(ExtensionConfigurationManager::class);

$languageField = $GLOBALS['TCA'][$this->data['tableName']]['ctrl']['languageField'];

$languageId = -1;
if (isset($GLOBALS['TCA'][$this->data['tableName']]['ctrl']['languageField'])) {
$languageField = $GLOBALS['TCA'][$this->data['tableName']]['ctrl']['languageField'];
}

if ($languageField) {
$languageId = (int)$this->data['databaseRow'][$languageField];
}
Expand Down
13 changes: 1 addition & 12 deletions Resources/Public/JavaScript/qbank-connector.js
Expand Up @@ -93,24 +93,13 @@
* Returns an object with user AND potential connector config override for the current user
*/
this.getUser = function() {
var delayed = new QBCJQ.Deferred(), userRequest = this.call("accounts/me"), settingsRequest = this.call("accounts/settings.json/connector_override"), object = {};
var delayed = new QBCJQ.Deferred(), userRequest = this.call("accounts/me"), object = {};
userRequest.then(function(user) {
object.user = user;
if (object.settings !== undefined) {
delayed.resolve(object);
}
});
settingsRequest.then(function(settings) {
object.settings = JSON.parse(settings);
if (object.user) {
delayed.resolve(object);
}
}, function() {
object.settings = false;
if (object.user) {
delayed.resolve(object);
}
});
return delayed;
};
this.listCategories = function() {
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/qbank-connector.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -19,7 +19,7 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"qbnk/qbank3api-phpwrapper": "^7.0",
"typo3/cms-core": "^12.4"
},
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Expand Up @@ -8,7 +8,7 @@
'author_email' => 'info@pixelant.net',
'author_company' => 'Pixelant',
'state' => 'stable',
'version' => '2.0.1',
'version' => '2.0.2',
'constraints' => [
'depends' => [
'typo3' => '12.0.0-12.4.99',
Expand Down

0 comments on commit ce3e49d

Please sign in to comment.