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

[BUG] An alias "filerename" was requested but no service could be found ZF2.5.3 #14

Merged
merged 2 commits into from
Feb 16, 2016

Conversation

buse974
Copy link
Contributor

@buse974 buse974 commented Feb 10, 2016

Bug with zend-filter 2.6.0 (ZF2.5.3)

An alias "filerename" was requested but no service could be found.

Since version 2.6.0 of zend-filter the aliases property is used in Zend\Filter\FilterPluginManager. I merged aliases property in the constructor Zend\File\Transfer\Adapter\FilterPluginManager.

Here is a minimal example of the problem I ran into.

$adp = new Http();
$adp->addFilter('Rename', array('target' => $nameMod.'.dat'));

it works and tests pass.

@buse974 buse974 changed the title Merges aliases property in the constructor [BUG] An alias "filerename" was requested but no service could be found Feb 10, 2016
@buse974 buse974 changed the title [BUG] An alias "filerename" was requested but no service could be found [BUG] An alias "filerename" was requested but no service could be found ZF2.5.3 Feb 10, 2016
@remicollet
Copy link
Contributor

This PR fix test suite with recent component.

See (Fedora PHP Stack CI) https://apps.fedoraproject.org/koschei/package/php-zendframework-zend-file

@@ -18,6 +18,8 @@
*/
class HttpTestMockAdapter extends Adapter\Http
{
static $aa = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be given a better name?

weierophinney added a commit to weierophinney/zend-file that referenced this pull request Feb 16, 2016
[BUG]  An alias "filerename" was requested but no service could be found  ZF2.5.3
weierophinney added a commit to weierophinney/zend-file that referenced this pull request Feb 16, 2016
This patch incorporates feedback from zendframework#14, specifically:

- Reverts the addition of zend-session to the requirements; it's not
  used anywhere.
- Reverts changes to `HttpTestMockAdapter`; they did not serve any
  noticeable purpose.
- Updates `AbstractAdapter` to cast the `$options` value to an array
  when scalar, ensuring it works with both v2 and v3 versions of
  zend-servicemanager.
- Updated FilterPluginManager to:
  - Move the `array_merge()` option before the call to the parent
    constructor; this ensures any configuration passed at instantation
    takes precedence.
  - Use short array notation for the array passed to `array_merge()`.
  - Document the constructor.
- Updated the `AbstractTest`
  - Reverted the change to `testAdapterShouldAllowPullingFiltersByFile`;
    it was changing the test to follow observed behavior instead of
    updating the code to retain existing behavior.
  - Fixed a number of CS issues with regards to multi-line arguments.
This was referenced Feb 16, 2016
@weierophinney weierophinney added this to the 2.5.2 milestone Feb 16, 2016
@weierophinney weierophinney self-assigned this Feb 16, 2016
@weierophinney weierophinney merged commit 8c7ef68 into zendframework:master Feb 16, 2016
weierophinney added a commit that referenced this pull request Feb 16, 2016
weierophinney added a commit that referenced this pull request Feb 16, 2016
weierophinney added a commit that referenced this pull request Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants