Skip to content

Commit

Permalink
[TASK] Prepare Release for TYPO3 v10.4 and v11.5
Browse files Browse the repository at this point in the history
Related: #27
  • Loading branch information
extcode committed May 17, 2022
1 parent 2656aa3 commit 56a1b9a
Show file tree
Hide file tree
Showing 12 changed files with 202 additions and 83 deletions.
27 changes: 24 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ lint:yaml:
before_script:
- pip install yamllint==1.10.0
script:
- yamllint -c Build/yamllint.yaml Configuration/ Resources/ .travis.yml
- yamllint -c Build/yamllint.yaml Configuration/ Resources/

lint:php72:
stage: lint
Expand All @@ -60,6 +60,27 @@ lint:php74:
script:
- find . -name \*.php -exec php -l "{}" \;

lint:php80:
stage: lint
image: php:8.0-alpine
script:
- find . -name \*.php -exec php -l "{}" \;

lint:php81:
stage: lint
image: php:8.1-alpine
script:
- find . -name \*.php -exec php -l "{}" \;

phpstan:analyse:
image: composer:2
stage: lint
before_script:
- composer config platform.php 7.4
- composer install --no-progress --no-ansi --no-interaction
script:
- .build/bin/phpstan analyse -c Build/phpstan.neon

documentation:
stage: documentation
image:
Expand Down Expand Up @@ -89,7 +110,7 @@ sonarqube:
SONAR_SOURCES: "./Classes"
SONAR_GITLAB_PROJECT_ID: "$CI_PROJECT_ID"
script:
- echo "sonar.projectKey=cart_paypal-5.x" > sonar-project.properties
- echo "sonar.projectKey=cart_paypal-6.x" > sonar-project.properties
- gitlab-sonar-scanner -Dsonar.php.coverage.reportPath=phpunit.coverage.xml -Dsonar.php.tests.reportPath=phpunit.report.xml
allow_failure: true

Expand All @@ -105,5 +126,5 @@ sonarqube-reports:
SONAR_SOURCES: "./Classes"
SONAR_TESTS: "./Tests"
script:
- echo "sonar.projectKey=cart_paypal-5.x" > sonar-project.properties
- echo "sonar.projectKey=cart_paypal-6.x" > sonar-project.properties
- gitlab-sonar-scanner -Dsonar.php.coverage.reportPath=phpunit.coverage.xml -Dsonar.php.tests.reportPath=phpunit.report.xml
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions Build/phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
level: 0
paths:
- ../Classes
- ../Configuration
- ../ext_emconf.php
- ../ext_localconf.php
8 changes: 4 additions & 4 deletions Classes/Controller/Order/PaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ protected function execCurlRequest(string $curlRequest): bool
}
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Connection: Close']);

$this->curlResult = strtolower(curl_exec($ch));
$curlResult = strtolower(curl_exec($ch));
$curlError = curl_errno($ch);

if ($curlError !== 0) {
Expand All @@ -284,7 +284,7 @@ protected function execCurlRequest(string $curlRequest): bool
'ERROR' => 'Can\'t connect to PayPal to validate IPN message',
'curl_error' => curl_error($ch),
'curl_request' => $curlRequest,
'curl_result' => $this->curlResult,
'curl_result' => $curlResult,
]
);

Expand All @@ -298,12 +298,12 @@ protected function execCurlRequest(string $curlRequest): bool
[
'curl_info' => curl_getinfo($ch, CURLINFO_HEADER_OUT),
'curl_request' => $curlRequest,
'curl_result' => $this->curlResult,
'curl_result' => $curlResult,
]
);
}

$this->curlResults = explode("\r\n\r\n", $this->curlResult);
$curlResults = explode("\r\n\r\n", $curlResult);

curl_close($ch);

Expand Down
4 changes: 3 additions & 1 deletion Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php
defined('TYPO3_MODE') or die();

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

