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

Commit b338573

Browse files
authored
Merge pull request #12 from spipu/master
add symfony 4 compatibility
2 parents bfcbd4a + b9f12a3 commit b338573

File tree

7 files changed

+27
-225
lines changed

7 files changed

+27
-225
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
vendor/
2-
conveyor.yml
1+
/vendor/
2+
/composer.lock
3+
conveyor.yml

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
language: php
22
php:
3-
- "5.4"
4-
- "5.3"
5-
before_script: composer install
3+
- 5.4
4+
- 5.5
5+
- 5.6
6+
- 7.0
7+
- 7.1
8+
9+
before_script:
10+
- composer install
11+
612
env: SVN_BIN=/usr/bin/svn GIT_BIN=/usr/bin/git

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
}
1919
},
2020
"require": {
21-
"symfony/process": "~2.3|~3.0",
22-
"symfony/finder": ">=v2.1.2|~3.0",
23-
"symfony/filesystem": ">=v2.1.2|~3.0",
21+
"symfony/process": "~2.3|~3.0|~4.0",
22+
"symfony/finder": ">=v2.1.2 <3.0|~3.0|~4.0",
23+
"symfony/filesystem": ">=v2.1.2 <3.0|~3.0|~4.0",
2424
"webcreate/util": "1.*"
2525
},
26+
"require-dev": {
27+
"phpunit/phpunit": "^4.0"
28+
},
2629
"suggest": {
2730
"symfony/event-dispatcher": "Allows to hook into VCS with events"
2831
}

composer.lock

Lines changed: 0 additions & 208 deletions
This file was deleted.

src/Webcreate/Vcs/Svn/AbstractSvn.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ public function execute($command, array $arguments = array(), $cwd = null)
164164
$result = $this->adapter->execute($command, $arguments, $cwd);
165165
} catch (\Exception $e) {
166166
// @todo move to a generic error handler? Something similar to the ParserInterface
167-
if (preg_match('/svn: URL \'[^\']+\' non-existent in that revision/', $e->getMessage())) {
168-
throw new NotFoundException($e->getMessage());
169-
}
170-
if (preg_match('/svn: File not found/', $e->getMessage())) {
167+
if (preg_match('/url \'[^\']+\' non-existent/i', $e->getMessage()) ||
168+
preg_match('/file not found/i', $e->getMessage()) ||
169+
preg_match('/path not found/i', $e->getMessage())
170+
) {
171171
throw new NotFoundException($e->getMessage());
172172
}
173173

tests/Webcreate/Vcs/GitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ public function logProvider()
111111
array('/dir1', null, 10, xsprintf('%s log -n %xs --pretty=%s %xs',
112112
$this->bin,
113113
'10',
114-
ProcessUtils::escapeArgument(Git::PRETTY_FORMAT),
114+
escapeshellarg(Git::PRETTY_FORMAT),
115115
'/dir1'
116116
)),
117117
array('/dir1', null, null, xsprintf('%s log --pretty=%s %xs',
118118
$this->bin,
119-
ProcessUtils::escapeArgument(Git::PRETTY_FORMAT),
119+
escapeshellarg(Git::PRETTY_FORMAT),
120120
'/dir1'
121121
)),
122122
);

tests/Webcreate/Vcs/Test/Functional/AbstractTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testLs()
5858
}
5959

6060
/**
61-
* @expectedException Webcreate\Vcs\Exception\NotFoundException
61+
* @expectedException \Webcreate\Vcs\Exception\NotFoundException
6262
*/
6363
public function testLsForNonExistingPathThrowsException()
6464
{
@@ -139,7 +139,7 @@ public function testCat($path)
139139
}
140140

141141
/**
142-
* @expectedException Webcreate\Vcs\Exception\NotFoundException
142+
* @expectedException \Webcreate\Vcs\Exception\NotFoundException
143143
*/
144144
public function testCatForNonExistingPathThrowsException()
145145
{
@@ -184,7 +184,7 @@ public function testStatusAddedFile()
184184

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

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

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

0 commit comments

Comments
 (0)