Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
[BUGFIX] Fix the PHAR inclusion in TYPO3 8.7.17
Browse files Browse the repository at this point in the history
Also document that the extension cannot be symlinked anymore.

Fixes #59
  • Loading branch information
oliverklee committed Jul 18, 2018
1 parent 2cbfea9 commit 1268c44
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Remove the obsolete ext_autoload.php (#56)

### Fixed
- Fix the PHAR inclusion in TYPO3 8.7.17 (#59, #60)
- Only include the PHAR from the test runners (#57, #53)
- Use the DB name from the connection pool in TYPO3 >= 8.7 (#58, #55)
- Hide the test tables from BE user table permission lists (#52)
Expand Down
2 changes: 1 addition & 1 deletion Classes/BackEnd/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected function translate($key)
*/
public function main()
{
require_once __DIR__ . '/../../Resources/Private/Libraries/phpunit-library.phar';
require_once PATH_site . 'typo3conf/ext/phpunit/Resources/Private/Libraries/phpunit-library.phar';

$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
Expand Down
2 changes: 1 addition & 1 deletion Classes/TestRunner/CliTestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function run()
// This is needed as the configuration might include closures which cannot be backed up
$globalBackup = $this->removeClosures($GLOBALS['TYPO3_CONF_VARS']);

require_once __DIR__ . '/../../Resources/Private/Libraries/phpunit-library.phar';
require_once PATH_site . 'typo3conf/ext/phpunit/Resources/Private/Libraries/phpunit-library.phar';

// Run unit tests
/** @var string */
Expand Down
3 changes: 3 additions & 0 deletions Documentation/UsersManual/Installation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ These are basic requirements for using this extension:
#. View the extension's options in the Extension Manager and save them at
least once.

Please note that this extension will only work if it is installed directly
in typo3conf/ext/phpunit/. If it is symlinked, the PHAR inclusion will fail.

If you would like to run the unit tests of the phpunit extension
itself, you'll also need to install the following dummy extension
which are located in EXT:phpunit/TestExtensions/:
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/BackEnd/AjaxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author Oliver Klee <typo3-coding@oliverklee.de>
*/
class AjaxTest extends \Tx_Phpunit_TestCase
class AjaxTest2 extends \Tx_Phpunit_TestCase
{
/**
* @var \Tx_Phpunit_BackEnd_Ajax
Expand Down
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,9 @@
"@ci:static",
"@ci:dynamic"
],
"link-extension": [
"@php -r 'is_dir($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/\") || mkdir($extFolder, 0777, true);'",
"@php -r 'file_exists($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/phpunit\") || symlink(__DIR__,$extFolder);'"
],
"copy-extension": "cp -rfa . .Build/public/typo3conf/ext/phpunit",
"post-autoload-dump": [
"@link-extension"
"@copy-extension"
]
},
"extra": {
Expand Down

0 comments on commit 1268c44

Please sign in to comment.