Skip to content

Commit

Permalink
Merge branch 'master' into patch-union-types
Browse files Browse the repository at this point in the history
  • Loading branch information
PKuhlmay authored Mar 29, 2024
2 parents 2f8dc72 + 330109b commit 4d67bad
Show file tree
Hide file tree
Showing 29 changed files with 285 additions and 255 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ indent_style = tab

[*{.phpt,htmlt}]
insert_final_newline = false

# Makefile
[{Makefile,**.mk}]
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab
13 changes: 7 additions & 6 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Runs a single command using the runners shell
- name: Run a one-line script
- name: "Run a one-line script"
run: echo This should run the rector test. This is not implemented yet

sass-linter:
Expand All @@ -34,15 +34,16 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: "Checkout code"
uses: actions/checkout@v4

- name: Setup Node
- name: "Setup Node"
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Run the "npm ci" command
- name: "Run npm ci"
run: npm ci

- name: Run the "npm sass-linter" command
- name: "Run npm sass-linter"
run: npm run sass-lint
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: "Checkout"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Publish new version to TER"
uses: tomasnorre/typo3-upload-ter@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Commit Type
- name: "Check Commit Type"
uses: gsactions/commit-message-checker@v1
with:
pattern: '^(|\[(!!!|WIP|POC|REVERT)\])\[(BUGFIX|DOCS|FEATURE|SECURITY|TASK|RELEASE|DEVBOX)\] .+($|\n|\r|\n\r)'
flags: ''
error: 'Your first line has to contain a commit type like "[BUGFIX]" or "[TASK]" or "[FEATURE]" see https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/Appendix/CommitMessage.html#commitmessage.'
- name: Check Line Length
- name: "Check Line Length"
uses: gsactions/commit-message-checker@v1
with:
pattern: '^[^#].{1,74}'
Expand All @@ -27,7 +27,7 @@ jobs:
needs: check_commit_message
runs-on: ubuntu-latest
steps:
- name: Assign and check labels
- name: "Assign and check labels"
uses: fuxingloh/multi-labeler@v1
with:
config-path: .github/pr-labeler.yml
17 changes: 17 additions & 0 deletions .github/workflows/test-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: test documentation

on: [ push, pull_request ]

jobs:
tests:
name: documentation
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4

- name: "Test if the documentation will render without warnings"
run: |
mkdir -p Documentation-GENERATED-temp \
&& docker run --rm --pull always -v $(pwd):/project \
ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,41 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [7.4, 8.0]
php: [7.4, 8.0, 8.1, 8.2, 8.3]
typo3: [^11.5]

name: P${{ matrix.php }} - T${{ matrix.typo3 }}

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: "Checkout code"
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v1
- name: "Cache dependencies"
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-typo3-${{ matrix.typo3 }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl
coverage: none

- name: Install dependencies
- name: "Install dependencies"
run: composer require "typo3/minimal:${{ matrix.typo3 }}" --prefer-dist --no-progress --no-suggest --no-interaction

- name: Check PHP syntax errors
- name: "Check PHP syntax errors"
run: find . -name \*.php ! -path "./.Build/*" -print0 | xargs -0 -n1 -P4 php -d display_errors=stderr -n -l > /dev/null

- name: Execute unit tests
- name: "Execute unit tests"
run: .Build/bin/phpunit --colors -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml Tests/Unit/
env:
TYPO3_PATH_WEB: $PWD/.Build/Web
TYPO3_PATH_WEB: $PWD/.Build/public

- name: Execute functional tests
- name: "Execute functional tests"
run: .Build/bin/phpunit --colors -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml Tests/Functional/
env:
TYPO3_PATH_WEB: $PWD/.Build/Web
TYPO3_PATH_WEB: $PWD/.Build/public
typo3DatabaseDriver: pdo_sqlite
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,10 @@ protected function findModuleIndexByRelationUid(
return $result;
}

if ($modules[$supposedModuleIndex]['value']['relationGroup']['relations'][$supposedRelationIndex]['uid'] === $uid) {
if (
isset($modules[$supposedModuleIndex]['value']['relationGroup']['relations'][$supposedRelationIndex]['uid'])
&& $modules[$supposedModuleIndex]['value']['relationGroup']['relations'][$supposedRelationIndex]['uid'] === $uid
) {
$result['terminal'] = 'relationWire_' . $supposedRelationIndex;
return $result;
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/ClassObject/ClassObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function setPropertyTag(string $propertyName, array $tag): void

public function propertyExists(string $propertyName): bool
{
return is_array($this->methods) && in_array($propertyName, $this->getPropertyNames(), true);
return in_array($propertyName, $this->getPropertyNames(), true);
}

public function addProperty(Property $classProperty): bool
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ public function getComposerInfo(): array
],
'extra' => [
'typo3/cms' => [
'web-dir' => '.Build/Web',
'web-dir' => '.Build/public',
'extension-key' => $extensionKey,
]
]
Expand Down
1 change: 0 additions & 1 deletion Classes/Parser/NodeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ public function buildPropertyNode(Property $property): Stmt\Property
}

$this->addCommentAttributes($property, $propertyNode);
$propertyNode->default = $property->getDefault();
return $propertyNode;
}

