Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Move binaries in bin folder and rename tests folder #330

Merged
merged 1 commit into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
/phpunit.xml.dist export-ignore
/.php_cs.dist export-ignore
/.styleci.yml export-ignore
/Tests export-ignore
/tests export-ignore
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
.idea/
phpunit.xml
vendor/
phpunit.xml
.php_cs.cache
.php_cs
# The Api reference is auto generated and should not be part of the repository
/Documentation-GENERATED-temp
sphpdox.phar
_Output/
Documentation/.doctrees
bin/
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
php: 7.3
env: PHPUnit
before_script: composer install
script: vendor/bin/phpunit Tests/Unit/
script: vendor/bin/phpunit tests/Unit/
- <<: *phpunit
php: 7.2
- <<: *phpunit
Expand Down
33 changes: 33 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env php
<?php

requireAutoloader();

$app = new \Symfony\Component\Console\Application('TYPO3 Surf', '1.0.0');
$app->add(new \TYPO3\Surf\Command\ReleaseCommand());
$app->setDefaultCommand('release');
$app->run();

function requireAutoloader()
{
$autoloadPaths = [
// Package was included as a library
__DIR__ . '/../../../autoload.php',
// Local package usage
__DIR__ . '/../vendor/autoload.php',
// Local package in packages folder
__DIR__ . '/../../../vendor/autoload.php',
];
foreach ($autoloadPaths as $path) {
if (file_exists($path)) {
/** @noinspection PhpIncludeInspection */
return file_exists($path) && include $path;
}
}

$msg = 'You must set up the project dependencies, run the following commands:' . PHP_EOL .
'curl -sS https://getcomposer.org/installer | php' . PHP_EOL .
'php composer.phar install' . PHP_EOL;
fwrite(STDERR, $msg);
exit(1);
}
32 changes: 32 additions & 0 deletions bin/surf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env php
<?php

requireAutoloader();

$app = new \TYPO3\Surf\Cli\Symfony\ConsoleApplication('TYPO3 Surf', '3.0.0-alpha');
$app->setFactory(new \TYPO3\Surf\Integration\Factory());
$app->run();

function requireAutoloader()
{
$autoloadPaths = [
// Package was included as a library
__DIR__ . '/../../../autoload.php',
// Local package usage
__DIR__ . '/../vendor/autoload.php',
// Local package in packages folder
__DIR__ . '/../../../vendor/autoload.php',
];
foreach ($autoloadPaths as $path) {
if (file_exists($path)) {
/** @noinspection PhpIncludeInspection */
return file_exists($path) && include $path;
}
}

$msg = 'You must set up the project dependencies, run the following commands:' . PHP_EOL .
'curl -sS https://getcomposer.org/installer | php' . PHP_EOL .
'php composer.phar install' . PHP_EOL;
fwrite(STDERR, $msg);
exit(1);
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
},
"autoload-dev": {
"psr-4": {
"TYPO3\\Surf\\Tests\\": "Tests"
"TYPO3\\Surf\\Tests\\": "tests"
}
},
"bin": [
"surf"
"bin/surf"
],
"config": {
"platform": {
Expand Down
9 changes: 4 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@
>
<testsuites>
<testsuite name="Surf Test Suite">
<directory>./Tests/</directory>
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Resources</directory>
<directory>./Migrations</directory>
<directory>./Documentation</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
</phpunit>
15 changes: 0 additions & 15 deletions release

This file was deleted.

14 changes: 0 additions & 14 deletions surf

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.