Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
Merge pull request #12 from spipu/master
Browse files Browse the repository at this point in the history
add symfony 4 compatibility
  • Loading branch information
fieg authored Jun 15, 2018
2 parents bfcbd4a + b9f12a3 commit b338573
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 225 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor/
conveyor.yml
/vendor/
/composer.lock
conveyor.yml
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
language: php
php:
- "5.4"
- "5.3"
before_script: composer install
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1

before_script:
- composer install

env: SVN_BIN=/usr/bin/svn GIT_BIN=/usr/bin/git
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
}
},
"require": {
"symfony/process": "~2.3|~3.0",
"symfony/finder": ">=v2.1.2|~3.0",
"symfony/filesystem": ">=v2.1.2|~3.0",
"symfony/process": "~2.3|~3.0|~4.0",
"symfony/finder": ">=v2.1.2 <3.0|~3.0|~4.0",
"symfony/filesystem": ">=v2.1.2 <3.0|~3.0|~4.0",
"webcreate/util": "1.*"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
},
"suggest": {
"symfony/event-dispatcher": "Allows to hook into VCS with events"
}
Expand Down
208 changes: 0 additions & 208 deletions composer.lock

This file was deleted.

8 changes: 4 additions & 4 deletions src/Webcreate/Vcs/Svn/AbstractSvn.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ public function execute($command, array $arguments = array(), $cwd = null)
$result = $this->adapter->execute($command, $arguments, $cwd);
} catch (\Exception $e) {
// @todo move to a generic error handler? Something similar to the ParserInterface
if (preg_match('/svn: URL \'[^\']+\' non-existent in that revision/', $e->getMessage())) {
throw new NotFoundException($e->getMessage());
}
if (preg_match('/svn: File not found/', $e->getMessage())) {
if (preg_match('/url \'[^\']+\' non-existent/i', $e->getMessage()) ||
preg_match('/file not found/i', $e->getMessage()) ||
preg_match('/path not found/i', $e->getMessage())
) {
throw new NotFoundException($e->getMessage());
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Webcreate/Vcs/GitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ public function logProvider()
array('/dir1', null, 10, xsprintf('%s log -n %xs --pretty=%s %xs',
$this->bin,
'10',
ProcessUtils::escapeArgument(Git::PRETTY_FORMAT),
escapeshellarg(Git::PRETTY_FORMAT),
'/dir1'
)),
array('/dir1', null, null, xsprintf('%s log --pretty=%s %xs',
$this->bin,
ProcessUtils::escapeArgument(Git::PRETTY_FORMAT),
escapeshellarg(Git::PRETTY_FORMAT),
'/dir1'
)),
);
Expand Down
6 changes: 3 additions & 3 deletions tests/Webcreate/Vcs/Test/Functional/AbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testLs()
}

/**
* @expectedException Webcreate\Vcs\Exception\NotFoundException
* @expectedException \Webcreate\Vcs\Exception\NotFoundException
*/
public function testLsForNonExistingPathThrowsException()
{
Expand Down Expand Up @@ -139,7 +139,7 @@ public function testCat($path)
}

/**
* @expectedException Webcreate\Vcs\Exception\NotFoundException
* @expectedException \Webcreate\Vcs\Exception\NotFoundException
*/
public function testCatForNonExistingPathThrowsException()
{
Expand Down Expand Up @@ -184,7 +184,7 @@ public function testStatusAddedFile()

$this->client->add(basename($tmpfile));

$result = $this->client->status('');
$result = $this->client->status();

$file = new VcsFileInfo(basename($tmpfile), $this->client->getHead());
$file->setStatus(Status::ADDED);
Expand Down

0 comments on commit b338573

Please sign in to comment.