Expand Down
15 changes: 15 additions & 0 deletions Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@
Change log
==========

Version 11.0.13
---------------
* [DOCS] Adds information about a possible missing storage path when using composer mode

Version 11.0.12
---------------
* [TASK] Switch documentation rendering to PHP (thanks to Sandra Erbel)
* [BUGFIX] fix issue with default value for nodefactory
* [BUGFIX] Enables scroll view of extension save dialog confirmations (thanks to warki)

Version 11.0.11
---------------
* [TASK] Use current standard for web-dir (thanks to Sybille Peters)
* [BUGFIX] - Undefined array key $parentClass

Version 11.0.10
---------------
* [BUGFIX] Allow null for native date and time
Expand Down
1 change: 0 additions & 1 deletion Documentation/GeneratedExtension/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ reStructuredText and Sphinx can be found in the official TYPO3 documentation:
* :ref:`introduction to reST & Sphinx <h2document:writing-rest-introduction>`
* :ref:`h2document:rest-cheat-sheet`
* :ref:`h2document:format-rest-cgl`
* :ref:`h2document:rest-common-pitfalls`

.. _render-documentation:

Expand Down
1 change: 0 additions & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@ even if you change the extension in the graphical editor.
:hidden:

Sitemap
genindex
13 changes: 13 additions & 0 deletions Documentation/Installation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ add a version constraint, for example:
composer require friendsoftypo3/extension-builder:"^10.0"
.. warning::

If you are in composer mode, you need to add at least one entry inside "repositories" in your composer.json file. Otherwise the extension_builder will fail to save your extension. The extension_builder will store your generated extension in this folder.

.. code-block:: php
"repositories": [
"local": {
"type": "path",
"url": "Packages/*"
}
]
Installing the extension prior to TYPO3 11.4
--------------------------------------------

Expand Down
63 changes: 0 additions & 63 deletions Documentation/Settings.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions Documentation/genindex.rst

This file was deleted.

27 changes: 27 additions & 0 deletions Documentation/guides.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
links-are-relative="true">
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
project-home="https://extensions.typo3.org/extension/extension_builder"
project-contact="https://typo3.slack.com/archives/C0CEB3BMY"
project-repository="https://github.com/FriendsOfTYPO3/extension_builder"
project-issues="https://github.com/FriendsOfTYPO3/extension_builder/issues"
edit-on-github-branch="master"
edit-on-github="FriendsOfTYPO3/extension_builder"
typo3-core-preferred="11.5"
interlink-shortcode="friendsoftypo3/extension-builder"
/>
<project title="Extension Builder"
release="main (development)"
version="main (development)"
copyright="since 2009 by the TYPO3 contributors"
/>
<inventory id="t3coreapi-latest"
url="https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/"
/>
<inventory id="t3extbasebook"
url="https://docs.typo3.org/m/typo3/book-extbasefluid/10.4/en-us/"
/>
</guides>
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.PHONY: help
help: ## Displays this list of targets with descriptions
@echo "The following commands are available:\n"
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: docs
docs: ## Generate projects documentation (from "Documentation" directory)
mkdir -p Documentation-GENERATED-temp
docker run --rm --pull always -v "$(shell pwd)":/project -t ghcr.io/typo3-documentation/render-guides:latest --config=Documentation

.PHONY: test-docs
test-docs: ## Test the documentation rendering
mkdir -p Documentation-GENERATED-temp
docker run --rm --pull always -v "$(shell pwd)":/project -t ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log
3 changes: 1 addition & 2 deletions Tests/BaseFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ protected function setUp(): void
'codeTemplatePartialPaths',
[Environment::getPublicPath() . '/typo3conf/ext/extension_builder/Resources/Private/CodeTemplates/Extbase/Partials']
);
$this->fileGenerator->_set('enableRoundtrip', true);
$this->fileGenerator->_set('extension', $this->extension);
}

Expand Down Expand Up @@ -219,6 +218,6 @@ protected function removeInitialModelClassFile(string $modelName): void
if (@file_exists($file)) {
unlink($file);
}
self::assertFileNotExists($file, 'Dummy file could not be removed:' . $file);
self::assertFileDoesNotExist($file, 'Dummy file could not be removed:' . $file);
}
}
2 changes: 1 addition & 1 deletion Tests/Fixtures/TestExtensions/test_extension/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"extra": {
"typo3/cms": {
"web-dir": ".Build/Web",
"web-dir": ".Build/public",
"extension-key": "test_extension"
}
}
Expand Down
Loading

0 comments on commit 4d67bad

Please sign in to comment.