Skip to content

Commit b228695

Browse files
committed
Add back NotFoundException for BC
1 parent 94238b9 commit b228695

14 files changed

+37
-12
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33

44
## UNRELEASED
55

6+
### Added
7+
8+
- Added back `Http\Discovery\NotFoundException` to preserve BC with 0.8 version
9+
610
### Changed
711

812
- Puli strategy renamed to Puli Beta strategy to prevent incompatibility with a future Puli stable
913

14+
### Deprecated
15+
16+
- `Http\Discovery\NotFoundException` will be removed in 2.0, use `Http\Discovery\Exception\NotFoundException` instead
17+
1018

1119
## 0.9.1 - 2016-06-28
1220

spec/ClassDiscoverySpec.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Http\Discovery\ClassDiscovery;
66
use Http\Discovery\Exception\DiscoveryFailedException;
7-
use Http\Discovery\Exception\NotFoundException;
87
use Http\Discovery\Strategy\DiscoveryStrategy;
98
use Puli\Discovery\Binding\ClassBinding;
109
use Puli\GeneratedPuliFactory;

spec/HttpAsyncClientDiscoverySpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Http\Client\HttpAsyncClient;
66
use Http\Discovery\ClassDiscovery;
7-
use Http\Discovery\Exception\NotFoundException;
7+
use Http\Discovery\NotFoundException;
88
use Http\Discovery\Strategy\DiscoveryStrategy;
99
use Prophecy\Argument;
1010
use Puli\GeneratedPuliFactory;

spec/HttpClientDiscoverySpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Http\Client\HttpClient;
66
use Http\Discovery\ClassDiscovery;
7-
use Http\Discovery\Exception\NotFoundException;
7+
use Http\Discovery\NotFoundException;
88
use Http\Discovery\Strategy\DiscoveryStrategy;
99
use Puli\GeneratedPuliFactory;
1010
use Puli\Discovery\Api\Discovery;

spec/MessageFactoryDiscoverySpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace spec\Http\Discovery;
44

55
use Http\Discovery\ClassDiscovery;
6-
use Http\Discovery\Exception\NotFoundException;
6+
use Http\Discovery\NotFoundException;
77
use Http\Discovery\Strategy\DiscoveryStrategy;
88
use Http\Message\MessageFactory;
99
use Puli\GeneratedPuliFactory;

spec/StreamFactoryDiscoverySpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace spec\Http\Discovery;
44

55
use Http\Discovery\ClassDiscovery;
6-
use Http\Discovery\Exception\NotFoundException;
6+
use Http\Discovery\NotFoundException;
77
use Http\Discovery\Strategy\DiscoveryStrategy;
88
use Http\Message\StreamFactory;
99
use Puli\GeneratedPuliFactory;

spec/UriFactoryDiscoverySpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace spec\Http\Discovery;
44

55
use Http\Discovery\ClassDiscovery;
6-
use Http\Discovery\Exception\NotFoundException;
6+
use Http\Discovery\NotFoundException;
77
use Http\Discovery\Strategy\DiscoveryStrategy;
88
use Http\Message\UriFactory;
99
use Puli\GeneratedPuliFactory;

src/Exception/NotFoundException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
/**
66
* Thrown when a discovery does not find any matches.
77
*
8+
* @final
9+
*
810
* @author Márk Sági-Kazár <[email protected]>
911
*/
10-
final class NotFoundException extends \RuntimeException
12+
/*final */class NotFoundException extends \RuntimeException
1113
{
1214
}

src/HttpAsyncClientDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Http\Client\HttpAsyncClient;
66
use Http\Discovery\Exception\DiscoveryFailedException;
7-
use Http\Discovery\Exception\NotFoundException;
7+
use Http\Discovery\NotFoundException;
88

99
/**
1010
* Finds an HTTP Asynchronous Client.

src/HttpClientDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Http\Client\HttpClient;
66
use Http\Discovery\Exception\DiscoveryFailedException;
7-
use Http\Discovery\Exception\NotFoundException;
7+
use Http\Discovery\NotFoundException;
88

99
/**
1010
* Finds an HTTP Client.

src/MessageFactoryDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Http\Discovery;
44

55
use Http\Discovery\Exception\DiscoveryFailedException;
6-
use Http\Discovery\Exception\NotFoundException;
6+
use Http\Discovery\NotFoundException;
77
use Http\Message\MessageFactory;
88

99
/**

src/NotFoundException.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Http\Discovery;
4+
5+
@trigger_error('The '.__NAMESPACE__.'\NotFoundException class is deprecated since version 1.0 and will be removed in 2.0. Use Http\Discovery\Exception\NotFoundException instead.', E_USER_DEPRECATED);
6+
7+
/**
8+
* Thrown when a discovery does not find any matches.
9+
*
10+
* @author Márk Sági-Kazár <[email protected]>
11+
*
12+
* @deprecated since since version 1.0, and will be removed in 2.0. Use {@link \Http\Discovery\Exception\NotFoundException} instead.
13+
*/
14+
final class NotFoundException extends \Http\Discovery\Exception\NotFoundException
15+
{
16+
}

src/StreamFactoryDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Http\Discovery;
44

55
use Http\Discovery\Exception\DiscoveryFailedException;
6-
use Http\Discovery\Exception\NotFoundException;
6+
use Http\Discovery\NotFoundException;
77
use Http\Message\StreamFactory;
88

99
/**

src/UriFactoryDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Http\Discovery;
44

55
use Http\Discovery\Exception\DiscoveryFailedException;
6-
use Http\Discovery\Exception\NotFoundException;
6+
use Http\Discovery\NotFoundException;
77
use Http\Message\UriFactory;
88

99
/**

0 commit comments

Comments
 (0)