call_user_func(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
ExtensionManagementUtility::addStaticFile(
'cart_paypal',
'Configuration/TypoScript',
'Shopping Cart - PayPal'
Expand Down
6 changes: 6 additions & 0 deletions Documentation/Changelog/6.0/Index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. include:: ../../Includes.txt

6.0 Changes
===========

The version 6.0.0 is a release for TYPO3 v10.4 and v11.5. This version is compatible to Cart v8.0.
1 change: 1 addition & 0 deletions Documentation/Changelog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ChangeLog
:maxdepth: 5
:titlesonly:

6.0/Index
5.0/Index
4.0/Index
3.0/Index
4 changes: 2 additions & 2 deletions Documentation/Settings.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[general]

project = Cart PayPal
version = 5.0
release = 5.0.0
version = 6.0
release = 6.0.0
t3author = Daniel Gohlke
copyright = 2021-2024

Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ and database!** If possible test the update in a test copy of your TYPO3 instanc

## 3.1 Compatibility and supported Versions

| Cart PayPal | TYPO3 | PHP | Support/Development |
| ------------- | ---------- | ----------|---------------------------------------- |
| 5.x.x | 10.4 | 7.2 - 7.4 | Features, Bugfixes, Security Updates |
| 4.x.x | 9.5 | 7.2 - 7.4 | Bugfixes, Security Updates |
| 3.x.x | 8.7 | 7.0 - 7.4 | Security Updates |
| 2.x.x | 6.2 - 8.7 | 5.6 - 7.0 | Security Updates |
| 1.x.x | | | |
| Cart PayPal | TYPO3 | PHP | Support/Development |
|---------------| ---------- | ----------|--------------------------------------|
| 6.x.x | 10.4, 11.5 | 7.2+ | Features, Bugfixes, Security Updates |
| 5.x.x | 10.4 | 7.2 - 7.4 | Bugfixes, Security Updates |
| 4.x.x | 9.5 | 7.2 - 7.4 | Security Updates |
| 3.x.x | 8.7 | 7.0 - 7.4 | |
| 2.x.x | 6.2 - 8.7 | 5.6 - 7.0 | |
| 1.x.x | | | |

### 3.2. Changelog

Please have a look into the [official extension documentation in changelog chapter](https://docs.typo3.org/typo3cms/extensions/cart_paypal/Changelog/Index.html)
Please have a look into the [official extension documentation in changelog chapter](https://docs.typo3.org/p/extcode/cart_paypal/main/en-us/Changelog/Index.html)

### 3.3. Release Management

Expand Down
39 changes: 27 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,44 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.14",
"helmich/typo3-typoscript-lint": "^2.0",
"overtrue/phplint": "^1.1"
"overtrue/phplint": "^1.1",
"rector/rector": "^0.11",
"phpstan/phpstan": "^0.12"

},
"scripts": {
"cgl:test": [
".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./"
],
"cgl:fix": [
"test:cgl": [
".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no --path-mode=intersection ./"
],
"php:lint": [
"test:cgl:dry-run": [
".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./"
],
"test:php:lint": [
".build/bin/phplint -c Build/phplint.yaml"
],
"typoscript:lint": [
"test:phpstan:analyse": [
".build/bin/phpstan analyse -c Build/phpstan.neon"
],
"test:rector:process": [
".build/bin/rector process *"
],
"test:rector:process:dry-run": [
".build/bin/rector process * --dry-run"
],
"test:typoscript:lint": [
".build/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration"
],
"test:php": [
"@test:php:lint"
],
"test:all": [
"@cgl:test",
"@typoscript:lint",
"@php:lint"
"@test:cgl",
"@test:php",
"@test:typoscript:lint"
],
"post-autoload-dump": [
"mkdir -p .Build/Web/typo3conf/ext/",
"[ -L .Build/Web/typo3conf/ext/cart_paypal ] || ln -snvf ../../../../. .Build/Web/typo3conf/ext/cart_paypal"
"mkdir -p .build/Web/typo3conf/ext/",
"[ -L .build/Web/typo3conf/ext/cart_paypal ] || ln -snvf ../../../../. .build/Web/typo3conf/ext/cart_paypal"
]
}
}
8 changes: 4 additions & 4 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
'shy' => '',
'priority' => '',
'module' => '',
'state' => 'beta',
'state' => 'stable',
'internal' => '',
'uploadfolder' => '0',
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'version' => '5.0.0',
'version' => '6.0.0',
'constraints' => [
'depends' => [
'typo3' => '10.4.0-10.4.99',
'cart' => '7.4.0',
'typo3' => '10.4.0-11.5.99',
'cart' => '8.0.0',
],
'conflicts' => [],
'suggests' => [],
Expand Down
Loading

0 comments on commit 56a1b9a

Please sign in to comment.