Skip to content

Commit 5d105f9

Browse files
authored
[TASK] Switch to composer based build (#27)
1 parent eae3d5d commit 5d105f9

4 files changed

Lines changed: 111 additions & 29 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.Build/*
2+
composer.lock

.travis.yml

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
11
language: php
22

3+
branches:
4+
only:
5+
- master
6+
- /^[0-9]+\.[0-9]+\.[0-9]+$/
7+
38
matrix:
9+
allow_failures:
10+
- env: TYPO3_VERSION=dev-master
411
include:
512
- php: 5.3
6-
env: TYPO3_BRANCH=TYPO3_6-2
13+
env: TYPO3_VERSION=^6.2
714
- php: 5.4
8-
env: TYPO3_BRANCH=TYPO3_6-2
15+
env: TYPO3_VERSION=^6.2
916
- php: 5.5
10-
env: TYPO3_BRANCH=TYPO3_6-2
17+
env: TYPO3_VERSION=^6.2
1118
- php: 5.6
12-
env: TYPO3_BRANCH=TYPO3_6-2
19+
env: TYPO3_VERSION=^6.2
1320
- php: 5.5
14-
env: TYPO3_BRANCH=TYPO3_7-6
21+
env: TYPO3_VERSION=^7.6
1522
- php: 5.6
16-
env: TYPO3_BRANCH=TYPO3_7-6
23+
env: TYPO3_VERSION=^7.6
1724
- php: 7.0
18-
env: TYPO3_BRANCH=TYPO3_7-6
25+
env: TYPO3_VERSION=^7.6
1926
- php: 7.0
20-
env: TYPO3_BRANCH=master
27+
env: TYPO3_VERSION=dev-master
2128

2229
notifications:
2330
email:
24-
- helmut@typo3.org
31+
- typo3@helhum.io
2532

2633
sudo: false
2734
cache:
@@ -37,34 +44,41 @@ before_install:
3744
- phpenv config-rm xdebug.ini
3845
- composer self-update
3946
- composer --version
40-
- if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi
4147

4248
before_script:
43-
- cd ..
44-
- git clone --single-branch --branch $TYPO3_BRANCH --depth 1 https://github.com/TYPO3/TYPO3.CMS.git typo3_core
45-
- mv typo3_core/* .
46-
- composer install
47-
- mkdir -p typo3conf/ext
48-
- mv typoscript_rendering typo3conf/ext/
49+
- composer require typo3/cms=$TYPO3_VERSION
50+
- export TYPO3_PATH_WEB="$PWD/.Build/Web"
4951

5052
script:
5153
- >
5254
echo;
5355
echo "Running unit tests";
54-
./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml typo3conf/ext/typoscript_rendering/Tests/Unit/
56+
.Build/bin/phpunit -c .Build/vendor/typo3/cms/typo3/sysext/core/Build/UnitTests.xml Tests/Unit/
57+
5558
- >
5659
echo;
5760
echo "Running php lint";
58-
/bin/bash -c "
59-
if ! find typo3conf/ext/typoscript_rendering -name \*.php | parallel --gnu 'php -l {}' > /tmp/errors 2>&1; then
60-
grep -v \"No syntax errors detected in\" /tmp/errors;
61-
exit 99;
62-
fi
63-
"
61+
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
62+
6463
- >
6564
echo;
6665
export typo3DatabaseName="typo3";
6766
export typo3DatabaseHost="localhost";
6867
export typo3DatabaseUsername="root";
6968
export typo3DatabasePassword="";
70-
find 'typo3conf/ext/typoscript_rendering/Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml {}'
69+
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit -c .Build/vendor/typo3/cms/typo3/sysext/core/Build/FunctionalTests.xml {}'
70+
71+
after_script:
72+
- >
73+
if [ -n "$TRAVIS_TAG" ] && [ -n "$TYPO3_ORG_USERNAME" ] && [ -n "$TYPO3_ORG_PASSWORD" ]; then
74+
echo -e "Preparing upload of release ${TRAVIS_TAG} to TER\n"
75+
curl -sSL https://raw.githubusercontent.com/alrra/travis-after-all/1.4.4/lib/travis-after-all.js | node
76+
if [ $? -eq 0 ]; then
77+
# Cleanup before we upload
78+
git reset --hard HEAD && git clean -fx
79+
80+
TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`
81+
echo "Uploading release ${TRAVIS_TAG} to TER"
82+
.Build/bin/upload . "$TYPO3_ORG_USERNAME" "$TYPO3_ORG_PASSWORD" "$TAG_MESSAGE"
83+
fi;
84+
fi;

composer.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "helhum/typoscript-rendering",
3+
"type": "typo3-cms-extension",
4+
"description": "Can render a TypoScript path by URL, especially useful for Ajax dispatching",
5+
"keywords": [
6+
"TYPO3",
7+
"rendering",
8+
"frontend"
9+
],
10+
"homepage": "http://insight.helhum.io/post/104880845705/dont-use-eid-ajax-dispatchers-for-your-extbase",
11+
"support": {
12+
"issues": "https://github.com/helhum/typoscript_rendering/issues"
13+
},
14+
"authors": [
15+
{
16+
"name": "Helmut Hummel",
17+
"email": "info@helhum.io",
18+
"role": "Developer",
19+
"homepage": "http://helhum.io"
20+
}
21+
],
22+
"license": "GPL-2.0+",
23+
"require": {
24+
"php": ">=5.3.7",
25+
"typo3/cms-core": "^6.2 || ^7.6 || ^8.0"
26+
},
27+
"require-dev": {
28+
"namelesscoder/typo3-repository-client": "1.1.x-dev",
29+
"mikey179/vfsStream": "~1.6.0",
30+
"phpunit/phpunit": "~4.8.0"
31+
},
32+
"autoload": {
33+
"psr-4": {
34+
"Helhum\\TyposcriptRendering\\": "Classes"
35+
}
36+
},
37+
"autoload-dev": {
38+
"psr-4": {
39+
"Helhum\\TyposcriptRendering\\Tests\\": "Tests",
40+
"TYPO3\\CMS\\Core\\Tests\\": ".Build/vendor/typo3/cms/typo3/sysext/core/Tests/"
41+
}
42+
},
43+
"replace": {
44+
"typo3_console": "self.version",
45+
"typo3-ter/typo3-console": "self.version"
46+
},
47+
"config": {
48+
"vendor-dir": ".Build/vendor",
49+
"bin-dir": ".Build/bin"
50+
},
51+
"scripts": {
52+
"post-autoload-dump": [
53+
"mkdir -p .Build/Web/typo3conf/ext/",
54+
"[ -L .Build/Web/typo3conf/ext/typoscript_rendering ] || ln -snvf ../../../../. .Build/Web/typo3conf/ext/typoscript_rendering"
55+
]
56+
},
57+
"extra": {
58+
"branch-alias": {
59+
"dev-master": "2.x-dev"
60+
},
61+
"typo3/cms": {
62+
"cms-package-dir": "{$vendor-dir}/typo3/cms",
63+
"web-dir": ".Build/Web"
64+
}
65+
}
66+
}

ext_emconf.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
$EM_CONF[$_EXTKEY] = array (
33
'title' => 'TypoScript Rendering',
4-
'description' => 'Can render a TypoScript snippet by URL, especially useful for Ajax dispatching',
4+
'description' => 'Can render a TypoScript path by URL, especially useful for Ajax dispatching',
55
'category' => 'Rendering',
66
'author' => 'Helmut Hummel',
77
'author_email' => 'info@helmut-hummel.de',
@@ -11,17 +11,17 @@
1111
'createDirs' => '',
1212
'clearCacheOnLoad' => 0,
1313
'version' => '1.0.5',
14-
'constraints' =>
14+
'constraints' =>
1515
array (
16-
'depends' =>
16+
'depends' =>
1717
array (
1818
'php' => '5.3.7-7.0.999',
1919
'typo3' => '6.2.0-8.99.99',
2020
),
21-
'conflicts' =>
21+
'conflicts' =>
2222
array (
2323
),
24-
'suggests' =>
24+
'suggests' =>
2525
array (
2626
),
2727
),

0 commit comments

Comments
 (0)