[Finder] Adds AccessDeniedException #7256

Merged
merged 1 commit into from Mar 23, 2013

Conversation

Projects
None yet
4 participants
Contributor

jfsimon commented Mar 4, 2013

Q A
Bug fix? yes
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets #6981
+/**
+ * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
+ */
+class AccessDeniedException extends \UnexpectedValueException
@vicb

vicb Mar 4, 2013

Contributor

As extending \UnexpectedValueException is required to keep BC, could you please add a UT ?

@jfsimon

jfsimon Mar 4, 2013

Contributor

You want me to add a something like $this->assertTrue(new AccessDeniedException() instanceof \UnexpectedValueException)?

@vicb

vicb Mar 4, 2013

Contributor

Yep and it should be added in 2.0.

You should also implements the module wide ExcpectionInterface (in 2.0 also).

@fabpot

fabpot Mar 20, 2013

Owner

Nothing gets added to 2.0 as it is not maintained anymore.

src/Symfony/Component/Finder/Tests/FinderTest.php
+ $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->getIterator());
+ } catch (\Exception $e) {
+ // restore previous rights
+ chmod(self::$tmpDir.DIRECTORY_SEPARATOR.'foo', 0777);
@staabm

staabm Mar 16, 2013

Contributor

Restore need to be on both path, say in a finally block

[finder] Introduced AccessDeniedException
This exception is thrown when trying to open a non-readable directory.

Squashed commits:
[Finder] Fixed small errors
[Finder] small changes about AccessDeniedException
[Finder] removed unnecessary comment
[Finder] added access denied exception test
[Finder] Updated AccessDeniedException base class
[Finder] fixed access denied exception test
[Finder] native adapters now throw AccessDeniedException on stderr

fabpot added a commit that referenced this pull request Mar 23, 2013

merged branch jfsimon/finder-access-denied-exception (PR #7256)
This PR was merged into the master branch.

Discussion
----------

[Finder] Adds AccessDeniedException

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6981

Commits
-------

714ace8 [finder] Introduced AccessDeniedException

@fabpot fabpot closed this Mar 23, 2013

@fabpot fabpot merged commit 714ace8 into symfony:master Mar 23, 2013

1 check passed

default Scrutinizer: No Comments — Travis: Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment